mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
-- Added AnyInZone stuff.
-- Now for tasking, routing messages show the task name...
This commit is contained in:
@@ -1008,6 +1008,23 @@ function GROUP:IsNotInZone( Zone )
|
||||
return true
|
||||
end
|
||||
|
||||
--- Returns true if any units of the group are within a @{Core.Zone}.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if any unit of the Group is within the @{Core.Zone#ZONE_BASE}
|
||||
function GROUP:IsAnyInZone( Zone )
|
||||
|
||||
if not self:IsAlive() then return false end
|
||||
|
||||
for UnitID, UnitData in pairs( self:GetUnits() ) do
|
||||
local Unit = UnitData -- Wrapper.Unit#UNIT
|
||||
if Zone:IsVec3InZone( Unit:GetVec3() ) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--- Returns the number of UNITs that are in the @{Zone}
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
|
||||
Reference in New Issue
Block a user