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

@@ -69,6 +69,16 @@ class GroundUnitType(UnitType[Type[VehicleType]]):
if "name" in state:
state["variant_id"] = state.pop("name")
# iron-dome migration to IDF assets
if state["variant_id"] in [
"(IDF Mods Project) BM-21 Grad 122mm",
"(IDF Mods Project) Urgan BM-27 220mm",
"(IDF Mods Project) 9A52 Smerch CM 300mm",
]:
state["variant_id"] = "M109A6 Paladin"
elif state["variant_id"] == "Iron Dome ELM-2048 MMR":
state["variant_id"] = "ELM-2084MMR AD Rotating Mode"
# Update any existing models with new data on load.
updated = GroundUnitType.named(state["variant_id"])
state.update(updated.__dict__)