AIRBOSS, RECOVERYTANKER, RESCUEHELO, RANGE

AIRBOSS v0.9.3
RECOVERYTANKER v1.0.6
RESCUEHELO v1.0.4
RANGE v1.2.4
SPAWN added modex
GROUP added modex respawn
This commit is contained in:
Frank
2019-01-30 20:10:41 +01:00
parent bcfa0f9ac5
commit e325b2192b
9 changed files with 533 additions and 178 deletions

View File

@@ -325,6 +325,7 @@ function SPAWN:New( SpawnTemplatePrefix )
self.SpawnInitFreq = nil -- No special frequency.
self.SpawnInitModu = nil -- No special modulation.
self.SpawnInitRadio = nil -- No radio comms setting.
self.SpawnInitModex = nil
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
else
@@ -376,6 +377,7 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
self.SpawnInitFreq = nil -- No special frequency.
self.SpawnInitModu = nil -- No special modulation.
self.SpawnInitRadio = nil -- No radio comms setting.
self.SpawnInitModex = nil
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
else
@@ -430,6 +432,7 @@ function SPAWN:NewFromTemplate( SpawnTemplate, SpawnTemplatePrefix, SpawnAliasPr
self.SpawnInitFreq = nil -- No special frequency.
self.SpawnInitModu = nil -- No special modulation.
self.SpawnInitRadio = nil -- No radio comms setting.
self.SpawnInitModex = nil
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
else
@@ -642,6 +645,19 @@ function SPAWN:InitRadioModulation(modulation)
return self
end
--- Sets the modex of the first unit of the group. If more units are in the group, the number is increased by one with every unit.
-- @param #SPAWN self
-- @param #number modex Modex of the first unit.
-- @return #SPAWN self
function SPAWN:InitModex(modex)
if modex then
self.SpawnInitModex=tonumber(modex)
end
return self
end
--- Randomizes the defined route of the SpawnTemplatePrefix group in the ME. This is very useful to define extra variation of the behaviour of groups.
-- @param #SPAWN self
@@ -1218,7 +1234,13 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
SpawnTemplate.units[UnitID].skill = self.SpawnInitSkill
end
end
-- Set tail number.
if self.SpawnInitModex then
for UnitID = 1, #SpawnTemplate.units do
SpawnTemplate.units[UnitID].onboard_num = string.format("%03d", self.SpawnInitModex+(UnitID-1))
end
end
-- Set radio comms on/off.
if self.SpawnInitRadio then