mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#SET
* Added code to`SET:IsInSet(Object)` to be functional
This commit is contained in:
commit
61aed403d9
@ -813,14 +813,31 @@ do -- SET_BASE
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Decides whether to include the Object.
|
--- Decides whether an object is in the SET
|
||||||
-- @param #SET_BASE self
|
-- @param #SET_BASE self
|
||||||
-- @param #table Object
|
-- @param #table Object
|
||||||
-- @return #SET_BASE self
|
-- @return #SET_BASE self
|
||||||
function SET_BASE:IsInSet( ObjectName )
|
function SET_BASE:IsInSet( Object )
|
||||||
self:F3( Object )
|
self:F3( Object )
|
||||||
|
local outcome = false
|
||||||
return true
|
local name = Object:GetName()
|
||||||
|
self:ForEach(
|
||||||
|
function(object)
|
||||||
|
if object:GetName() == name then
|
||||||
|
outcome = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
return outcome
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Decides whether an object is **not** in the SET
|
||||||
|
-- @param #SET_BASE self
|
||||||
|
-- @param #table Object
|
||||||
|
-- @return #SET_BASE self
|
||||||
|
function SET_BASE:IsNotInSet( Object )
|
||||||
|
self:F3( Object )
|
||||||
|
return not self:IsInSet(Object)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Gets a string with all the object names.
|
--- Gets a string with all the object names.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user