IDF Assets Pack support v1.1 (#233)

* Updated Irondome support to IDF Assets Pack V1.1, which includes the David's Sling.

* Added an Israel 2017 faction with the David's Sling.

* IDF Assets Pack air defence presets and assets are now correctly removed from the faction when the mod is disabled.

* Removed the Iron Dome mod rocket launchers:
- "9M22U - 122mm Grad"
- "9M27F - 229mm Uragan"
- "9M55F - 300mm Smerch"

These were added to the Iron Dome Mod V1.2 in order for the radar to recognize them and be able to intercept them (these are limitations of DCS), so new rockets were added. However, they don't exist in the IDF Assets Pack.

* IronDome to IDF-Assets migration

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
This commit is contained in:
MetalStormGhost
2024-01-28 19:35:24 +02:00
committed by GitHub
parent 8ff6e5688a
commit ca98183e94
22 changed files with 231 additions and 88 deletions

View File

@@ -10,6 +10,7 @@ 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
if TYPE_CHECKING:
from game import Game
@@ -62,6 +63,13 @@ class MigrationUnpickler(pickle.Unpickler):
return DummyObject
if module == "pydcs_extensions.f4b.f4b":
return pydcs_extensions.f4
if module == "pydcs_extensions.irondome.irondome":
if name in ["I9K57_URAGAN", "I9K51_GRAD", "I9K58_SMERCH"]:
return None
elif name == "ELM2048_MMR":
return ELM2084_MMR_AD_RT
elif name == "IRON_DOME_CP":
return Iron_Dome_David_Sling_CP
return super().find_class(module, name)
# fmt: on