mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
1c293c2f62
@ -1037,13 +1037,21 @@ function DATABASE:_RegisterGroupTemplate( GroupTemplate, CoalitionSide, Category
|
|||||||
if UnitTemplate.AddPropAircraft then
|
if UnitTemplate.AddPropAircraft then
|
||||||
if UnitTemplate.AddPropAircraft.STN_L16 then
|
if UnitTemplate.AddPropAircraft.STN_L16 then
|
||||||
local stn = UTILS.OctalToDecimal(UnitTemplate.AddPropAircraft.STN_L16)
|
local stn = UTILS.OctalToDecimal(UnitTemplate.AddPropAircraft.STN_L16)
|
||||||
self.STNS[stn] = UnitTemplate.name
|
if stn == nil or stn < 1 then
|
||||||
self:I("Register STN "..tostring(UnitTemplate.AddPropAircraft.STN_L16).." for ".. UnitTemplate.name)
|
self:E("WARNING: Invalid STN "..tostring(UnitTemplate.AddPropAircraft.STN_L16).." for ".. UnitTemplate.name)
|
||||||
|
else
|
||||||
|
self.STNS[stn] = UnitTemplate.name
|
||||||
|
self:I("Register STN "..tostring(UnitTemplate.AddPropAircraft.STN_L16).." for ".. UnitTemplate.name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if UnitTemplate.AddPropAircraft.SADL_TN then
|
if UnitTemplate.AddPropAircraft.SADL_TN then
|
||||||
local sadl = UTILS.OctalToDecimal(UnitTemplate.AddPropAircraft.SADL_TN)
|
local sadl = UTILS.OctalToDecimal(UnitTemplate.AddPropAircraft.SADL_TN)
|
||||||
self.SADL[sadl] = UnitTemplate.name
|
if sadl == nil or sadl < 1 then
|
||||||
self:I("Register SADL "..tostring(UnitTemplate.AddPropAircraft.SADL_TN).." for ".. UnitTemplate.name)
|
self:E("WARNING: Invalid SADL "..tostring(UnitTemplate.AddPropAircraft.STN_L16).." for ".. UnitTemplate.name)
|
||||||
|
else
|
||||||
|
self.SADL[sadl] = UnitTemplate.name
|
||||||
|
self:I("Register SADL "..tostring(UnitTemplate.AddPropAircraft.SADL_TN).." for ".. UnitTemplate.name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -200,6 +200,11 @@
|
|||||||
-- * @{#SPAWN.InitRepeat}() or @{#SPAWN.InitRepeatOnLanding}(): This method is used to re-spawn automatically the same group after it has landed.
|
-- * @{#SPAWN.InitRepeat}() or @{#SPAWN.InitRepeatOnLanding}(): This method is used to re-spawn automatically the same group after it has landed.
|
||||||
-- * @{#SPAWN.InitRepeatOnEngineShutDown}(): This method is used to re-spawn automatically the same group after it has landed and it shuts down the engines at the ramp.
|
-- * @{#SPAWN.InitRepeatOnEngineShutDown}(): This method is used to re-spawn automatically the same group after it has landed and it shuts down the engines at the ramp.
|
||||||
--
|
--
|
||||||
|
-- ### Link-16 Datalink STN and SADL IDs (limited at the moment to F15/16/18/AWACS/Tanker/B1B, but not the F15E for clients, SADL A10CII only)
|
||||||
|
--
|
||||||
|
-- *{#SPAWN.InitSTN}(): Set the STN of the first unit in the group. All other units will have consecutive STNs, provided they have not been used yet.
|
||||||
|
-- *{#SPAWN.InitSADL}(): Set the SADL of the first unit in the group. All other units will have consecutive SADLs, provided they have not been used yet.
|
||||||
|
--
|
||||||
-- ## SPAWN **Spawn** methods
|
-- ## SPAWN **Spawn** methods
|
||||||
--
|
--
|
||||||
-- Groups can be spawned at different times and methods:
|
-- Groups can be spawned at different times and methods:
|
||||||
@ -782,12 +787,16 @@ end
|
|||||||
|
|
||||||
--- [Airplane - F15/16/18/AWACS/B1B/Tanker only] Set the STN Link16 starting number of the Group; each unit of the spawned group will have a consecutive STN set.
|
--- [Airplane - F15/16/18/AWACS/B1B/Tanker only] Set the STN Link16 starting number of the Group; each unit of the spawned group will have a consecutive STN set.
|
||||||
-- @param #SPAWN self
|
-- @param #SPAWN self
|
||||||
-- @param #number Octal The octal number (digits 1..7, max 5 digits, i.e. 77777) to set the STN to. Every STN needs to be unique!
|
-- @param #number Octal The octal number (digits 1..7, max 5 digits, i.e. 1..77777) to set the STN to. Every STN needs to be unique!
|
||||||
-- @return #SPAWN self
|
-- @return #SPAWN self
|
||||||
function SPAWN:InitSTN(Octal)
|
function SPAWN:InitSTN(Octal)
|
||||||
self:F( { Octal = Octal } )
|
self:F( { Octal = Octal } )
|
||||||
self.SpawnInitSTN = Octal or 77777
|
self.SpawnInitSTN = Octal or 77777
|
||||||
local num = UTILS.OctalToDecimal(Octal)
|
local num = UTILS.OctalToDecimal(Octal)
|
||||||
|
if num == nil or num < 1 then
|
||||||
|
self:E("WARNING - STN "..tostring(Octal).." is not valid!")
|
||||||
|
return self
|
||||||
|
end
|
||||||
if _DATABASE.STNS[num] ~= nil then
|
if _DATABASE.STNS[num] ~= nil then
|
||||||
self:E("WARNING - STN already assigned: "..tostring(Octal).." is used for ".._DATABASE.STNS[Octal])
|
self:E("WARNING - STN already assigned: "..tostring(Octal).." is used for ".._DATABASE.STNS[Octal])
|
||||||
end
|
end
|
||||||
@ -796,12 +805,16 @@ end
|
|||||||
|
|
||||||
--- [Airplane - A10-C II only] Set the SADL TN starting number of the Group; each unit of the spawned group will have a consecutive SADL set.
|
--- [Airplane - A10-C II only] Set the SADL TN starting number of the Group; each unit of the spawned group will have a consecutive SADL set.
|
||||||
-- @param #SPAWN self
|
-- @param #SPAWN self
|
||||||
-- @param #number Octal The octal number (digits 1..7, max 4 digits, i.e. 7777) to set the SADL to. Every SADL needs to be unique!
|
-- @param #number Octal The octal number (digits 1..7, max 4 digits, i.e. 1..7777) to set the SADL to. Every SADL needs to be unique!
|
||||||
-- @return #SPAWN self
|
-- @return #SPAWN self
|
||||||
function SPAWN:InitSADL(Octal)
|
function SPAWN:InitSADL(Octal)
|
||||||
self:F( { Octal = Octal } )
|
self:F( { Octal = Octal } )
|
||||||
self.SpawnInitSADL = Octal or 7777
|
self.SpawnInitSADL = Octal or 7777
|
||||||
local num = UTILS.OctalToDecimal(Octal)
|
local num = UTILS.OctalToDecimal(Octal)
|
||||||
|
if num == nil or num < 1 then
|
||||||
|
self:E("WARNING - SADL "..tostring(Octal).." is not valid!")
|
||||||
|
return self
|
||||||
|
end
|
||||||
if _DATABASE.SADL[num] ~= nil then
|
if _DATABASE.SADL[num] ~= nil then
|
||||||
self:E("WARNING - SADL already assigned: "..tostring(Octal).." is used for ".._DATABASE.SADL[Octal])
|
self:E("WARNING - SADL already assigned: "..tostring(Octal).." is used for ".._DATABASE.SADL[Octal])
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user