Got Task_SEAD template working with all the variations and complexity!

This commit is contained in:
FlightControl
2017-03-04 08:51:31 +01:00
parent 5ddeb8d396
commit b46d61d865
13 changed files with 68834 additions and 90 deletions

View File

@@ -192,9 +192,13 @@ end
--- Get the Task FSM Process Template
-- @param #TASK self
-- @return Core.Fsm#FSM_PROCESS
function TASK:GetUnitProcess()
function TASK:GetUnitProcess( TaskUnit )
return self.FsmTemplate
if TaskUnit then
return self:GetStateMachine( TaskUnit )
else
return self.FsmTemplate
end
end
--- Sets the Task FSM Process Template
@@ -661,15 +665,26 @@ end
--- Add a FiniteStateMachine to @{Task} with key Task@{Unit}
-- @param #TASK self
-- @param Wrapper.Unit#UNIT TaskUnit
-- @param Core.Fsm#FSM_PROCESS Fsm
-- @return #TASK self
function TASK:SetStateMachine( TaskUnit, Fsm )
self:F( { TaskUnit, self.Fsm[TaskUnit] ~= nil } )
self:F2( { TaskUnit, self.Fsm[TaskUnit] ~= nil, Fsm:GetClassNameAndID() } )
self.Fsm[TaskUnit] = Fsm
return Fsm
end
--- Gets the FiniteStateMachine of @{Task} with key Task@{Unit}
-- @param #TASK self
-- @param Wrapper.Unit#UNIT TaskUnit
-- @return Core.Fsm#FSM_PROCESS
function TASK:GetStateMachine( TaskUnit )
self:F2( { TaskUnit, self.Fsm[TaskUnit] ~= nil } )
return self.Fsm[TaskUnit]
end
--- Remove FiniteStateMachines from @{Task} with key Task@{Unit}
-- @param #TASK self
-- @param Wrapper.Unit#UNIT TaskUnit