From 626b48c3d1f48c9ddb85afb00ec7ec721aa46b81 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 14 Apr 2022 11:11:18 +0200 Subject: [PATCH] Added LIFO/FIFO:HasUniqueID(UniqueID) --- Moose Development/Moose/Utilities/Utils.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index 5991c2327..998df18ad 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -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