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

Merge pull request #834 from plague006/pause_on_dump

Pause game when env_dump is set
This commit is contained in:
Matthew 2019-03-02 03:56:38 -05:00 committed by GitHub
commit f5bd27400e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)