New static version

This commit is contained in:
FlightControl
2017-06-29 10:40:56 +02:00
parent 8e2e2e5a1e
commit ce688aabcb

View File

@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170626_2052' ) env.info( 'Moose Generation Timestamp: 20170629_1040' )
--- Various routines --- Various routines
-- @module routines -- @module routines
@@ -14419,7 +14419,6 @@ do -- FSM_PROCESS
-- Copy Processes -- Copy Processes
for ProcessID, Process in pairs( self:GetProcesses() ) do for ProcessID, Process in pairs( self:GetProcesses() ) do
self:E( { Process} )
if Process.fsm then if Process.fsm then
Process.fsm:Remove() Process.fsm:Remove()
Process.fsm = nil Process.fsm = nil
@@ -46071,8 +46070,9 @@ do -- Group Assignment
--- UnAssign the @{Task} from a @{Group}. --- UnAssign the @{Task} from a @{Group}.
-- @param #TASK self -- @param #TASK self
-- @param Wrapper.Group#GROUP TaskGroup
function TASK:UnAssignFromGroup( TaskGroup ) function TASK:UnAssignFromGroup( TaskGroup )
self:F2( { TaskGroup } ) self:F2( { TaskGroup = TaskGroup:GetName() } )
self:ClearGroupAssignment( TaskGroup ) self:ClearGroupAssignment( TaskGroup )
@@ -46080,7 +46080,7 @@ do -- Group Assignment
for UnitID, UnitData in pairs( TaskUnits ) do for UnitID, UnitData in pairs( TaskUnits ) do
local TaskUnit = UnitData -- Wrapper.Unit#UNIT local TaskUnit = UnitData -- Wrapper.Unit#UNIT
local PlayerName = TaskUnit:GetPlayerName() local PlayerName = TaskUnit:GetPlayerName()
if PlayerName ~= nil or PlayerName ~= "" then if PlayerName ~= nil and PlayerName ~= "" then -- Only remove units that have players!
self:UnAssignFromUnit( TaskUnit ) self:UnAssignFromUnit( TaskUnit )
end end
end end
@@ -46488,7 +46488,7 @@ end
-- @param Wrapper.Unit#UNIT TaskUnit -- @param Wrapper.Unit#UNIT TaskUnit
-- @return #TASK self -- @return #TASK self
function TASK:RemoveStateMachine( TaskUnit ) function TASK:RemoveStateMachine( TaskUnit )
self:F( { TaskUnit, self.Fsm[TaskUnit] ~= nil } ) self:F( { TaskUnit = TaskUnit:GetName(), HasFsm = ( self.Fsm[TaskUnit] ~= nil ) } )
--self:E( self.Fsm ) --self:E( self.Fsm )
--for TaskUnitT, Fsm in pairs( self.Fsm ) do --for TaskUnitT, Fsm in pairs( self.Fsm ) do
@@ -46497,13 +46497,16 @@ function TASK:RemoveStateMachine( TaskUnit )
--self.Fsm[TaskUnit] = nil --self.Fsm[TaskUnit] = nil
--end --end
self.Fsm[TaskUnit]:Remove() if self.Fsm[TaskUnit] then
self.Fsm[TaskUnit] = nil self.Fsm[TaskUnit]:Remove()
self.Fsm[TaskUnit] = nil
end
collectgarbage() collectgarbage()
self:E( "Garbage Collected, Processes should be finalized now ...") self:E( "Garbage Collected, Processes should be finalized now ...")
end end
--- Checks if there is a FiniteStateMachine assigned to Task@{Unit} for @{Task} --- Checks if there is a FiniteStateMachine assigned to Task@{Unit} for @{Task}
-- @param #TASK self -- @param #TASK self
-- @param Wrapper.Unit#UNIT TaskUnit -- @param Wrapper.Unit#UNIT TaskUnit