Got mission dispatching working again with SEAD_Task and A2G_Task ...

Next is debugging all, and ensuring the scoring and Failed / Abort is
working.
This commit is contained in:
FlightControl
2016-11-24 14:55:07 +01:00
parent 35ac87109b
commit c27b6efe12
7 changed files with 52 additions and 34 deletions

View File

@@ -13,7 +13,6 @@ MISSION = {
Name = "",
MissionStatus = "PENDING",
_Clients = {},
Tasks = {},
TaskMenus = {},
TaskCategoryMenus = {},
TaskTypeMenus = {},
@@ -57,6 +56,9 @@ function MISSION:New( MissionName, MissionPriority, MissionBriefing, MissionCoal
self.MissionPriority = MissionPriority
self.MissionBriefing = MissionBriefing
self.MissionCoalition = MissionCoalition
self.Tasks = {}
setmetatable( self.Tasks, { __mode = "v" } )
return self
end
@@ -141,8 +143,7 @@ function MISSION:ClearMissionMenu()
end
--- Get the TASK identified by the TaskNumber from the Mission. This function is useful in GoalFunctions.
-- @param #string TaskIndex is the Index of the @{Task} within the @{Mission}.
-- @param #number TaskID is the ID of the @{Task} within the @{Mission}.
-- @param #string TaskName The Name of the @{Task} within the @{Mission}.
-- @return Task#TASK_BASE The Task
-- @return #nil Returns nil if no task was found.
function MISSION:GetTask( TaskName )
@@ -178,6 +179,7 @@ end
function MISSION:RemoveTask( Task )
local TaskName = Task:GetTaskName()
self:F( TaskName )
self.Tasks[TaskName] = self.Tasks[TaskName] or { n = 0 }
@@ -187,6 +189,8 @@ function MISSION:RemoveTask( Task )
self.Tasks[TaskName] = nil
Task = nil
collectgarbage()
return nil
end
@@ -406,7 +410,7 @@ end
function MISSION:GetTasks()
self:F()
return self._Tasks
return self.Tasks
end