From 208c51788237d75990b7d4e5c0409a5b2db1f5ed Mon Sep 17 00:00:00 2001 From: MetalStormGhost Date: Tue, 20 Jun 2023 00:17:01 +0300 Subject: [PATCH] Roadbase support in the Migrator, OffMapSpawn Added support in migrator.py to add the new ground spawn, helipad and roadbase attributes to control points. This time around, also supporting OffMapSpawns and other types of control point besides just Airfield & Fob. --- game/migrator.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/game/migrator.py b/game/migrator.py index 6da37641..4a0f9159 100644 --- a/game/migrator.py +++ b/game/migrator.py @@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, Any from dcs.countries import countries_by_name from game.ato.packagewaypoints import PackageWaypoints from game.data.doctrine import MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE -from game.theater import ParkingType, SeasonalConditions, Airfield, Fob +from game.theater import ParkingType, SeasonalConditions if TYPE_CHECKING: from game import Game @@ -77,11 +77,10 @@ class Migrator: try_set_attr(cp, "icls_name") try_set_attr(cp, "link4") try_set_attr(cp, "convoy_spawns", {}) - if isinstance(cp, Airfield) or isinstance(cp, Fob): - try_set_attr(cp, "ground_spawns", []) - try_set_attr(cp, "ground_spawns_roadbase", []) - try_set_attr(cp, "helipads_quad", []) - try_set_attr(cp, "helipads_invisible", []) + try_set_attr(cp, "ground_spawns", []) + try_set_attr(cp, "ground_spawns_roadbase", []) + try_set_attr(cp, "helipads_quad", []) + try_set_attr(cp, "helipads_invisible", []) def _update_flights(self) -> None: for f in self.game.db.flights.objects.values():