From 8e87ce0c37d7311de0b3414ff82b9e89093991ae Mon Sep 17 00:00:00 2001 From: Arrvis the Lion Date: Sat, 6 Nov 2021 16:34:10 +0300 Subject: [PATCH] Added some convenient functions for DelayedEventHandler --- DelayedEventHandler.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/DelayedEventHandler.lua b/DelayedEventHandler.lua index ca44436..566a522 100644 --- a/DelayedEventHandler.lua +++ b/DelayedEventHandler.lua @@ -22,6 +22,24 @@ function EventArgumentBag:ContainsArgumentWithValue(name, value) return false end +function EventArgumentBag:GetEventCount() + return #self.allEventArgs +end + +function EventArgumentBag:GetValues() + return self.allEventArgs +end + +function EventArgumentBag:GetArgValues(name) + local values = {} + + for _, arguments in ipairs(self.allEventArgs) do + table.insert(values, arguments[name]) + end + + return values +end + local Handler = {} local eventStorage = {}