1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-10-30 23:47:41 +02:00

update module

This commit is contained in:
Gerkiz
2021-05-28 20:28:28 +02:00
parent f2ef691b45
commit 2a1f3dea2c

View File

@@ -1,18 +1,22 @@
local Event = require 'utils.event'
local function halt_game()
local function set_pause()
game.tick_paused = true
end
local function resume_game()
game.tick_paused = false
local player_count = #game.connected_players
if player_count <= 1 then
game.tick_paused = false
end
end
local function player_left()
local player_count = #game.connected_players
if player_count == 0 then
halt_game()
set_pause()
end
end