mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Roadbase support in the Migrator
Added support in migrator.py to add the new ground spawn, helipad and roadbase attributes to control points.
This commit is contained in:
parent
e273e93012
commit
f970801243
@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, Any
|
|||||||
from dcs.countries import countries_by_name
|
from dcs.countries import countries_by_name
|
||||||
from game.ato.packagewaypoints import PackageWaypoints
|
from game.ato.packagewaypoints import PackageWaypoints
|
||||||
from game.data.doctrine import MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE
|
from game.data.doctrine import MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE
|
||||||
from game.theater import ParkingType, SeasonalConditions
|
from game.theater import ParkingType, SeasonalConditions, Airfield, Fob
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from game import Game
|
from game import Game
|
||||||
@ -77,6 +77,11 @@ class Migrator:
|
|||||||
try_set_attr(cp, "icls_name")
|
try_set_attr(cp, "icls_name")
|
||||||
try_set_attr(cp, "link4")
|
try_set_attr(cp, "link4")
|
||||||
try_set_attr(cp, "convoy_spawns", {})
|
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", [])
|
||||||
|
|
||||||
def _update_flights(self) -> None:
|
def _update_flights(self) -> None:
|
||||||
for f in self.game.db.flights.objects.values():
|
for f in self.game.db.flights.objects.values():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user