Reproduction:
1. Stick the following in a mod's control.lua:
Code: Select all
script.on_event(defines.events.on_tick, function(e)
if game.tick == 10 then
game.set_game_state{
game_finished = true,
player_won = true,
can_continue = true,
victorious_force = game.forces.player,
}
game.print(game.tick.." "..tostring(game.finished))
elseif game.tick == 20 then
game.print(game.tick.." "..tostring(game.finished))
end
end)
3. Click "continue" on the game finished screen
4. Wait a second
5. Observe that it returns true on tick 10, but false on tick 20.