Progress implementing teh SETTINGS class and coordinates per Controllable of the player

This commit is contained in:
FlightControl
2017-05-20 13:32:21 +02:00
parent 5fd4f96fc8
commit 96fdf72400
10 changed files with 119 additions and 87 deletions

View File

@@ -184,18 +184,8 @@ do -- TASK_A2A_DISPATCHER
if Task then
self.Tasks[DetectedID] = Task
Task:SetTargetZone( DetectedZone )
Task:SetTargetZone( DetectedZone, DetectedSet:GetFirst():GetAltitude(), DetectedSet:GetFirst():GetHeading() )
Task:SetDispatcher( self )
Task:SetInfo( "ThreatLevel", "[" .. string.rep( "", DetectedSet:CalculateThreatLevelA2G() ) .. "]" )
local DetectedItemsCount = DetectedSet:Count()
local DetectedItemsTypes = DetectedSet:GetTypeNames()
Task:SetInfo( "Targets", string.format( "%d of %s", DetectedItemsCount, DetectedItemsTypes ) )
local Coordinate = Detection:GetDetectedItemCoordinate( DetectedIndex )
Coordinate:SetModeA2A()
Task:SetInfo( "Coordinates", Coordinate )
Task:SetInfo( "Object", DetectedSet:GetFirst() )
Mission:AddTask( Task )
else
self:E("This should not happen")