MP bugfix

This commit is contained in:
FlightControl 2016-12-15 10:14:53 +01:00
parent b65bdad54f
commit 80f7269651
3 changed files with 6 additions and 2 deletions

View File

@ -179,10 +179,11 @@ end
--- Sets the menu structure of the Missions governed by the HQ command center.
-- @param #COMMANDCENTER self
function COMMANDCENTER:SetMenu()
self:F()
self.CommandCenterMenu = self.CommandCenterMenu or MENU_COALITION:New( self.CommandCenterCoalition, "HQ" )
for MissionID, Mission in pairs( self.Missions ) do
for MissionID, Mission in pairs( self:GetMissions() ) do
local Mission = Mission -- Tasking.Mission#MISSION
Mission:SetMenu()
end

View File

@ -201,8 +201,9 @@ end
-- @param #MISSION self
-- @param Core.Menu#MENU_COALITION CommandCenterMenu
function MISSION:SetMenu()
self:F()
for _, Task in pairs( self.Tasks ) do
for _, Task in pairs( self:GetTasks() ) do
local Task = Task -- Tasking.Task#TASK_BASE
Task:SetMenu()
end

View File

@ -521,7 +521,9 @@ end
--- Set the menu options of the @{Task} to all the groups in the SetGroup.
-- @param #TASK_BASE self
function TASK_BASE:SetMenu()
self:F()
self.SetGroup:Flush()
for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do
if self:IsStatePlanned() or self:IsStateReplanned() then
self:SetMenuForGroup( TaskGroup )