From 5a52780b9363fad92ac8ea699ef6fc7c59794295 Mon Sep 17 00:00:00 2001 From: Matthew Heguy Date: Thu, 28 Feb 2019 15:05:34 -0500 Subject: [PATCH] Pause game when env_dump is set --- utils/dump_env.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/dump_env.lua b/utils/dump_env.lua index b5cbccac..cb5df9b0 100644 --- a/utils/dump_env.lua +++ b/utils/dump_env.lua @@ -19,6 +19,7 @@ local filter = function(item, path) end local function player_joined(event) + game.tick_paused = true local dump_string = inspect(_ENV, {process = filter}) if dump_string then local s = string.format('tick on join: %s\n%s', event.tick, dump_string) @@ -27,6 +28,7 @@ local function player_joined(event) else game.print('_ENV not dumped, dump_string was nil') end + game.print('Game is paused. Use /c game.tick_paused = false to resume play') end Event.add(defines.events.on_player_joined_game, player_joined)