mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Streamlining
This commit is contained in:
@@ -39,7 +39,6 @@ from game.radio.channels import (
|
||||
ViperChannelNamer,
|
||||
WarthogChannelNamer,
|
||||
)
|
||||
from game.savecompat import has_save_compat_for
|
||||
from game.utils import (
|
||||
Distance,
|
||||
ImperialUnits,
|
||||
@@ -353,7 +352,6 @@ class AircraftType(UnitType[Type[FlyingType]]):
|
||||
def task_priority(self, task: FlightType) -> int:
|
||||
return self.task_priorities[task]
|
||||
|
||||
@has_save_compat_for(9)
|
||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||
# Save compat: the `name` field has been renamed `variant_id`.
|
||||
if "name" in state:
|
||||
|
||||
@@ -12,7 +12,6 @@ from dcs.vehicles import vehicle_map
|
||||
|
||||
from game.data.units import UnitClass
|
||||
from game.dcs.unittype import UnitType
|
||||
from game.savecompat import has_save_compat_for
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -66,7 +65,6 @@ class GroundUnitType(UnitType[Type[VehicleType]]):
|
||||
dict[type[VehicleType], list[GroundUnitType]]
|
||||
] = defaultdict(list)
|
||||
|
||||
@has_save_compat_for(9)
|
||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||
# Save compat: the `name` field has been renamed `variant_id`.
|
||||
if "name" in state:
|
||||
|
||||
@@ -12,7 +12,6 @@ from dcs.unittype import ShipType
|
||||
|
||||
from game.data.units import UnitClass
|
||||
from game.dcs.unittype import UnitType
|
||||
from game.savecompat import has_save_compat_for
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -22,7 +21,6 @@ class ShipUnitType(UnitType[Type[ShipType]]):
|
||||
list
|
||||
)
|
||||
|
||||
@has_save_compat_for(9)
|
||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||
# Save compat: the `name` field has been renamed `variant_id`.
|
||||
if "name" in state:
|
||||
|
||||
Reference in New Issue
Block a user