diff --git a/Moose Development/Moose/Tasking/CommandCenter.lua b/Moose Development/Moose/Tasking/CommandCenter.lua index 2aa6317a6..be6e01522 100644 --- a/Moose Development/Moose/Tasking/CommandCenter.lua +++ b/Moose Development/Moose/Tasking/CommandCenter.lua @@ -100,7 +100,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName ) function( self, EventData ) if EventData.IniObjectCategory == 1 then local EventGroup = GROUP:Find( EventData.IniDCSGroup ) - self:E( { CommandCenter = self:GetName(), EventGroup = EventGroup, HasGroup = self:HasGroup( EventGroup ), EventData = EventData } ) + self:E( { CommandCenter = self:GetName(), EventGroup = EventGroup:GetName(), HasGroup = self:HasGroup( EventGroup ), EventData = EventData } ) if EventGroup and self:HasGroup( EventGroup ) then local CommandCenterMenu = MENU_GROUP:New( EventGroup, "Command Center (" .. self:GetName() .. ")" ) local MenuReporting = MENU_GROUP:New( EventGroup, "Missions Reports", CommandCenterMenu ) diff --git a/Moose Development/Moose/Tasking/Mission.lua b/Moose Development/Moose/Tasking/Mission.lua index 44de4ee3f..06a7e7d9b 100644 --- a/Moose Development/Moose/Tasking/Mission.lua +++ b/Moose Development/Moose/Tasking/Mission.lua @@ -739,57 +739,57 @@ function MISSION:ReportBriefing() end ---- Create a status report of the Mission. --- This reports provides a one liner of the mission status. It indicates how many players and how many Tasks. --- --- Mission "" - Status "" --- - Task Types: , --- - Planned Tasks (xp) --- - Assigned Tasks(xp) --- - Success Tasks (xp) --- - Hold Tasks (xp) --- - Cancelled Tasks (xp) --- - Aborted Tasks (xp) --- - Failed Tasks (xp) --- --- @param #MISSION self --- @return #string -function MISSION:ReportSummary() - - local Report = REPORT:New() - - -- List the name of the mission. - local Name = self:GetText() - - -- Determine the status of the mission. - local Status = "<" .. self:GetState() .. ">" - - Report:Add( string.format( '%s - Status "%s"', Name, Status ) ) - - local TaskTypes = self:GetTaskTypes() - - Report:Add( string.format( " - Task Types: %s", table.concat(TaskTypes, ", " ) ) ) - - local TaskStatusList = { "Planned", "Assigned", "Success", "Hold", "Cancelled", "Aborted", "Failed" } - - for TaskStatusID, TaskStatus in pairs( TaskStatusList ) do - local TaskCount = 0 - local TaskPlayerCount = 0 - -- Determine how many tasks are remaining. - for TaskID, Task in pairs( self:GetTasks() ) do - local Task = Task -- Tasking.Task#TASK - if Task:Is( TaskStatus ) then - TaskCount = TaskCount + 1 - TaskPlayerCount = TaskPlayerCount + Task:GetPlayerCount() - end - end - if TaskCount > 0 then - Report:Add( string.format( " - %02d %s Tasks (%dp)", TaskCount, TaskStatus, TaskPlayerCount ) ) - end - end - - return Report:Text() -end +----- Create a status report of the Mission. +---- This reports provides a one liner of the mission status. It indicates how many players and how many Tasks. +---- +---- Mission "" - Status "" +---- - Task Types: , +---- - Planned Tasks (xp) +---- - Assigned Tasks(xp) +---- - Success Tasks (xp) +---- - Hold Tasks (xp) +---- - Cancelled Tasks (xp) +---- - Aborted Tasks (xp) +---- - Failed Tasks (xp) +---- +---- @param #MISSION self +---- @return #string +--function MISSION:ReportSummary() +-- +-- local Report = REPORT:New() +-- +-- -- List the name of the mission. +-- local Name = self:GetText() +-- +-- -- Determine the status of the mission. +-- local Status = "<" .. self:GetState() .. ">" +-- +-- Report:Add( string.format( '%s - Status "%s"', Name, Status ) ) +-- +-- local TaskTypes = self:GetTaskTypes() +-- +-- Report:Add( string.format( " - Task Types: %s", table.concat(TaskTypes, ", " ) ) ) +-- +-- local TaskStatusList = { "Planned", "Assigned", "Success", "Hold", "Cancelled", "Aborted", "Failed" } +-- +-- for TaskStatusID, TaskStatus in pairs( TaskStatusList ) do +-- local TaskCount = 0 +-- local TaskPlayerCount = 0 +-- -- Determine how many tasks are remaining. +-- for TaskID, Task in pairs( self:GetTasks() ) do +-- local Task = Task -- Tasking.Task#TASK +-- if Task:Is( TaskStatus ) then +-- TaskCount = TaskCount + 1 +-- TaskPlayerCount = TaskPlayerCount + Task:GetPlayerCount() +-- end +-- end +-- if TaskCount > 0 then +-- Report:Add( string.format( " - %02d %s Tasks (%dp)", TaskCount, TaskStatus, TaskPlayerCount ) ) +-- end +-- end +-- +-- return Report:Text() +--end --- Create an active player report of the Mission. diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 5b2f86deb..e8ae381a1 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -1401,6 +1401,8 @@ do -- Reporting -- @return #string function TASK:ReportSummary( ReportGroup ) + self:UpdateTaskInfo( self.DetectedItem ) + local Report = REPORT:New() -- List the name of the Task. diff --git a/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua b/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua index 9561dc568..a3fc20c88 100644 --- a/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua +++ b/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua @@ -539,16 +539,19 @@ do -- TASK_A2A_DISPATCHER if TargetSetUnit then Task = TASK_A2A_ENGAGE:New( Mission, self.SetGroup, string.format( "ENGAGE.%03d", DetectedID ), TargetSetUnit ) Task:SetDetection( Detection, DetectedItem ) + Task:UpdateTaskInfo( DetectedItem ) else local TargetSetUnit = self:EvaluateINTERCEPT( DetectedItem ) -- Returns a SetUnit if there are targets to be INTERCEPTed... if TargetSetUnit then Task = TASK_A2A_INTERCEPT:New( Mission, self.SetGroup, string.format( "INTERCEPT.%03d", DetectedID ), TargetSetUnit ) Task:SetDetection( Detection, DetectedItem ) + Task:UpdateTaskInfo( DetectedItem ) else local TargetSetUnit = self:EvaluateSWEEP( DetectedItem ) -- Returns a SetUnit if TargetSetUnit then Task = TASK_A2A_SWEEP:New( Mission, self.SetGroup, string.format( "SWEEP.%03d", DetectedID ), TargetSetUnit ) Task:SetDetection( Detection, DetectedItem ) + Task:UpdateTaskInfo( DetectedItem ) end end end