From 0147c3a17cabb04476506954e2f065d652282dc5 Mon Sep 17 00:00:00 2001 From: FlightControl_Master Date: Mon, 5 Mar 2018 11:49:05 +0100 Subject: [PATCH] Revised the Command Center menu generation for MP and in SP when coming back from spectators or when changing the slot. --- Moose Development/Moose/Tasking/CommandCenter.lua | 10 ++++++---- Moose Development/Moose/Tasking/Mission.lua | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Tasking/CommandCenter.lua b/Moose Development/Moose/Tasking/CommandCenter.lua index 17da2e26c..92454df18 100644 --- a/Moose Development/Moose/Tasking/CommandCenter.lua +++ b/Moose Development/Moose/Tasking/CommandCenter.lua @@ -107,7 +107,7 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName ) local MenuReporting = MENU_GROUP:New( EventGroup, "Missions Reports", CommandCenterMenu ) local MenuMissionsSummary = MENU_GROUP_COMMAND:New( EventGroup, "Missions Status Report", MenuReporting, self.ReportMissionsStatus, self, EventGroup ) local MenuMissionsDetails = MENU_GROUP_COMMAND:New( EventGroup, "Missions Players Report", MenuReporting, self.ReportMissionsPlayers, self, EventGroup ) - self:ReportMissionsStatus( EventGroup ) + self:ReportSummary( EventGroup ) local PlayerUnit = EventData.IniUnit for MissionID, Mission in pairs( self:GetMissions() ) do local Mission = Mission -- Tasking.Mission#MISSION @@ -404,16 +404,18 @@ end --- Report the status of all MISSIONs to a GROUP. -- Each Mission is listed, with an indication how many Tasks are still to be completed. -- @param #COMMANDCENTER self -function COMMANDCENTER:ReportMissionsStatus( ReportGroup ) +function COMMANDCENTER:ReportSummary( ReportGroup ) self:E( ReportGroup ) local Report = REPORT:New() - Report:Add( "Status report of all missions." ) + -- List the name of the mission. + local Name = self:GetName() + Report:Add( string.format( '%s - Report Summary Missions', Name ) ) for MissionID, Mission in pairs( self.Missions ) do local Mission = Mission -- Tasking.Mission#MISSION - Report:Add( " - " .. Mission:ReportStatus() ) + Report:Add( " - " .. Mission:ReportSummary() ) end self:MessageToGroup( Report:Text(), ReportGroup ) diff --git a/Moose Development/Moose/Tasking/Mission.lua b/Moose Development/Moose/Tasking/Mission.lua index 14551e5fd..337c42a16 100644 --- a/Moose Development/Moose/Tasking/Mission.lua +++ b/Moose Development/Moose/Tasking/Mission.lua @@ -739,7 +739,7 @@ end -- -- @param #MISSION self -- @return #string -function MISSION:ReportStatus() +function MISSION:ReportSummary() local Report = REPORT:New()