1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-10 10:00:00 +02:00

Pause game when env_dump is set

This commit is contained in:
Matthew Heguy 2019-02-28 15:05:34 -05:00
parent 01d53fdd25
commit 5a52780b93

View File

@ -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)