mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Urgent fixes
* DESIGNATE: Messages not appearing correctly and crashing the logic is fixed. (due to a stupid typo). * TASK_A2G: Tasking is fixed. Status menus are now displayed properly. Also when the task is planned. * MENU_COMMAND: I found now why DCS is displayer "error in error handler" sometimes when a menu was selected. The error handler is DCS is bugged, so made my own one.
This commit is contained in:
@@ -888,6 +888,8 @@ end
|
||||
-- @return #string
|
||||
function MISSION:ReportOverview( ReportGroup, TaskStatus )
|
||||
|
||||
self:F( { TaskStatus = TaskStatus } )
|
||||
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
|
||||
@@ -366,7 +366,8 @@ do -- TASK_A2G_SEAD
|
||||
end
|
||||
|
||||
function TASK_A2G_SEAD:ReportOrder( ReportGroup )
|
||||
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||
local Coordinate = self:GetInfo( "Coordinates" )
|
||||
--local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||
|
||||
return Distance
|
||||
@@ -515,7 +516,8 @@ do -- TASK_A2G_BAI
|
||||
|
||||
|
||||
function TASK_A2G_BAI:ReportOrder( ReportGroup )
|
||||
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||
local Coordinate = self:GetInfo( "Coordinates" )
|
||||
--local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||
|
||||
return Distance
|
||||
@@ -630,9 +632,9 @@ do -- TASK_A2G_CAS
|
||||
|
||||
function TASK_A2G_CAS:UpdateTaskInfo()
|
||||
|
||||
local TargetCoordinate = self.Detection and self.Detection:GetDetectedItemCoordinate( self.DetectedItemIndex ) or self.TargetSetUnit:GetFirst():GetCoordinate()
|
||||
local TargetCoordinate = ( self.Detection and self.Detection:GetDetectedItemCoordinate( self.DetectedItemIndex ) ) or self.TargetSetUnit:GetFirst():GetCoordinate()
|
||||
self:SetInfo( "Coordinates", TargetCoordinate, 0 )
|
||||
|
||||
|
||||
local ThreatLevel, ThreatText
|
||||
if self.Detection then
|
||||
ThreatLevel, ThreatText = self.Detection:GetDetectedItemThreatLevel( self.DetectedItemIndex )
|
||||
@@ -661,8 +663,10 @@ do -- TASK_A2G_CAS
|
||||
|
||||
end
|
||||
|
||||
function TASK_A2G_CAS:ReportOrder( ReportGroup )
|
||||
local Coordinate = self.TaskInfo.Coordinates.TaskInfoText
|
||||
--- @param #TASK_A2G_CAS self
|
||||
function TASK_A2G_CAS:ReportOrder( ReportGroup )
|
||||
|
||||
local Coordinate = self:GetInfo( "Coordinates" )
|
||||
local Distance = ReportGroup:GetCoordinate():Get2DDistance( Coordinate )
|
||||
|
||||
return Distance
|
||||
|
||||
@@ -372,6 +372,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
self.Tasks[TaskIndex] = Task
|
||||
Task:SetTargetZone( DetectedZone )
|
||||
Task:SetDispatcher( self )
|
||||
Task:UpdateTaskInfo()
|
||||
Mission:AddTask( Task )
|
||||
|
||||
TaskReport:Add( Task:GetName() )
|
||||
|
||||
Reference in New Issue
Block a user