From 4b542b70ae65b17dca5dc1a7e0f34d109436e2d4 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 4 Jan 2023 14:10:45 -0800 Subject: [PATCH] Fix post-results "last turn" save. --- game/game.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/game/game.py b/game/game.py index e4885e2f..8fc1d77b 100644 --- a/game/game.py +++ b/game/game.py @@ -332,7 +332,11 @@ class Game: from .server import EventStream from .sim import GameUpdateEvents - persistency.save_last_turn_state(self) + if no_action: + # Only save the last turn state if the turn was skipped. Otherwise, we'll + # end up saving the game after we've already applied the results, making + # this useless... + persistency.save_last_turn_state(self) events = GameUpdateEvents()