fix save compat for changed mod unit names (#471)

This commit is contained in:
Druss99 2025-01-28 12:56:05 -05:00 committed by GitHub
parent 0be821b972
commit a1df78c099
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -10,7 +10,14 @@ import dcs.terrain.falklands.airports
import pydcs_extensions
from game.profiling import logged_duration
from pydcs_extensions import ELM2084_MMR_AD_RT, Iron_Dome_David_Sling_CP
from pydcs_extensions import (
ELM2084_MMR_AD_RT,
Iron_Dome_David_Sling_CP,
RBS_70,
RBS_90,
CH_BVS10,
Artillerisystem08_M982,
)
if TYPE_CHECKING:
from game import Game
@ -74,6 +81,15 @@ class MigrationUnpickler(pickle.Unpickler):
return ELM2084_MMR_AD_RT
elif name == "IRON_DOME_CP":
return Iron_Dome_David_Sling_CP
if module == "pydcs_extensions.swedishmilitaryassetspack.swedishmilitaryassetspack":
if name == "BV410_RBS90":
return RBS_90
elif name == "BV410":
return CH_BVS10
elif name == "Artillerisystem08":
return Artillerisystem08_M982
elif name == "BV410_RBS70":
return RBS_70
if module == "dcs.terrain.kola.airports":
if name == "Lakselv":
from dcs.terrain.kola.airports import Banak

View File

@ -10,4 +10,5 @@ price: 15
role: Surface-to-Air Missile Launcher
variants:
RBS 70 EldE 70 Stationary SAM LN: {}
BV 410 RBS 70: {}
"[CH] RBS 70 VSHORAD LN": {}

View File

@ -12,4 +12,5 @@ price: 17
role: Surface-to-Air Missile Launcher
variants:
RBS 90 EldE 90 Stationary SAM LN: {}
BV 410 RBS 90: {}
"[CH] RBS 90 VSHORAD LN": {}