diff --git a/game/factions/faction.py b/game/factions/faction.py index 1675abf3..22a1d115 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -410,6 +410,9 @@ class Faction: self.remove_aircraft("JAS39Gripen_AG") if not mod_settings.super_etendard: self.remove_aircraft("VSN_SEM") + if not mod_settings.su15_flagon: + self.remove_aircraft("Su_15") + self.remove_aircraft("Su_15TM") if not mod_settings.su30_flanker_h: self.remove_aircraft("Su-30MKA") self.remove_aircraft("Su-30MKI") diff --git a/game/theater/start_generator.py b/game/theater/start_generator.py index 66bcb295..9a0b2ef4 100644 --- a/game/theater/start_generator.py +++ b/game/theater/start_generator.py @@ -87,6 +87,7 @@ class ModSettings: uh_60l: bool = False jas39_gripen: bool = False super_etendard: bool = False + su15_flagon: bool = False su30_flanker_h: bool = False su57_felon: bool = False frenchpack: bool = False diff --git a/pydcs_extensions/__init__.py b/pydcs_extensions/__init__.py index b1f5b193..c5c4071e 100644 --- a/pydcs_extensions/__init__.py +++ b/pydcs_extensions/__init__.py @@ -24,6 +24,7 @@ from .jas39 import * from .ov10a import * from .spanishnavypack import * from .super_etendard import * +from .su15 import * from .su30 import * from .su57 import * from .swedishmilitaryassetspack import * diff --git a/pydcs_extensions/su15/__init__.py b/pydcs_extensions/su15/__init__.py new file mode 100644 index 00000000..f70df111 --- /dev/null +++ b/pydcs_extensions/su15/__init__.py @@ -0,0 +1 @@ +from .su15 import * diff --git a/pydcs_extensions/su15/su15.py b/pydcs_extensions/su15/su15.py new file mode 100644 index 00000000..aa74087f --- /dev/null +++ b/pydcs_extensions/su15/su15.py @@ -0,0 +1,203 @@ +from typing import Any, Dict, Set + +from dcs import task +from dcs.planes import PlaneType +from dcs.weapons_data import Weapons + +from game.modsupport import planemod +from pydcs_extensions.weapon_injector import inject_weapons + + +class WeaponsSu15: + PTB_600 = {"clsid": "{Su_15_PTB-600}", "name": "PTB-600", "weight": 535} + R_8M1R = {"clsid": "{R-8M1R}", "name": "R-8M1R", "weight": 285} + R_8M1T = {"clsid": "{R-8M1T}", "name": "R-8M1T", "weight": 265} + R_8R_Inert = {"clsid": "{R-8RInert}", "name": "R-8R Inert", "weight": 285} + R_8T_Inert = {"clsid": "{R-8TInert}", "name": "R-8T Inert", "weight": 265} + R_98MR = {"clsid": "{R-98MR}", "name": "R-98MR", "weight": 292} + R_98MT = {"clsid": "{R-98MT}", "name": "R-98MT", "weight": 272} + + +inject_weapons(WeaponsSu15) + + +@planemod +class Su_15TM(PlaneType): + id = "Su_15TM" + height = 5 + width = 9.34 + length = 21.41 + fuel_max = 5550 + max_speed = 2229.984 + chaff = 30 + flare = 15 + charge_total = 60 + chaff_charge_size = 1 + flare_charge_size = 2 + category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F} + radio_frequency = 127.5 + + livery_name = "SU_15TM" # from type + + class Pylon1: + R_98MR = (1, WeaponsSu15.R_98MR) + R_98MT = (1, WeaponsSu15.R_98MT) + R_8M1R = (1, WeaponsSu15.R_8M1R) + R_8M1T = (1, WeaponsSu15.R_8M1T) + UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 1, + Weapons.UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 1, + Weapons.UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_ = ( + 1, + Weapons.S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_, + ) + FAB_100___100kg_GP_Bomb_LD = (1, Weapons.FAB_100___100kg_GP_Bomb_LD) + FAB_250___250kg_GP_Bomb_LD = (1, Weapons.FAB_250___250kg_GP_Bomb_LD) + FAB_500_M_62___500kg_GP_Bomb_LD = (1, Weapons.FAB_500_M_62___500kg_GP_Bomb_LD) + + class Pylon2: + APU_60_1M_with_R_60__AA_8_Aphid____IR_AAM = ( + 2, + Weapons.APU_60_1M_with_R_60__AA_8_Aphid____IR_AAM, + ) + APU_60_1M_with_R_60M__AA_8_Aphid_B____IR_AAM = ( + 2, + Weapons.APU_60_1M_with_R_60M__AA_8_Aphid_B____IR_AAM, + ) + + class Pylon3: + SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod = ( + 3, + Weapons.SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod, + ) + PTB_600 = (3, WeaponsSu15.PTB_600) + UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 3, + Weapons.UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 3, + Weapons.UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_ = ( + 3, + Weapons.S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_, + ) + FAB_100___100kg_GP_Bomb_LD = (3, Weapons.FAB_100___100kg_GP_Bomb_LD) + FAB_250___250kg_GP_Bomb_LD = (3, Weapons.FAB_250___250kg_GP_Bomb_LD) + FAB_500_M_62___500kg_GP_Bomb_LD = (3, Weapons.FAB_500_M_62___500kg_GP_Bomb_LD) + + class Pylon4: + SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod = ( + 4, + Weapons.SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod, + ) + PTB_600 = (4, WeaponsSu15.PTB_600) + UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 4, + Weapons.UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 4, + Weapons.UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_ = ( + 4, + Weapons.S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_, + ) + FAB_100___100kg_GP_Bomb_LD = (4, Weapons.FAB_100___100kg_GP_Bomb_LD) + FAB_250___250kg_GP_Bomb_LD = (4, Weapons.FAB_250___250kg_GP_Bomb_LD) + FAB_500_M_62___500kg_GP_Bomb_LD = (4, Weapons.FAB_500_M_62___500kg_GP_Bomb_LD) + + class Pylon5: + APU_60_1M_with_R_60__AA_8_Aphid____IR_AAM = ( + 5, + Weapons.APU_60_1M_with_R_60__AA_8_Aphid____IR_AAM, + ) + APU_60_1M_with_R_60M__AA_8_Aphid_B____IR_AAM = ( + 5, + Weapons.APU_60_1M_with_R_60M__AA_8_Aphid_B____IR_AAM, + ) + + class Pylon6: + R_98MR = (6, WeaponsSu15.R_98MR) + R_98MT = (6, WeaponsSu15.R_98MT) + R_8M1R = (6, WeaponsSu15.R_8M1R) + R_8M1T = (6, WeaponsSu15.R_8M1T) + UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 6, + Weapons.UB_32A_pod___32_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag = ( + 6, + Weapons.UB_16UM_pod___16_x_S_5KO__57mm_UnGd_Rkts__HEAT_Frag, + ) + S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_ = ( + 6, + Weapons.S_24B___240mm_UnGd_Rkt__235kg__HE_Frag___Low_Smk_, + ) + FAB_100___100kg_GP_Bomb_LD = (6, Weapons.FAB_100___100kg_GP_Bomb_LD) + FAB_250___250kg_GP_Bomb_LD = (6, Weapons.FAB_250___250kg_GP_Bomb_LD) + FAB_500_M_62___500kg_GP_Bomb_LD = (6, Weapons.FAB_500_M_62___500kg_GP_Bomb_LD) + + pylons: Set[int] = {1, 2, 3, 4, 5, 6} + + tasks = [ + task.GroundAttack, + task.CAS, + task.CAP, + task.Escort, + task.FighterSweep, + task.Intercept, + ] + task_default = task.Intercept + + +@planemod +class Su_15(PlaneType): + id = "Su_15" + height = 5 + width = 9.34 + length = 21.41 + fuel_max = 5600 + max_speed = 2229.984 + category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F} + radio_frequency = 127.5 + + livery_name = "SU_15" # from type + + class Pylon1: + R_8M1R = (1, WeaponsSu15.R_8M1R) + R_8R_Inert = (1, WeaponsSu15.R_8R_Inert) + R_8M1T = (1, WeaponsSu15.R_8M1T) + R_8T_Inert = (1, WeaponsSu15.R_8T_Inert) + + class Pylon2: + SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod = ( + 2, + Weapons.SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod, + ) + PTB_600 = (2, WeaponsSu15.PTB_600) + + class Pylon3: + SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod = ( + 3, + Weapons.SPPU_22_1___2_x_23mm__GSh_23L_Autocannon_Pod, + ) + PTB_600 = (3, WeaponsSu15.PTB_600) + + class Pylon4: + R_8M1R = (4, WeaponsSu15.R_8M1R) + R_8R_Inert = (4, WeaponsSu15.R_8R_Inert) + R_8M1T = (4, WeaponsSu15.R_8M1T) + R_8T_Inert = (4, WeaponsSu15.R_8T_Inert) + + pylons: Set[int] = {1, 2, 3, 4} + + tasks = [task.CAP, task.Escort, task.FighterSweep, task.Intercept] + task_default = task.Intercept diff --git a/qt_ui/main.py b/qt_ui/main.py index 7f4b6e78..d7063af6 100644 --- a/qt_ui/main.py +++ b/qt_ui/main.py @@ -336,6 +336,7 @@ def create_game( f105_thunderchief=False, hercules=False, jas39_gripen=False, + su15_flagon=False, su30_flanker_h=False, su57_felon=False, frenchpack=False, diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index 0ecccbf1..0948079c 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -110,6 +110,7 @@ class NewGameWizard(QtWidgets.QWizard): uh_60l=self.field("uh_60l"), jas39_gripen=self.field("jas39_gripen"), super_etendard=self.field("super_etendard"), + su15_flagon=self.field("su15_flagon"), su30_flanker_h=self.field("su30_flanker_h"), su57_felon=self.field("su57_felon"), ov10a_bronco=self.field("ov10a_bronco"), diff --git a/qt_ui/windows/newgame/WizardPages/QGeneratorSettings.py b/qt_ui/windows/newgame/WizardPages/QGeneratorSettings.py index 926bb923..cf153da8 100644 --- a/qt_ui/windows/newgame/WizardPages/QGeneratorSettings.py +++ b/qt_ui/windows/newgame/WizardPages/QGeneratorSettings.py @@ -130,6 +130,8 @@ class GeneratorOptions(QtWidgets.QWizardPage): self.registerField("jas39_gripen", self.jas39_gripen) self.super_etendard = QtWidgets.QCheckBox() self.registerField("super_etendard", self.super_etendard) + self.su15_flagon = QtWidgets.QCheckBox() + self.registerField("su15_flagon", self.su15_flagon) self.su30_flanker_h = QtWidgets.QCheckBox() self.registerField("su30_flanker_h", self.su30_flanker_h) self.su57_felon = QtWidgets.QCheckBox() @@ -183,6 +185,7 @@ class GeneratorOptions(QtWidgets.QWizardPage): ("OV-10A Bronco", self.ov10a_bronco), ("Spanish Naval Assets pack (desdemicabina 3.2.0)", self.spanishnavypack), ("Star Wars Modpack 2.54+", self.SWPack), + ("Su-15 Flagon (v1.0)", self.su15_flagon), ("Su-30 Flanker-H (V2.7.3 beta)", self.su30_flanker_h), ("Su-57 Felon (build-04)", self.su57_felon), ("Super Étendard (v2.5.5)", self.super_etendard), diff --git a/resources/customized_payloads/Su_15.lua b/resources/customized_payloads/Su_15.lua new file mode 100644 index 00000000..cc7628e6 --- /dev/null +++ b/resources/customized_payloads/Su_15.lua @@ -0,0 +1,33 @@ +local unitPayloads = { + ["name"] = "Su_15", + ["payloads"] = { + [1] = { + ["name"] = "BARCAP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{R-8M1R}", + ["num"] = 4, + }, + [2] = { + ["CLSID"] = "{R-8M1T}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{E92CBFE5-C153-11d8-9897-000476191836}", + ["num"] = 3, + }, + [4] = { + ["CLSID"] = "{E92CBFE5-C153-11d8-9897-000476191836}", + ["num"] = 2, + }, + }, + ["tasks"] = { + [1] = 10, + }, + }, + }, + ["tasks"] = { + }, + ["unitType"] = "Su_15", +} +return unitPayloads diff --git a/resources/customized_payloads/Su_15TM.lua b/resources/customized_payloads/Su_15TM.lua new file mode 100644 index 00000000..acec4d15 --- /dev/null +++ b/resources/customized_payloads/Su_15TM.lua @@ -0,0 +1,43 @@ +local unitPayloads = { + ["name"] = "Su_15TM", + ["payloads"] = { + [1] = { + ["displayName"] = "BARCAP", + ["name"] = "BARCAP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{R-98MR}", + ["num"] = 6, + }, + [2] = { + ["CLSID"] = "{R-98MT}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{R-60M}", + ["num"] = 5, + }, + [4] = { + ["CLSID"] = "{R-60M}", + ["num"] = 2, + }, + [5] = { + ["CLSID"] = "{E92CBFE5-C153-11d8-9897-000476191836}", + ["num"] = 4, + }, + [6] = { + ["CLSID"] = "{E92CBFE5-C153-11d8-9897-000476191836}", + ["num"] = 3, + }, + }, + ["tasks"] = { + [1] = 11, + [2] = 10, + }, + }, + }, + ["tasks"] = { + }, + ["unitType"] = "Su_15TM", +} +return unitPayloads diff --git a/resources/factions/russia_1965.json b/resources/factions/russia_1965.json index e1f5c8dd..cc308298 100644 --- a/resources/factions/russia_1965.json +++ b/resources/factions/russia_1965.json @@ -11,6 +11,7 @@ "MiG-15bis Fagot", "MiG-19P Farmer-B", "MiG-21bis Fishbed-N", + "Su-15 Flagon-A", "Tu-95MS Bear-H" ], "awacs": [ diff --git a/resources/factions/russia_1975 (Mi-24P).json b/resources/factions/russia_1975 (Mi-24P).json index 52966176..bcc1da4e 100644 --- a/resources/factions/russia_1975 (Mi-24P).json +++ b/resources/factions/russia_1975 (Mi-24P).json @@ -14,6 +14,7 @@ "MiG-23MLD Flogger-K", "MiG-25PD Foxbat-E", "MiG-29A Fulcrum-A", + "Su-15TM Flagon-E", "Su-17M4 Fitter-K", "Su-24M Fencer-D", "Su-25 Frogfoot", diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json index e38ef47f..7f7ed2cd 100644 --- a/resources/factions/russia_1975.json +++ b/resources/factions/russia_1975.json @@ -14,6 +14,7 @@ "MiG-23MLD Flogger-K", "MiG-25PD Foxbat-E", "MiG-29A Fulcrum-A", + "Su-15TM Flagon-E", "Su-17M4 Fitter-K", "Su-24M Fencer-D", "Su-25 Frogfoot", diff --git a/resources/factions/russia_1980.json b/resources/factions/russia_1980.json index 526b232b..bf81f1ad 100644 --- a/resources/factions/russia_1980.json +++ b/resources/factions/russia_1980.json @@ -17,6 +17,7 @@ "MiG-27K Flogger-J2", "MiG-29A Fulcrum-A", "MiG-31 Foxhound", + "Su-15TM Flagon-E", "Su-17M4 Fitter-K", "Su-24M Fencer-D", "Su-25 Frogfoot", diff --git a/resources/ui/units/aircrafts/icons/Su_15TM_24.jpg b/resources/ui/units/aircrafts/icons/Su_15TM_24.jpg new file mode 100644 index 00000000..6e96d9b4 Binary files /dev/null and b/resources/ui/units/aircrafts/icons/Su_15TM_24.jpg differ diff --git a/resources/ui/units/aircrafts/icons/Su_15_24.jpg b/resources/ui/units/aircrafts/icons/Su_15_24.jpg new file mode 100644 index 00000000..c744e798 Binary files /dev/null and b/resources/ui/units/aircrafts/icons/Su_15_24.jpg differ diff --git a/resources/units/aircraft/Su_15.yaml b/resources/units/aircraft/Su_15.yaml new file mode 100644 index 00000000..92b6d0d3 --- /dev/null +++ b/resources/units/aircraft/Su_15.yaml @@ -0,0 +1,20 @@ +description: + "The Sukhoi Su-15 (NATO reporting name: Flagon) is a twinjet supersonic interceptor + aircraft developed by the Soviet Union. It entered service in 1965 and remained one + of the front-line designs into the 1990s." +introduced: 1965 +manufacturer: Sukhoi +origin: USSR/Russia +price: 12 +role: Interceptor +max_range: 200 +gunfighter: true +variants: + Su-15 Flagon-A: {} +kneeboard_units: "metric" +tasks: + BARCAP: 360 + Escort: 360 + Fighter sweep: 360 + Intercept: 360 + TARCAP: 360 diff --git a/resources/units/aircraft/Su_15TM.yaml b/resources/units/aircraft/Su_15TM.yaml new file mode 100644 index 00000000..966ce444 --- /dev/null +++ b/resources/units/aircraft/Su_15TM.yaml @@ -0,0 +1,23 @@ +description: + "The Sukhoi Su-15 (NATO reporting name: Flagon) is a twinjet supersonic interceptor + aircraft developed by the Soviet Union. It entered service in 1965 and remained one + of the front-line designs into the 1990s. The Flagon-A was followed in December 1971 + by the Su-15TM (NATO Flagon-E), with the improved Taifun-M radar (NATO Twin Scan) + and provision for UPK-23-250 gun pod or R-60 (AA-8 Aphid) short-range air-to-air + missiles." +introduced: 1971 +manufacturer: Sukhoi +origin: USSR/Russia +price: 12 +role: Interceptor +max_range: 200 +gunfighter: true +variants: + Su-15TM Flagon-E: {} +kneeboard_units: "metric" +tasks: + BARCAP: 370 + Escort: 370 + Fighter sweep: 370 + Intercept: 370 + TARCAP: 370