Refactor of commands

This commit is contained in:
Cooldude2606 committed 2019-03-01 20:24:23 +00:00
1 parent e547f76d6f
commit 62dcfe8694
288 files changed
+5364 -1067

No files matched your search

@@ -0,0 +1,15 @@
local Role = require('ExpGamingCore.Role')
Event.add(defines.events.on_role_change,self.update)
return function()
local rtn = {}
local default = {}
for _,role_name in pairs(Role.order) do
local role = Role.get(role_name,true)
if role.is_default then default = {role.colour,role.short_hand,role:get_players(true),role.not_reportable}
else table.insert(rtn,{role.colour,role.short_hand,role:get_players(true),role.not_reportable}) end
end
table.insert(rtn,default)
return rtn
end