mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Improve documentation in newly added methods in SET_GROUP, correct faulty logic in SET_GROUP:AnyPartlyInZone()
This commit is contained in:
parent
a058556583
commit
02bb76792a
@ -1001,16 +1001,15 @@ function SET_GROUP:AnyCompletelyInZone(Zone)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Iterate the SET_GROUP and return true if at least one least one @{#UNIT} of one @{GROUP} of the @{SET_GROUP} is in @{ZONE}
|
--- Iterate the SET_GROUP and return true if at least one least one @{#UNIT} of one @{GROUP} of the @{SET_GROUP} is in @{ZONE}
|
||||||
-- @param #SET_GROUP self
|
-- @param #SET_GROUP self
|
||||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||||
-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is completly inside the @{Core.Zone#ZONE}, false otherwise.
|
-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is partly or completly inside the @{Core.Zone#ZONE}, false otherwise.
|
||||||
function SET_GROUP:AnyPartlyInZone(Zone)
|
function SET_GROUP:AnyPartlyInZone(Zone)
|
||||||
self:F2(Zone)
|
self:F2(Zone)
|
||||||
local Set = self:GetSet()
|
local Set = self:GetSet()
|
||||||
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP
|
||||||
if GroupData:IsPartlyInZone(Zone) then
|
if GroupData:IsPartlyInZone(Zone) or GroupData:IsCompletelyInZone(Zone) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1020,7 +1019,7 @@ end
|
|||||||
--- Iterate the SET_GROUP and return true if no @{GROUP} of the @{SET_GROUP} is in @{ZONE}
|
--- Iterate the SET_GROUP and return true if no @{GROUP} of the @{SET_GROUP} is in @{ZONE}
|
||||||
-- @param #SET_GROUP self
|
-- @param #SET_GROUP self
|
||||||
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
-- @param Core.Zone#ZONE ZoneObject The Zone to be tested for.
|
||||||
-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is completly inside the @{Core.Zone#ZONE}, false otherwise.
|
-- @return #boolean true if no @{Wrapper.Group#GROUP} is inside the @{Core.Zone#ZONE} in any way, false otherwise.
|
||||||
function SET_GROUP:NoneInZone(Zone)
|
function SET_GROUP:NoneInZone(Zone)
|
||||||
self:F2(Zone)
|
self:F2(Zone)
|
||||||
local Set = self:GetSet()
|
local Set = self:GetSet()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user