Covnerted Event and Global

This commit is contained in:
Cooldude2606
2019-02-24 21:28:33 +00:00
parent fc279c42f8
commit 1cb2a3c3a0
35 changed files with 97 additions and 78 deletions

View File

@@ -85,6 +85,6 @@ function toolbar.on_init()
if loaded_modules['ExpGamingCore.Role'] then Role = require('ExpGamingCore.Role') end
end
script.on_event({defines.events.on_role_change,defines.events.on_player_joined_game},toolbar.draw)
Event.add({defines.events.on_role_change,defines.events.on_player_joined_game},toolbar.draw)
-- calling with only a player will draw the toolbar for that player, more params will attempt to add a button
return setmetatable(toolbar,{__call=function(self,player,extra,...) if extra then return self.add(player,extra,...) else self.draw(player) end end})