mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Anapa airbase fixes
This commit is contained in:
parent
f8a5ebdadb
commit
4adf5aa188
@ -353,6 +353,7 @@ end
|
||||
-- @param #number Level
|
||||
function BASE:TraceLevel( Level )
|
||||
_TraceLevel = Level
|
||||
self:E( "Tracing level " .. Level )
|
||||
end
|
||||
|
||||
--- Set tracing for a class
|
||||
@ -361,6 +362,7 @@ end
|
||||
function BASE:TraceClass( Class )
|
||||
_TraceClass[Class] = true
|
||||
_TraceClassMethod[Class] = {}
|
||||
self:E( "Tracing class " .. Class )
|
||||
end
|
||||
|
||||
--- Set tracing for a specific method of class
|
||||
@ -373,6 +375,7 @@ function BASE:TraceClassMethod( Class, Method )
|
||||
_TraceClassMethod[Class].Method = {}
|
||||
end
|
||||
_TraceClassMethod[Class].Method[Method] = true
|
||||
self:E( "Tracing method " .. Method .. " of class " .. Class )
|
||||
end
|
||||
|
||||
--- Trace a function call. Must be at the beginning of the function logic.
|
||||
|
||||
@ -282,6 +282,9 @@ end
|
||||
-- This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined:
|
||||
-- SpawnCountryID, SpawnCategoryID
|
||||
-- This method is used by the SPAWN class.
|
||||
-- @param #DATABASE self
|
||||
-- @param #table SpawnTemplate
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:Spawn( SpawnTemplate )
|
||||
self:F( SpawnTemplate.name )
|
||||
|
||||
@ -330,7 +333,10 @@ function DATABASE:GetStatusGroup( GroupName )
|
||||
end
|
||||
end
|
||||
|
||||
--- Registers new Group Templates within the DATABASE Object.
|
||||
--- Private method that registers new Group Templates within the DATABASE Object.
|
||||
-- @param #DATABASE self
|
||||
-- @param #table GroupTemplate
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:_RegisterGroup( GroupTemplate )
|
||||
|
||||
local GroupTemplateName = env.getValueDictByKey(GroupTemplate.name)
|
||||
|
||||
@ -457,6 +457,8 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
|
||||
_EVENTDISPATCHER:OnEngineShutDownForTemplate( self.SpawnGroups[self.SpawnIndex].SpawnTemplate, self._OnEngineShutDown, self )
|
||||
end
|
||||
|
||||
self:T( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
|
||||
self.SpawnGroups[self.SpawnIndex].Group = _DATABASE:Spawn( self.SpawnGroups[self.SpawnIndex].SpawnTemplate )
|
||||
|
||||
-- If there is a SpawnFunction hook defined, call it.
|
||||
@ -907,7 +909,6 @@ function SPAWN:_InitializeSpawnGroups( SpawnIndex )
|
||||
self.SpawnGroups[SpawnIndex].Visible = false
|
||||
self.SpawnGroups[SpawnIndex].Spawned = false
|
||||
self.SpawnGroups[SpawnIndex].UnControlled = false
|
||||
self.SpawnGroups[SpawnIndex].Spawned = false
|
||||
self.SpawnGroups[SpawnIndex].SpawnTime = 0
|
||||
|
||||
self.SpawnGroups[SpawnIndex].SpawnTemplatePrefix = self.SpawnTemplatePrefix
|
||||
@ -961,6 +962,9 @@ end
|
||||
|
||||
--- Gets the Group Template from the ME environment definition.
|
||||
-- This method used the @{DATABASE} object, which contains ALL initial and new spawned object in MOOSE.
|
||||
-- @param #SPAWN self
|
||||
-- @param #string SpawnTemplatePrefix
|
||||
-- @return @SPAWN self
|
||||
function SPAWN:_GetTemplate( SpawnTemplatePrefix )
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } )
|
||||
|
||||
@ -981,6 +985,10 @@ function SPAWN:_GetTemplate( SpawnTemplatePrefix )
|
||||
end
|
||||
|
||||
--- Prepares the new Group Template.
|
||||
-- @param #SPAWN self
|
||||
-- @param #string SpawnTemplatePrefix
|
||||
-- @param #number SpawnIndex
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } )
|
||||
|
||||
@ -991,6 +999,7 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex )
|
||||
SpawnTemplate.lateActivation = false
|
||||
|
||||
if SpawnTemplate.SpawnCategoryID == Group.Category.GROUND then
|
||||
self:T( "For ground units, visible needs to be false..." )
|
||||
SpawnTemplate.visible = false
|
||||
end
|
||||
|
||||
@ -1010,7 +1019,7 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex )
|
||||
|
||||
end
|
||||
|
||||
--- Internal function randomizing the routes.
|
||||
--- Private method randomizing the routes.
|
||||
-- @param #SPAWN self
|
||||
-- @param #number SpawnIndex The index of the group to be spawned.
|
||||
-- @return #SPAWN
|
||||
@ -1034,7 +1043,10 @@ function SPAWN:_RandomizeRoute( SpawnIndex )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Private method that randomizes the template of the group.
|
||||
-- @param #SPAWN self
|
||||
-- @param #number SpawnIndex
|
||||
-- @return #SPAWN self
|
||||
function SPAWN:_RandomizeTemplate( SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, SpawnIndex } )
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user