mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'FF/Ops' into FF/OpsDev
This commit is contained in:
@@ -4042,7 +4042,25 @@ do -- SET_CLIENT
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the SET_CLIENT and count alive units.
|
||||
-- @param #SET_CLIENT self
|
||||
-- @return #number count
|
||||
function SET_CLIENT:CountAlive()
|
||||
|
||||
local Set = self:GetSet()
|
||||
|
||||
local CountU = 0
|
||||
for UnitID, UnitData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||
if UnitData and UnitData:IsAlive() then
|
||||
CountU = CountU + 1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return CountU
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #SET_CLIENT self
|
||||
-- @param Wrapper.Client#CLIENT MClient
|
||||
@@ -4790,7 +4808,7 @@ do -- SET_AIRBASE
|
||||
|
||||
local airbaseName, airbase=self:FindInDatabase(EventData)
|
||||
|
||||
if airbase and airbase:IsShip() or airbase:IsHelipad() then
|
||||
if airbase and (airbase:IsShip() or airbase:IsHelipad()) then
|
||||
self:RemoveAirbasesByName(airbaseName)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user