Added LIFO/FIFO:HasUniqueID(UniqueID)

This commit is contained in:
Applevangelist 2022-04-14 11:11:18 +02:00
parent dd957237e2
commit 626b48c3d1

View File

@ -2535,6 +2535,14 @@ function FIFO:GetPointerStack()
return self.stackbypointer
end
--- FIFO Check if a certain UniqeID exists
-- @param #FIFO self
-- @return #boolean exists
function FIFO:HasUniqueID(UniqueID)
self:T(self.lid.."HasUniqueID")
return self.stackbyid[UniqueID] and true or false
end
--- FIFO Get the data stack by UniqueID
-- @param #FIFO self
-- @return #table Table of #FIFO.IDEntry entries
@ -2801,6 +2809,14 @@ function LIFO:GetIDStackSorted()
return idstack
end
--- LIFO Check if a certain UniqeID exists
-- @param #LIFO self
-- @return #boolean exists
function LIFO:HasUniqueID(UniqueID)
self:T(self.lid.."HasUniqueID")
return self.stackbyid[UniqueID] and true or false
end
--- LIFO Print stacks to dcs.log
-- @param #LIFO self
-- @return #LIFO self