From 1a5e31c01a641ab847117925bb3ff75b121831eb Mon Sep 17 00:00:00 2001 From: Raffson Date: Sat, 20 May 2023 00:15:00 +0200 Subject: [PATCH] Migrate squadron countries --- game/migrator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game/migrator.py b/game/migrator.py index 2277d74a..df728594 100644 --- a/game/migrator.py +++ b/game/migrator.py @@ -94,6 +94,7 @@ class Migrator: s.claim_inventory(count - claimed) def _update_squadrons(self) -> None: + country_dict = {"Netherlands": "The Netherlands"} for cp in self.game.theater.controlpoints: for s in cp.squadrons: preferred_task = max( @@ -102,6 +103,9 @@ class Migrator: ) try_set_attr(s, "primary_task", preferred_task) try_set_attr(s, "max_size", 12) + if isinstance(s.country, str): + c = country_dict.get(s.country, s.country) + s.country = countries_by_name[c]() def _update_factions(self) -> None: for c in self.game.coalitions: