Merge pull request #2634 from FlightControl-Master/master-ng

Merge from Master
This commit is contained in:
Thomas
2026-08-29 13:20:46 +02:00
committed by GitHub
3 changed files with 17 additions and 15 deletions
+2 -2
View File
@@ -2011,14 +2011,14 @@ end
-- -- Declare SpawnObject and call a function when a new Group is spawned.
-- local SpawnObject = SPAWN:New( "SpawnObject" )
-- :InitLimit( 2, 10 )
-- :OnBeforeSpawnGroup( function( SpawnTemplate )
-- :OnBeforeTemplateSpawnGroup( function( Spawn, SpawnTemplate, SpawnIndex )
-- Tweaking the template units
-- end
-- )
-- :SpawnScheduled( 300, 0.3 )
--
function SPAWN:OnBeforeTemplateSpawnGroup( BeforeTemplateSpawnFunc )
--self:F( "OnBeforeSpawnGroup" )
--self:F( "OnBeforeTemplateSpawnGroup" )
self.BeforeTemplateSpawnFunc = BeforeTemplateSpawnFunc
+14 -12
View File
@@ -1890,20 +1890,22 @@ do
--- [Internal] Check if any EWR or AWACS is still alive
-- @param #MANTIS self
-- @return #boolean outcome
function MANTIS:_CheckAnyEWRAlive()
self:T(self.lid .. "_CheckAnyEWRAlive")
local alive = false
if self.EWR_Group:CountAlive() > 0 then
alive = true
end
if not alive and self.AWACS_Prefix then
local awacs = GROUP:FindByName(self.AWACS_Prefix)
if awacs and awacs:IsAlive() then
alive = true
function MANTIS:_CheckAnyEWRAlive()
self:T(self.lid .. "_CheckAnyEWRAlive")
for _, group in pairs(self.EWR_Group:GetSet()) do
if group and group:IsAlive() then
return true
end
end
if self.AWACS_Prefix then
local awacs = GROUP:FindByName(self.AWACS_Prefix)
if awacs and awacs:IsAlive() then
return true
end
end
return false
end
return alive
end
--- [Internal] Function to determine state of the advanced mode
-- @param #MANTIS self
@@ -19,7 +19,7 @@
-- ### Author: **funkyfranky**
--
-- ===
-- @module OPS.FlightControl
-- @module Ops.FlightControl
-- @image OPS_FlightControl.png