mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Further improvements to livery-selector
Unlocking the full potential, i.e. allowing users to switch back & forth between livery-sets, livery-overrides and normal liveries, including support for overriding flight/flight-member specific liveries.
This commit is contained in:
@@ -18,13 +18,12 @@ class FlightMember:
|
||||
self.weapon_laser_code: LaserCode | None = None
|
||||
self.properties: dict[str, bool | float | int] = {}
|
||||
self.livery: Optional[str] = None
|
||||
self.use_livery_set: bool = True
|
||||
|
||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||
if "tgp_laser_code" not in state:
|
||||
state["tgp_laser_code"] = None
|
||||
if "weapon_laser_code" not in state:
|
||||
state["weapon_laser_code"] = None
|
||||
self.__dict__.update(state)
|
||||
new_state = FlightMember(state["pilot"], state["loadout"])
|
||||
new_state.__dict__.update(state)
|
||||
self.__dict__.update(new_state.__dict__)
|
||||
|
||||
def assign_tgp_laser_code(self, code: LaserCode) -> None:
|
||||
if self.tgp_laser_code is not None:
|
||||
|
||||
Reference in New Issue
Block a user