diff --git a/changelog.md b/changelog.md index ab2ecd30..8b7c212c 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ * **[Plugins]** Updated 'expl_table' in Splash Damage script. * **[Mission Generation]** Also save kneeboards in txt-format, found under "kneeboards" within Retribution's installation folder after pressing take-off. * **[Modding]** Support for SW mod v2.55 +* **[Modding]** Support for Spanish & Australian Naval Assets v3.2.0 by desdemicabina ## Fixes * **[New Game Wizard]** Settings would not persist when going back to a previous page. diff --git a/game/factions/faction.py b/game/factions/faction.py index e618b843..fe072c38 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -431,6 +431,14 @@ class Faction: self.remove_aircraft("FA-18E") self.remove_aircraft("FA-18F") self.remove_aircraft("EA-18G") + # spanish naval assets pack + if not mod_settings.spanishnavypack: + self.remove_ship("L61") + self.remove_ship("F100") + self.remove_ship("F105") + self.remove_ship("L52") + self.remove_ship("L02") + self.remove_ship("DDG39") # swedish military assets pack if not mod_settings.swedishmilitaryassetspack: self.remove_vehicle("BV410_RBS70") diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 046a66f8..6ae5ffea 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -41,7 +41,6 @@ from dcs.ships import ( Hms_invincible, ) from dcs.terrain.terrain import Airport, ParkingSlot -from dcs.triggers import TriggerZone from dcs.unitgroup import ShipGroup, StaticGroup from dcs.unittype import ShipType @@ -61,6 +60,7 @@ from game.sidc import ( ) from game.theater.presetlocation import PresetLocation from game.utils import Distance, Heading, meters +from pydcs_extensions import L02, L52, L61 from .base import Base from .frontline import FrontLine from .interfaces.CTLD import CTLD @@ -1232,6 +1232,9 @@ class NavalControlPoint( KUZNECOW, Type_071, Hms_invincible, + L02, + L52, + L61, ]: return True return False diff --git a/game/theater/start_generator.py b/game/theater/start_generator.py index 1abe753a..1f3112c3 100644 --- a/game/theater/start_generator.py +++ b/game/theater/start_generator.py @@ -73,6 +73,7 @@ class ModSettings: frenchpack: bool = False high_digit_sams: bool = False ov10a_bronco: bool = False + spanishnavypack: bool = False swedishmilitaryassetspack: bool = False SWPack: bool = False diff --git a/pydcs_extensions/__init__.py b/pydcs_extensions/__init__.py index cc364733..d2c5abb7 100644 --- a/pydcs_extensions/__init__.py +++ b/pydcs_extensions/__init__.py @@ -1,25 +1,26 @@ +from .SWPack import * from .a4ec import * from .a6a import * from .a7e import * -from .f4b import * -from .f15d import * -from .f16i_idf import * -from .fa18efg import * -from .f84g import * from .f100 import * from .f104 import * from .f105 import * +from .f15d import * +from .f16i_idf import * from .f22a import * +from .f4b import * +from .f84g import * +from .fa18efg import * from .frenchpack import * from .hercules import * from .highdigitsams import * from .jas39 import * +from .ov10a import * +from .spanishnavypack import * from .su30 import * from .su57 import * -from .uh60l import * -from .ov10a import * from .swedishmilitaryassetspack import * -from .SWPack import * +from .uh60l import * def load_mods() -> None: diff --git a/pydcs_extensions/spanishnavypack/__init__.py b/pydcs_extensions/spanishnavypack/__init__.py new file mode 100644 index 00000000..6bc188c8 --- /dev/null +++ b/pydcs_extensions/spanishnavypack/__init__.py @@ -0,0 +1 @@ +from .spanishnavypack import * diff --git a/pydcs_extensions/spanishnavypack/spanishnavypack.py b/pydcs_extensions/spanishnavypack/spanishnavypack.py new file mode 100644 index 00000000..c58edf14 --- /dev/null +++ b/pydcs_extensions/spanishnavypack/spanishnavypack.py @@ -0,0 +1,71 @@ +from dcs.unittype import ShipType + +from game.modsupport import shipmod + + +@shipmod +class L61(ShipType): + id = "L61" + name = "L61 Juan Carlos I" + plane_num = 40 + helicopter_num = 36 + parking = 4 + detection_range = 300000 + threat_range = 150000 + air_weapon_dist = 150000 + + +@shipmod +class F100(ShipType): + id = "F100" + name = "F100 Álvaro de Bazán" + helicopter_num = 1 + parking = 1 + detection_range = 160000 + threat_range = 45000 + air_weapon_dist = 45000 + + +@shipmod +class F105(ShipType): + id = "F105" + name = "F105 Cristobal Colon" + helicopter_num = 1 + parking = 1 + detection_range = 160000 + threat_range = 45000 + air_weapon_dist = 45000 + + +@shipmod +class L52(ShipType): + id = "L52" + name = "L52 Castilla" + helicopter_num = 2 + parking = 2 + detection_range = 300000 + threat_range = 150000 + air_weapon_dist = 150000 + + +@shipmod +class L02(ShipType): + id = "L02" + name = "L02 Canberra" + plane_num = 40 + helicopter_num = 36 + parking = 4 + detection_range = 300000 + threat_range = 150000 + air_weapon_dist = 150000 + + +@shipmod +class DDG39(ShipType): + id = "DDG39" + name = "HMAS HOBART DDG39" + helicopter_num = 1 + parking = 1 + detection_range = 160000 + threat_range = 45000 + air_weapon_dist = 45000 diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index 5b9616a5..a4b96b8a 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -203,6 +203,7 @@ class NewGameWizard(QtWidgets.QWizard): ov10a_bronco=self.field("ov10a_bronco"), frenchpack=self.field("frenchpack"), high_digit_sams=self.field("high_digit_sams"), + spanishnavypack=self.field("spanishnavypack"), swedishmilitaryassetspack=self.field("swedishmilitaryassetspack"), SWPack=self.field("SWPack"), ) @@ -874,6 +875,8 @@ class GeneratorOptions(QtWidgets.QWizardPage): self.registerField("swedishmilitaryassetspack", self.swedishmilitaryassetspack) self.SWPack = QtWidgets.QCheckBox() self.registerField("SWPack", self.SWPack) + self.spanishnavypack = QtWidgets.QCheckBox() + self.registerField("spanishnavypack", self.spanishnavypack) modHelpText = QtWidgets.QLabel( "
Select the mods you have installed. If your chosen factions support them, you'll be able to use these mods in your campaign.
" @@ -909,6 +912,7 @@ class GeneratorOptions(QtWidgets.QWizardPage): ("Su-57 Felon", self.su57_felon), ("UH-60L Black Hawk (v1.3.1)", self.uh_60l), ("Star Wars Modpack 2.54+", self.SWPack), + ("Spanish Naval Assets pack (desdemicabina 3.2.0)", self.spanishnavypack), ] for i in range(len(mod_pairs)): @@ -963,6 +967,7 @@ class GeneratorOptions(QtWidgets.QWizardPage): self.ov10a_bronco.setChecked(s.get("ov10a_bronco", False)) self.frenchpack.setChecked(s.get("frenchpack", False)) self.high_digit_sams.setChecked(s.get("high_digit_sams", False)) + self.spanishnavypack.setChecked(s.get("spanishnavypack", False)) self.swedishmilitaryassetspack.setChecked( s.get("swedishmilitaryassetspack", False) ) diff --git a/resources/factions/australia_2005.json b/resources/factions/australia_2005.json index 76003058..5057d997 100644 --- a/resources/factions/australia_2005.json +++ b/resources/factions/australia_2005.json @@ -39,7 +39,9 @@ ], "naval_units": [ "DDG Arleigh Burke IIa", - "LHA-1 Tarawa" + "LHA-1 Tarawa", + "L02 Canberra", + "HMAS HOBART DDG39" ], "missiles": [], "air_defense_units": [ diff --git a/resources/factions/bluefor_modern.json b/resources/factions/bluefor_modern.json index 73531120..fbecf44e 100644 --- a/resources/factions/bluefor_modern.json +++ b/resources/factions/bluefor_modern.json @@ -101,7 +101,13 @@ "DDG Arleigh Burke IIa", "CG Ticonderoga", "LHA-1 Tarawa", - "CVN-74 John C. Stennis" + "CVN-74 John C. Stennis", + "L02 Canberra", + "HMAS HOBART DDG39", + "L52 Castilla", + "L61 Juan Carlos I", + "F100 Álvaro de Bazán", + "F105 Cristobal Colon" ], "missiles": [], "air_defense_units": [ diff --git a/resources/factions/spain_1990.json b/resources/factions/spain_1990.json index ebddab75..6ab0b6b8 100644 --- a/resources/factions/spain_1990.json +++ b/resources/factions/spain_1990.json @@ -10,7 +10,6 @@ "AV-8B Harrier II Night Attack", "C-130", "C-101CC Aviojet", - "EF-18A+ Hornet", "F-5E Tiger II", "Mirage-F1BE", "Mirage-F1CE", @@ -27,7 +26,7 @@ "KC-135 Stratotanker" ], "frontline_units": [ - "Leopard 2A4", + "AMX.30B2", "M1097 Heavy HMMWV Avenger", "M113", "M60A3 \"Patton\"" @@ -47,9 +46,7 @@ ], "naval_units": [ "FFG Oliver Hazard Perry", - "CG Ticonderoga", - "LHA-1 Tarawa", - "CVN-74 John C. Stennis" + "CG Ticonderoga" ], "missiles": [], "air_defense_units": [ @@ -64,22 +61,5 @@ "Juan Carlos I" ], "has_jtac": true, - "jtac_unit": "MQ-9 Reaper", - "liveries_overrides": { - "EF-18A+ Hornet": [ - "Spain 111th Escuadron C.15-73", - "Spain 111th Escuadron C.15-88", - "Spain 121th Escuadron C.15-45", - "Spain 121th Escuadron C.15-50", - "Spain 121th Escuadron C.15-60", - "Spain 151th Escuadron C.15-14", - "Spain 151th Escuadron C.15-18", - "Spain 151th Escuadron C.15-23", - "Spain 151th Escuadron C.15-24", - "Spain 211th Escuadron C.15-76", - "Spain 211th Escuadron C.15-77", - "Spain 462th Escuadron C.15-79", - "Spain 462th Escuadron C.15-90" - ] - } + "jtac_unit": "MQ-9 Reaper" } \ No newline at end of file diff --git a/resources/factions/spain_2010.json b/resources/factions/spain_2010.json new file mode 100644 index 00000000..52932b45 --- /dev/null +++ b/resources/factions/spain_2010.json @@ -0,0 +1,87 @@ +{ + "country": "Spain", + "name": "Spain 2010", + "authors": "Raffson", + "description": "Spain +/- 2010
", + "locales": [ + "es_ES" + ], + "aircrafts": [ + "AV-8B Harrier II Night Attack", + "C-130", + "C-101CC Aviojet", + "F/A-18C Hornet (Lot 20)", + "EF-18A+ Hornet", + "F-5E Tiger II", + "Mirage-F1EE", + "Mirage-F1M-CE", + "Mirage-F1M-EE", + "UH-1H Iroquois" + ], + "awacs": [ + "E-3A" + ], + "tankers": [ + "KC-130", + "KC-135 Stratotanker" + ], + "frontline_units": [ + "Leopard 2A4", + "M1097 Heavy HMMWV Avenger", + "M1126 Stryker ICV (M2 HMG)", + "Leopard 2" + ], + "artillery_units": [], + "logistics_units": [ + "Truck M818 6x6" + ], + "infantry_units": [ + "Infantry M249", + "Infantry M4" + ], + "preset_groups": [ + "Hawk", + "Roland", + "Patriot" + ], + "naval_units": [ + "FFG Oliver Hazard Perry", + "CG Ticonderoga", + "LHA-1 Tarawa", + "L52 Castilla", + "L61 Juan Carlos I", + "F100 Álvaro de Bazán", + "F105 Cristobal Colon" + ], + "missiles": [], + "air_defense_units": [ + "SAM Patriot STR", + "M1097 Heavy HMMWV Avenger" + ], + "requirements": {}, + "carrier_names": [ + "Principe de Asturias" + ], + "helicopter_carrier_names": [ + "Juan Carlos I" + ], + "has_jtac": true, + "jtac_unit": "MQ-9 Reaper", + "liveries_overrides": { + "EF-18A+ Hornet": [ + "Spain 111th Escuadron C.15-73", + "Spain 111th Escuadron C.15-88", + "Spain 121th Escuadron C.15-45", + "Spain 121th Escuadron C.15-50", + "Spain 121th Escuadron C.15-60", + "Spain 151th Escuadron C.15-14", + "Spain 151th Escuadron C.15-18", + "Spain 151th Escuadron C.15-23", + "Spain 151th Escuadron C.15-24", + "Spain 211th Escuadron C.15-76", + "Spain 211th Escuadron C.15-77", + "Spain 462th Escuadron C.15-79", + "Spain 462th Escuadron C.15-90" + ] + } +} \ No newline at end of file diff --git a/resources/ui/units/ships/L02.png b/resources/ui/units/ships/L02.png new file mode 100644 index 00000000..173ee31d Binary files /dev/null and b/resources/ui/units/ships/L02.png differ diff --git a/resources/ui/units/ships/L52.png b/resources/ui/units/ships/L52.png new file mode 100644 index 00000000..73ba6ab8 Binary files /dev/null and b/resources/ui/units/ships/L52.png differ diff --git a/resources/ui/units/ships/L61.png b/resources/ui/units/ships/L61.png new file mode 100644 index 00000000..c2083c09 Binary files /dev/null and b/resources/ui/units/ships/L61.png differ diff --git a/resources/units/ships/DDG39.yaml b/resources/units/ships/DDG39.yaml new file mode 100644 index 00000000..72f8dec8 --- /dev/null +++ b/resources/units/ships/DDG39.yaml @@ -0,0 +1,4 @@ +class: Destroyer +price: 0 +variants: + HMAS HOBART DDG39: null \ No newline at end of file diff --git a/resources/units/ships/F100.yaml b/resources/units/ships/F100.yaml new file mode 100644 index 00000000..c1493475 --- /dev/null +++ b/resources/units/ships/F100.yaml @@ -0,0 +1,4 @@ +class: Frigate +price: 0 +variants: + F100 Álvaro de Bazán: null \ No newline at end of file diff --git a/resources/units/ships/F105.yaml b/resources/units/ships/F105.yaml new file mode 100644 index 00000000..35c94487 --- /dev/null +++ b/resources/units/ships/F105.yaml @@ -0,0 +1,4 @@ +class: Frigate +price: 0 +variants: + F105 Cristobal Colon: null \ No newline at end of file diff --git a/resources/units/ships/L02.yaml b/resources/units/ships/L02.yaml new file mode 100644 index 00000000..d8527ccc --- /dev/null +++ b/resources/units/ships/L02.yaml @@ -0,0 +1,4 @@ +class: HelicopterCarrier +price: 0 +variants: + L02 Canberra: null \ No newline at end of file diff --git a/resources/units/ships/L52.yaml b/resources/units/ships/L52.yaml new file mode 100644 index 00000000..638109de --- /dev/null +++ b/resources/units/ships/L52.yaml @@ -0,0 +1,4 @@ +class: LandingShip +price: 0 +variants: + L52 Castilla: null \ No newline at end of file diff --git a/resources/units/ships/L61.yaml b/resources/units/ships/L61.yaml new file mode 100644 index 00000000..719adfbc --- /dev/null +++ b/resources/units/ships/L61.yaml @@ -0,0 +1,4 @@ +class: HelicopterCarrier +price: 0 +variants: + L61 Juan Carlos I: null \ No newline at end of file