mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Remove save compat.
There was a necessary break in the previous commit. Clean up any existing save compat to go with it.
This commit is contained in:
parent
039ac9ec74
commit
6c1e1e1e95
@ -7,7 +7,6 @@ from typing import Any, List, Optional, TYPE_CHECKING
|
|||||||
from dcs import Point
|
from dcs import Point
|
||||||
from dcs.planes import C_101CC, C_101EB, Su_33
|
from dcs.planes import C_101CC, C_101EB, Su_33
|
||||||
|
|
||||||
from game.savecompat import has_save_compat_for
|
|
||||||
from .flightroster import FlightRoster
|
from .flightroster import FlightRoster
|
||||||
from .flightstate import FlightState, Navigating, Uninitialized
|
from .flightstate import FlightState, Navigating, Uninitialized
|
||||||
from .flightstate.killed import Killed
|
from .flightstate.killed import Killed
|
||||||
@ -100,15 +99,8 @@ class Flight(SidcDescribable):
|
|||||||
del state["state"]
|
del state["state"]
|
||||||
return state
|
return state
|
||||||
|
|
||||||
@has_save_compat_for(6)
|
|
||||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||||
state["state"] = Uninitialized(self, state["squadron"].settings)
|
state["state"] = Uninitialized(self, state["squadron"].settings)
|
||||||
if "props" not in state:
|
|
||||||
state["props"] = {}
|
|
||||||
if "id" not in state:
|
|
||||||
state["id"] = uuid.uuid4()
|
|
||||||
if "coalition" not in state:
|
|
||||||
state["coalition"] = state["squadron"].coalition
|
|
||||||
self.__dict__.update(state)
|
self.__dict__.update(state)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user