From 63e0a09cefec57a7fec560033b51933b8d5a0577 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 22 Sep 2017 17:10:30 +0100 Subject: [PATCH] Fixed debug a bit --- locale/ExpGaming-Core/ExpGaming - Server Interface.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/ExpGaming-Core/ExpGaming - Server Interface.lua b/locale/ExpGaming-Core/ExpGaming - Server Interface.lua index 0ef79129..052c2d5f 100644 --- a/locale/ExpGaming-Core/ExpGaming - Server Interface.lua +++ b/locale/ExpGaming-Core/ExpGaming - Server Interface.lua @@ -86,7 +86,7 @@ end --sudo main loop Event.register(defines.events.on_tick, function(event) -- runs the commands in sudo - if #global.sudo.commands == 0 then debug_write({'END'},game.tick) global.debug = false end + if global.debug and #global.sudo.commands == 0 then debug_write({'END'},game.tick) global.debug = global.force_debug end debug_write({'SUDO'},get_sudo_info(true)) if game.tick % ticks_per_iteration == 0 and global.sudo.commands and #global.sudo.commands > 0 then local length = nil @@ -112,6 +112,6 @@ Event.register(defines.events.on_tick, function(event) if data.remove_time <= game.tick then global.sudo.temp_varibles[name] = nil end end end) -Event.register(-1,function() global.sudo = {commands={},temp_varibles={}} end) +Event.register(-1,function() global.sudo = {commands={},temp_varibles={}} global.force_debug = false end) --Please Only Edit Above This Line----------------------------------------------------------- return credits \ No newline at end of file