mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
No more warnings
This commit is contained in:
@@ -133,10 +133,10 @@ local Event = _C.opt_require("modules/exp_legacy/utils/event")
|
||||
|
||||
if Roles and Event then
|
||||
Event.add(Roles.events.on_role_assigned, function(e)
|
||||
Gui.update_top_flow(game.get_player(e.player_index))
|
||||
Gui.update_top_flow(game.players[e.player_index])
|
||||
end)
|
||||
Event.add(Roles.events.on_role_unassigned, function(e)
|
||||
Gui.update_top_flow(game.get_player(e.player_index))
|
||||
Gui.update_top_flow(game.players[e.player_index])
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
@@ -226,6 +226,7 @@ function Gui._prototype_element:triggers_events(element)
|
||||
element.tags = { ExpGui_event_triggers = { self.uid } }
|
||||
return element
|
||||
elseif not tags.ExpGui_event_triggers then
|
||||
--- @diagnostic disable-next-line: name-style-check
|
||||
tags.ExpGui_event_triggers = { self.uid }
|
||||
elseif table.array_contains(tags.ExpGui_event_triggers, self.uid) then
|
||||
error("Element::triggers_events called multiple times on the same element with the same definition")
|
||||
|
||||
Reference in New Issue
Block a user