Pydcs update for Phantom II

Save compat changes included
This commit is contained in:
Raffson
2024-05-24 19:14:12 +02:00
parent c947ac0ef1
commit c09a5b68d5
14 changed files with 139 additions and 120 deletions

View File

@@ -74,6 +74,25 @@ class MigrationUnpickler(pickle.Unpickler):
return ELM2084_MMR_AD_RT
elif name == "IRON_DOME_CP":
return Iron_Dome_David_Sling_CP
if module == "dcs.terrain.kola.airports":
if name == "Lakselv":
from dcs.terrain.kola.airports import Banak
return Banak
elif name == "Severomorsk1":
from dcs.terrain.kola.airports import Severomorsk_1
return Severomorsk_1
elif name == "Severomorsk3":
from dcs.terrain.kola.airports import Severomorsk_3
return Severomorsk_3
elif name == "Olenegorsk":
from dcs.terrain.kola.airports import Olenya
return Olenya
if module == "dcs.vehicles":
try:
return super().find_class(module, name)
except AttributeError:
alternate = name.split('.')[:-1] + [name.split('.')[-1][0].lower() + name.split('.')[-1][1:]]
name = '.'.join(alternate)
return super().find_class(module, name)
# fmt: on