From 6e126bd562c0e2a69b55b429f114922fd096f59b Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 15 Oct 2022 14:40:46 -0700 Subject: [PATCH] Send the new turn event from turn initialization. We'll have to get smarter about this some day (since turn initialization won't always exist), but for now we can avoid stale UI data by doing what we've always done and refreshing the world on turn init. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2397. --- game/game.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/game.py b/game/game.py index e81154ce..383b2b15 100644 --- a/game/game.py +++ b/game/game.py @@ -341,7 +341,6 @@ class Game: with logged_duration("Turn initialization"): self.initialize_turn(events) - events.begin_new_turn() EventStream.put_nowait(events) # Autosave progress @@ -437,6 +436,8 @@ class Game: with logged_duration("Computing culling positions"): self.compute_unculled_zones(events) + events.begin_new_turn() + def message(self, title: str, text: str = "") -> None: self.informations.append(Information(title, text, turn=self.turn))