Merge branch 'main' into warnings

This commit is contained in:
MihailRis
2024-11-01 17:18:26 +03:00
4 changed files with 22 additions and 1 deletions
+8
View File
@@ -23,6 +23,14 @@ function events.on(event, func)
table.insert(events.handlers[event], func)
end
function events.reset(event, func)
if func == nil then
events.handlers[event] = nil
else
events.handlers[event] = {func}
end
end
function events.remove_by_prefix(prefix)
for name, handlers in pairs(events.handlers) do
local actualname = name