add unregister messages to gladdy messages

This commit is contained in:
Sumsebrum 2022-01-13 23:11:06 +01:00
parent 83763aa016
commit 0d9e9735da
2 changed files with 11 additions and 0 deletions

View File

@ -191,6 +191,16 @@ function Gladdy:NewModule(name, priority, defaults)
self.messages[message] = func or message self.messages[message] = func or message
end end
module.UnregisterMessage = function(self, message)
self.messages[message] = nil
end
module.UnregisterAllMessages = function(self)
for msg,_ in pairs(self.messages) do
self.messages[msg] = nil
end
end
module.GetOptions = function() module.GetOptions = function()
return nil return nil
end end

View File

@ -53,6 +53,7 @@ function Announcements:Initialize()
end end
function Announcements:Reset() function Announcements:Reset()
self:UnregisterAllMessages()
self.enemy = {} self.enemy = {}
self.throttled = {} self.throttled = {}
end end