mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-31 06:51:43 +00:00
Merge pull request #2633 from FlightControl-Master/leka1986-patch-1
Update Mantis.lua
This commit is contained in:
@@ -1892,17 +1892,19 @@ do
|
|||||||
-- @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
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
if not alive and self.AWACS_Prefix then
|
end
|
||||||
|
if self.AWACS_Prefix then
|
||||||
local awacs = GROUP:FindByName(self.AWACS_Prefix)
|
local awacs = GROUP:FindByName(self.AWACS_Prefix)
|
||||||
if awacs and awacs:IsAlive() then
|
if awacs and awacs:IsAlive() then
|
||||||
alive = true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return alive
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
--- [Internal] Function to determine state of the advanced mode
|
--- [Internal] Function to determine state of the advanced mode
|
||||||
|
|||||||
Reference in New Issue
Block a user