mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Progress
This commit is contained in:
parent
3106f62709
commit
312007b51c
BIN
Moose Development/Maths/Aspect.ggb
Normal file
BIN
Moose Development/Maths/Aspect.ggb
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1192,7 +1192,7 @@ do -- DETECTION_BASE
|
||||
end
|
||||
|
||||
DetectedItem.Set = Set or SET_UNIT:New():FilterDeads():FilterCrashes()
|
||||
DetectedItem.Index = DetectedItemIndex
|
||||
DetectedItem.Index = DetectedItemIndex or self.DetectedItemCount
|
||||
DetectedItem.ItemID = ItemPrefix .. "." .. self.DetectedItemMax
|
||||
DetectedItem.ID = self.DetectedItemMax
|
||||
DetectedItem.Removed = false
|
||||
@ -1312,16 +1312,21 @@ do -- DETECTION_BASE
|
||||
function DETECTION_BASE:GetDetectedItemCoordinate( Index )
|
||||
|
||||
-- If the Zone is set, return the coordinate of the Zone.
|
||||
local DetectedItemSet = self:GetDetectedSet( Index )
|
||||
local FirstUnit = DetectedItemSet:GetFirst()
|
||||
|
||||
local DetectedZone = self:GetDetectedItemZone( Index )
|
||||
if DetectedZone then
|
||||
return DetectedZone:GetCoordinate()
|
||||
local Coordinate = DetectedZone:GetCoordinate()
|
||||
Coordinate:SetHeading(FirstUnit:GetHeading())
|
||||
return Coordinate
|
||||
end
|
||||
|
||||
-- If no Zone is set, return the coordinate of the first unit in the Set
|
||||
local DetectedItemSet = self:GetDetectedSet( Index )
|
||||
local FirstUnit = DetectedItemSet:GetFirst()
|
||||
if FirstUnit then
|
||||
return FirstUnit:GetCoordinate()
|
||||
local Coordinate = FirstUnit:GetCoordinate()
|
||||
FirstUnit:SetHeading(FirstUnit:GetHeading())
|
||||
return Coordinate
|
||||
end
|
||||
|
||||
return nil
|
||||
|
||||
@ -1404,9 +1404,7 @@ function TASK:ReportDetails( TaskGroup ) --R2.1 fixed report. Now nicely formatt
|
||||
if TaskInfoID == "Coordinates" then
|
||||
local FromCoordinate = TaskGroup:GetUnit(1):GetCoordinate()
|
||||
Report:Add( TaskInfoIDText )
|
||||
Report:AddIndent( TaskInfo:ToStringLL() )
|
||||
Report:AddIndent( TaskInfo:ToStringMGRS() )
|
||||
Report:AddIndent( TaskInfo:ToStringBRAA( FromCoordinate ) )
|
||||
Report:AddIndent( TaskInfo:ToStringBRAA( FromCoordinate ) .. ", " .. TaskInfo:ToStringAspect( FromCoordinate ) )
|
||||
Report:AddIndent( TaskInfo:ToStringBULLS( TaskGroup:GetCoalition() ) )
|
||||
else
|
||||
end
|
||||
|
||||
@ -73,6 +73,7 @@ do -- TASK_A2A_DISPATCHER
|
||||
|
||||
self.Detection:FilterCategories( Unit.Category.AIRPLANE, Unit.Category.HELICOPTER )
|
||||
self.Detection:InitDetectRadar( true )
|
||||
self.Detection:SetDetectionInterval(30)
|
||||
|
||||
self:AddTransition( "Started", "Assign", "Started" )
|
||||
|
||||
@ -191,6 +192,7 @@ do -- TASK_A2A_DISPATCHER
|
||||
Task:SetInfo( "Targets", string.format( "%d of %s", DetectedItemsCount, DetectedItemsTypes ) )
|
||||
Task:SetInfo( "Coordinates", Detection:GetDetectedItemCoordinate( DetectedIndex ) )
|
||||
Task:SetInfo( "Changes", Detection:GetChangeText( DetectedItem ) )
|
||||
Task:SetInfo( "Object", DetectedSet:GetFirst() )
|
||||
Mission:AddTask( Task )
|
||||
else
|
||||
self:E("This should not happen")
|
||||
|
||||
@ -149,6 +149,7 @@ function POSITIONABLE:GetCoordinate()
|
||||
local PositionableVec3 = self:GetPositionVec3()
|
||||
|
||||
local PositionableCoordinate = COORDINATE:NewFromVec3( PositionableVec3 )
|
||||
PositionableCoordinate:SetHeading( self:GetHeading() )
|
||||
|
||||
self:T2( PositionableCoordinate )
|
||||
return PositionableCoordinate
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user