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.
This commit is contained in:
Dan Albert
2022-10-15 14:40:46 -07:00
committed by Raffson
parent 2ac9d6bd98
commit 6e126bd562

View File

@@ -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))