mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-31 07:44:30 +00:00
Merge pull request #2634 from FlightControl-Master/master-ng
Merge from Master
This commit is contained in:
@@ -2011,14 +2011,14 @@ end
|
|||||||
-- -- Declare SpawnObject and call a function when a new Group is spawned.
|
-- -- Declare SpawnObject and call a function when a new Group is spawned.
|
||||||
-- local SpawnObject = SPAWN:New( "SpawnObject" )
|
-- local SpawnObject = SPAWN:New( "SpawnObject" )
|
||||||
-- :InitLimit( 2, 10 )
|
-- :InitLimit( 2, 10 )
|
||||||
-- :OnBeforeSpawnGroup( function( SpawnTemplate )
|
-- :OnBeforeTemplateSpawnGroup( function( Spawn, SpawnTemplate, SpawnIndex )
|
||||||
-- Tweaking the template units
|
-- Tweaking the template units
|
||||||
-- end
|
-- end
|
||||||
-- )
|
-- )
|
||||||
-- :SpawnScheduled( 300, 0.3 )
|
-- :SpawnScheduled( 300, 0.3 )
|
||||||
--
|
--
|
||||||
function SPAWN:OnBeforeTemplateSpawnGroup( BeforeTemplateSpawnFunc )
|
function SPAWN:OnBeforeTemplateSpawnGroup( BeforeTemplateSpawnFunc )
|
||||||
--self:F( "OnBeforeSpawnGroup" )
|
--self:F( "OnBeforeTemplateSpawnGroup" )
|
||||||
|
|
||||||
self.BeforeTemplateSpawnFunc = BeforeTemplateSpawnFunc
|
self.BeforeTemplateSpawnFunc = BeforeTemplateSpawnFunc
|
||||||
|
|
||||||
|
|||||||
@@ -1890,20 +1890,22 @@ do
|
|||||||
--- [Internal] Check if any EWR or AWACS is still alive
|
--- [Internal] Check if any EWR or AWACS is still alive
|
||||||
-- @param #MANTIS self
|
-- @param #MANTIS self
|
||||||
-- @return #boolean outcome
|
-- @return #boolean outcome
|
||||||
function MANTIS:_CheckAnyEWRAlive()
|
function MANTIS:_CheckAnyEWRAlive()
|
||||||
self:T(self.lid .. "_CheckAnyEWRAlive")
|
self:T(self.lid .. "_CheckAnyEWRAlive")
|
||||||
local alive = false
|
|
||||||
if self.EWR_Group:CountAlive() > 0 then
|
for _, group in pairs(self.EWR_Group:GetSet()) do
|
||||||
alive = true
|
if group and group:IsAlive() then
|
||||||
end
|
return true
|
||||||
if not alive and self.AWACS_Prefix then
|
end
|
||||||
local awacs = GROUP:FindByName(self.AWACS_Prefix)
|
|
||||||
if awacs and awacs:IsAlive() then
|
|
||||||
alive = 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
|
end
|
||||||
return alive
|
|
||||||
end
|
|
||||||
|
|
||||||
--- [Internal] Function to determine state of the advanced mode
|
--- [Internal] Function to determine state of the advanced mode
|
||||||
-- @param #MANTIS self
|
-- @param #MANTIS self
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
-- ### Author: **funkyfranky**
|
-- ### Author: **funkyfranky**
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
-- @module OPS.FlightControl
|
-- @module Ops.FlightControl
|
||||||
-- @image OPS_FlightControl.png
|
-- @image OPS_FlightControl.png
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user