diff --git a/Moose Development/Moose/Tasking/CommandCenter.lua b/Moose Development/Moose/Tasking/CommandCenter.lua index 2aca73ee0..86d33447f 100644 --- a/Moose Development/Moose/Tasking/CommandCenter.lua +++ b/Moose Development/Moose/Tasking/CommandCenter.lua @@ -111,6 +111,17 @@ function COMMANDCENTER:RemoveMission( Mission ) return Mission end +--- Sets the menu structure of the Missions governed by the HQ command center. +-- @param #COMMANDCENTER self +function COMMANDCENTER:SetMenu() + + for MissionID, Mission in pairs( self.Missions ) do + local Mission = Mission -- Tasking.Mission#MISSION + Mission:SetMenu() + end +end + + --- Checks of the COMMANDCENTER has a GROUP. -- @param #COMMANDCENTER self -- @param Wrapper.Group#GROUP diff --git a/Moose Development/Moose/Tasking/DetectionManager.lua b/Moose Development/Moose/Tasking/DetectionManager.lua index 22ac4c2d9..15b919889 100644 --- a/Moose Development/Moose/Tasking/DetectionManager.lua +++ b/Moose Development/Moose/Tasking/DetectionManager.lua @@ -1,4 +1,4 @@ ---- This module contains the DETECTION_MANAGER class and derived classes. +-- This module contains the DETECTION_MANAGER class and derived classes. -- -- === -- @@ -426,7 +426,7 @@ do -- DETECTION_DISPATCHER end if SEADTask and SEADTask:IsStatePlanned() then self:E( "Planned" ) - SEADTask:SetPlannedMenu() + --SEADTask:SetPlannedMenu() TaskMsg[#TaskMsg+1] = " - " .. SEADTask:GetStateString() .. " SEAD " .. AreaID .. " - " .. SEADTask.TargetSetUnit:GetUnitTypesText() end @@ -440,7 +440,7 @@ do -- DETECTION_DISPATCHER end end if CASTask and CASTask:IsStatePlanned() then - CASTask:SetPlannedMenu() + --CASTask:SetPlannedMenu() TaskMsg[#TaskMsg+1] = " - " .. CASTask:GetStateString() .. " CAS " .. AreaID .. " - " .. CASTask.TargetSetUnit:GetUnitTypesText() end @@ -454,7 +454,7 @@ do -- DETECTION_DISPATCHER end end if BAITask and BAITask:IsStatePlanned() then - BAITask:SetPlannedMenu() + --BAITask:SetPlannedMenu() TaskMsg[#TaskMsg+1] = " - " .. BAITask:GetStateString() .. " BAI " .. AreaID .. " - " .. BAITask.TargetSetUnit:GetUnitTypesText() end @@ -486,7 +486,7 @@ do -- DETECTION_DISPATCHER end -- TODO set menus using the HQ coordinator - --Mission:SetMenu() + Mission:SetMenu() if #AreaMsg > 0 then for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do diff --git a/Moose Development/Moose/Tasking/Mission.lua b/Moose Development/Moose/Tasking/Mission.lua index 455b8405f..704c83817 100644 --- a/Moose Development/Moose/Tasking/Mission.lua +++ b/Moose Development/Moose/Tasking/Mission.lua @@ -118,15 +118,13 @@ end --- Sets the Planned Task menu. -- @param #MISSION self -function MISSION:SetPlannedMenu() +function MISSION:SetMenu() - self:E( self.Tasks ) - for _, TaskData in pairs( self.Tasks ) do - local Task = TaskData -- Tasking.Task#TASK_BASE + for _, Task in pairs( self.Tasks ) do + local Task = Task -- Tasking.Task#TASK_BASE Task:RemoveMenu() - Task:SetPlannedMenu() + Task:SetMenu() end - end --- Sets the Assigned Task menu. diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index a59dfeff1..827134460 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -142,7 +142,6 @@ function TASK_BASE:AssignToGroup( TaskGroup ) TaskGroup:SetState( TaskGroup, "Assigned", self ) - self:RemoveMenuForGroup( TaskGroup ) self:SetAssignedMenuForGroup( TaskGroup ) local TaskUnits = TaskGroup:GetUnits() @@ -288,23 +287,13 @@ end --- Set the menu options of the @{Task} to all the groups in the SetGroup. -- @param #TASK_BASE self -- @return #TASK_BASE self -function TASK_BASE:SetPlannedMenu() +function TASK_BASE:SetMenu() - local MenuText = self:GetPlannedMenuText() for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do if not self:IsAssignedToGroup( TaskGroup ) then + local MenuText = self:GetPlannedMenuText() self:SetPlannedMenuForGroup( TaskGroup, MenuText ) - end - end -end - ---- Set the menu options of the @{Task} to all the groups in the SetGroup. --- @param #TASK_BASE self --- @return #TASK_BASE self -function TASK_BASE:SetAssignedMenu() - - for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do - if self:IsAssignedToGroup( TaskGroup ) then + else self:SetAssignedMenuForGroup( TaskGroup ) end end @@ -317,9 +306,11 @@ function TASK_BASE:RemoveMenu() for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do self:RemoveMenuForGroup( TaskGroup ) - end + end end + + --- Set the planned menu option of the @{Task}. -- @param #TASK_BASE self -- @param Group#GROUP TaskGroup diff --git a/Moose Training/Presentations/DCS World - MOOSE - Tasking - SEAD.pptx b/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking - SEAD - kopie.pptx similarity index 100% rename from Moose Training/Presentations/DCS World - MOOSE - Tasking - SEAD.pptx rename to Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking - SEAD - kopie.pptx diff --git a/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking - SEAD.pptx b/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking - SEAD.pptx new file mode 100644 index 000000000..6ca6f477a Binary files /dev/null and b/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking - SEAD.pptx differ diff --git a/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking.pptx b/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking.pptx new file mode 100644 index 000000000..22e2c55a3 Binary files /dev/null and b/Moose Training/Presentations/Tasking/DCS World - MOOSE - Tasking.pptx differ