diff --git a/game/data/weapons.py b/game/data/weapons.py index 5562e99d..5cd35c99 100644 --- a/game/data/weapons.py +++ b/game/data/weapons.py @@ -35,9 +35,10 @@ def weapons_migrator_lib(name: str) -> str: # Splitting this from our own migrations if "KH" in name: return "Kh" + name[2:] - migration_map = {} - while name in migration_map: - name = migration_map[name] + # UNCOMMENT BELOW WHEN IT BECOMES APPLICABLE + # migration_map = {} + # while name in migration_map: + # name = migration_map[name] return name diff --git a/game/migrator.py b/game/migrator.py index 85eee9d4..5f2d1d8d 100644 --- a/game/migrator.py +++ b/game/migrator.py @@ -64,8 +64,8 @@ class Migrator: for p in c.ato.packages: try_set_attr(p, "custom_name") try_set_attr(p, "frequency") - if self.is_liberation and isinstance(p.time_over_target, datetime): - p.time_over_target = ( + if self.is_liberation and isinstance(p.time_over_target, datetime): # type: ignore + p.time_over_target = ( # type: ignore p.time_over_target - self.game.conditions.start_time ) diff --git a/game/persistency.py b/game/persistency.py index 75ee427f..88760494 100644 --- a/game/persistency.py +++ b/game/persistency.py @@ -18,7 +18,7 @@ _dcs_saved_game_folder: Optional[str] = None # fmt: off class DummyObject: - def __setstate__(self, state): + def __setstate__(self, state: dict[str, Any]) -> None: self.__dict__.update(state)