Update Mantis.lua

Return true at the first one found in _CheckAnyEWRAlive
This commit is contained in:
leka1986
2026-08-28 14:26:12 +02:00
committed by GitHub
parent e4cdefcb48
commit 7bbd79cdb0
@@ -1892,17 +1892,19 @@ do
-- @return #boolean outcome
function MANTIS:_CheckAnyEWRAlive()
self:T(self.lid .. "_CheckAnyEWRAlive")
local alive = false
if self.EWR_Group:CountAlive() > 0 then
alive = true
for _, group in pairs(self.EWR_Group:GetSet()) do
if group and group:IsAlive() then
return true
end
if not alive and self.AWACS_Prefix then
end
if self.AWACS_Prefix then
local awacs = GROUP:FindByName(self.AWACS_Prefix)
if awacs and awacs:IsAlive() then
alive = true
return true
end
end
return alive
return false
end
--- [Internal] Function to determine state of the advanced mode