Streamlining

This commit is contained in:
Raffson
2023-10-07 17:14:01 +02:00
parent 1760532168
commit ee3bdf9fd7
7 changed files with 9 additions and 11 deletions

View File

@@ -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:

View File

@@ -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:

View File

@@ -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: