mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
SPAWN
This commit is contained in:
parent
13309663fb
commit
5adb943939
@ -1467,6 +1467,30 @@ do -- Delay methods
|
|||||||
|
|
||||||
end -- Delay methods
|
end -- Delay methods
|
||||||
|
|
||||||
|
--- Hide the group on the map view (visible to game master slots!).
|
||||||
|
-- @param #SPAWN self
|
||||||
|
-- @return #SPAWN The SPAWN object
|
||||||
|
function SPAWN:InitHiddenOnMap()
|
||||||
|
self.SpawnHiddenOnMap = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Hide the group on MFDs (visible to game master slots!).
|
||||||
|
-- @param #SPAWN self
|
||||||
|
-- @return #SPAWN The SPAWN object
|
||||||
|
function SPAWN:InitHiddenOnMFD()
|
||||||
|
self.SpawnHiddenOnMFD = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Hide the group on planner (visible to game master slots!).
|
||||||
|
-- @param #SPAWN self
|
||||||
|
-- @return #SPAWN The SPAWN object
|
||||||
|
function SPAWN:InitHiddenOnPlanner()
|
||||||
|
self.SpawnHiddenOnPlanner = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Will spawn a group based on the internal index.
|
--- Will spawn a group based on the internal index.
|
||||||
-- Note: This method uses the global _DATABASE object (an instance of @{Core.Database#DATABASE}), which contains ALL initial and new spawned objects in MOOSE.
|
-- Note: This method uses the global _DATABASE object (an instance of @{Core.Database#DATABASE}), which contains ALL initial and new spawned objects in MOOSE.
|
||||||
-- @param #SPAWN self
|
-- @param #SPAWN self
|
||||||
@ -1741,6 +1765,21 @@ function SPAWN:SpawnWithIndex( SpawnIndex, NoBirth )
|
|||||||
SpawnTemplate.modulation = self.SpawnInitModu
|
SpawnTemplate.modulation = self.SpawnInitModu
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- hiding options
|
||||||
|
if self.SpawnHiddenOnPlanner then
|
||||||
|
SpawnTemplate.hiddenOnPlanner=true
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.SpawnHiddenOnMFD then
|
||||||
|
SpawnTemplate.hiddenOnMFD=true
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.SpawnHiddenOnMap then
|
||||||
|
SpawnTemplate.hidden=true
|
||||||
|
end
|
||||||
|
|
||||||
|
self:I(SpawnTemplate)
|
||||||
|
|
||||||
-- Set country, coalition and category.
|
-- Set country, coalition and category.
|
||||||
SpawnTemplate.CategoryID = self.SpawnInitCategory or SpawnTemplate.CategoryID
|
SpawnTemplate.CategoryID = self.SpawnInitCategory or SpawnTemplate.CategoryID
|
||||||
SpawnTemplate.CountryID = self.SpawnInitCountry or SpawnTemplate.CountryID
|
SpawnTemplate.CountryID = self.SpawnInitCountry or SpawnTemplate.CountryID
|
||||||
@ -3808,7 +3847,6 @@ end
|
|||||||
-- @param #number SpawnIndex Spawn index.
|
-- @param #number SpawnIndex Spawn index.
|
||||||
-- @return #number self.SpawnIndex
|
-- @return #number self.SpawnIndex
|
||||||
function SPAWN:_GetSpawnIndex( SpawnIndex )
|
function SPAWN:_GetSpawnIndex( SpawnIndex )
|
||||||
self:T("_GetSpawnIndex")
|
|
||||||
self:F2( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } )
|
self:F2( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } )
|
||||||
|
|
||||||
if (self.SpawnMaxGroups == 0) or (SpawnIndex <= self.SpawnMaxGroups) then
|
if (self.SpawnMaxGroups == 0) or (SpawnIndex <= self.SpawnMaxGroups) then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user