mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix SEAD Sweep not available at campaign start
This commit is contained in:
@@ -15,6 +15,7 @@ from dcs.unitpropertydescription import UnitPropertyDescription
|
||||
from dcs.unittype import FlyingType
|
||||
from dcs.weapons_data import weapon_ids
|
||||
|
||||
from game.ato import FlightType
|
||||
from game.data.units import UnitClass
|
||||
from game.dcs.lasercodeconfig import LaserCodeConfig
|
||||
from game.dcs.unittype import UnitType
|
||||
@@ -54,7 +55,6 @@ from game.utils import (
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.ato import FlightType
|
||||
from game.missiongenerator.aircraft.flightdata import FlightData
|
||||
from game.missiongenerator.missiondata import MissionData
|
||||
from game.radio.radios import Radio, RadioFrequency, RadioRegistry
|
||||
@@ -217,6 +217,13 @@ class AircraftType(UnitType[Type[FlyingType]]):
|
||||
list
|
||||
)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
enrich = {}
|
||||
for t in self.task_priorities:
|
||||
if t == FlightType.SEAD:
|
||||
enrich[FlightType.SEAD_SWEEP] = self.task_priorities[t]
|
||||
self.task_priorities.update(enrich)
|
||||
|
||||
@classmethod
|
||||
def register(cls, unit_type: AircraftType) -> None:
|
||||
cls._by_name[unit_type.variant_id] = unit_type
|
||||
|
||||
Reference in New Issue
Block a user