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

@@ -57,7 +57,8 @@ local ThisModule = {
}
-- Global Define
local global = global{}
local global = {}
Global.register(global,function(tbl) global = tbl end)
-- Function Define
local function give_punishment(player,by_player,reason)
@@ -120,7 +121,7 @@ function Admin.clear_warnings(player,by_player,no_emit)
end
-- Event Handlers Define
script.on_event(defines.events.on_tick,function(event)
Event.add(defines.events.on_tick,function(event)
if (game.tick % min_time_to_remove_warning) == 0 then
for name,warnings in pairs(global) do
if warnings > 0 then