From 24394d4d00a6f38e2903943b672f438e95b352aa Mon Sep 17 00:00:00 2001 From: Khopa Date: Tue, 20 Oct 2020 20:58:39 +0200 Subject: [PATCH 01/29] Faction rework wip. --- game/factions/faction.py | 124 ++++++++++++++++++++++++++++ game/factions/faction_loader.py | 28 +++++++ resources/factions/china_2010.json | 81 ++++++++++++++++++ resources/factions/russia_1990.json | 75 +++++++++++++++++ resources/factions/usa_2005.json | 81 ++++++++++++++++++ 5 files changed, 389 insertions(+) create mode 100644 game/factions/faction.py create mode 100644 game/factions/faction_loader.py create mode 100644 resources/factions/china_2010.json create mode 100644 resources/factions/russia_1990.json create mode 100644 resources/factions/usa_2005.json diff --git a/game/factions/faction.py b/game/factions/faction.py new file mode 100644 index 00000000..33794f5e --- /dev/null +++ b/game/factions/faction.py @@ -0,0 +1,124 @@ +import logging +from dataclasses import dataclass +from typing import Optional + +from dcs.planes import PlaneType, plane_map +from dcs.unittype import VehicleType, UnitType +from dcs.vehicles import vehicle_map, Armor, Unarmed, Infantry, Fortification, Artillery, AirDefence + +from game.data.doctrine import Doctrine + + +@dataclass +class Faction: + + # Country used by this faction + country: str + + # Nice name of the faction + name: str + + # Available aircraft + aircrafts: [UnitType] + + # Available awacs aircraft + awacs: [UnitType] + + # Available tanker aircraft + tankers: [UnitType] + + # Available frontline units + frontline_units: [VehicleType] + + # Available artillery units + artillery_units: [VehicleType] + + # Infantry units used + infantry_units: [VehicleType] + + # List of units that can be deployed as SHORAD + shorad_units: [VehicleType] + + # Possible SAMS site generators for this faction + sams: [str] + + # Required mods or asset packs + requirements: {str: str} + + # Possible carrier names + carrier_names: [str] + + # Possible helicopter carrier names + lha_names: [str] + + # Navy group generators + navy_generators: [str] + + # Available destroyers + destroyers: [str] + + # Available cruisers + cruisers: [str] + + # JTAC + has_jtac: bool + + # Unit to use as JTAC + jtac_unit: str + + # doctrine + doctrine: Doctrine + + def __init__(self): + pass + + @classmethod + def from_json(cls, json): + + faction = Faction() + + faction.country = json.get("country", "USA") + faction.name = json.get("name", "???") + + faction.aircrafts = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("aircrafts", [])] is not None] + faction.awacs = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("awacs", [])] is not None] + faction.tankers = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("tankers", [])] is not None] + + +def aircraft_loader(aircraft: str) -> Optional[PlaneType]: + """ + Find aircraft by name + :param aircraft: Aircraft name as string + :return: The aircraft as a PyDCS type + """ + if aircraft in plane_map.keys(): + return plane_map[aircraft] + else: + for mother_class in [PlaneType, Unarmed, Infantry, Armor, AirDefence, Artillery, Fortification]: + if getattr(mother_class, vehicle) is not None: + return getattr(mother_class, vehicle) + logging.info("FACTION ERROR : Unable to find " + aircraft + " in pydcs") + return None + +def vehicle_loader(vehicle: str) -> Optional[VehicleType]: + """ + Find vehicle by name + :param vehicle: Vehicle name as string + :return: The vehicle as a PyDCS type + """ + if vehicle in plane_map.keys(): + return plane_map[vehicle] + else: + for mother_class in [Armor, Unarmed, Infantry, Armor, AirDefence, Artillery, Fortification]: + if getattr(mother_class, vehicle) is not None: + return getattr(mother_class, vehicle) + logging.info("FACTION ERROR : Unable to find " + vehicle + " in pydcs") + return None + +vehicle_map + + + + + + diff --git a/game/factions/faction_loader.py b/game/factions/faction_loader.py new file mode 100644 index 00000000..a743c177 --- /dev/null +++ b/game/factions/faction_loader.py @@ -0,0 +1,28 @@ +import json +import os +import logging + +FACTION_DIRECTORY = "./resources/factions/" + +def load_factions() -> {}: + files = os.listdir(FACTION_DIRECTORY) + files = [f for f in files if f.endswith(".json")] + + factions = {} + + for f in files: + path = os.path.join(FACTION_DIRECTORY, f) + logging.info("Loading faction" + path) + try: + with open(path, "r") as fdata: + data = json.load(fdata) + factions[data["name"]] = data + logging.info("Loaded faction : " + path) + except: + logging.error("Unable to load faction : " + path) + + return factions + + +if __name__ == "__main__": + load_factions() \ No newline at end of file diff --git a/resources/factions/china_2010.json b/resources/factions/china_2010.json new file mode 100644 index 00000000..ae0fdcea --- /dev/null +++ b/resources/factions/china_2010.json @@ -0,0 +1,81 @@ +{ + "country": "China", + "name": "China 2010", + "aircrafts": [ + "MiG_21Bis", + "Su_30", + "Su_33", + "J_11A", + "JF_17", + "Mi_8MT", + "Mi_28N" + ], + "awacs": [ + "KJ_2000" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ZTZ_96B", + "MBT_T_55", + "ZBD_04A", + "IFV_BMP_1" + ], + "artillery_units": [ + "MLRS_9A52_Smerch", + "SPH_2S9_Nona" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorad_units": [ + "SAM_SA_9_Strela_1_9P31", + "SAM_SA_13_Strela_10M3_9A35M3", + "SPAAA_ZSU_23_4_Shilka", + "AAA_ZU_23_Closed" + ], + "sams": [ + "HQ7Generator", + "SA10Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + "CV_1143_5_Admiral_Kuznetsov" + ], + "carrier_names": [ + "001 Liaoning", + "002 Shandong" + ], + "helicopter_carrier": [ + "Type_071_Amphibious_Transport_Dock" + ], + "lhanames": [ + "Kunlun Shan", + "Jinggang Shan", + "Changbai Shan", + "Yimeng Shan", + "Longhu Shan", + "Wuzhi Shan", + "Wudang Shan" + ], + "destroyer": [ + "Type_052B_Destroyer", + "Type_052C_Destroyer" + ], + "cruiser": [ + "Type_054A_Frigate" + ], + "requirements": {}, + "navy_generators": [ + "Type54GroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "WingLoong_I" +} diff --git a/resources/factions/russia_1990.json b/resources/factions/russia_1990.json new file mode 100644 index 00000000..4cf97170 --- /dev/null +++ b/resources/factions/russia_1990.json @@ -0,0 +1,75 @@ +{ + "country": "Russia", + "name": "Russia 1990", + "aircrafts": [ + "MiG_23MLD", + "MiG_25PD", + "MiG_29A", + "MiG_29S", + "MiG_31", + "Su_27", + "Su_24M", + "Su_25", + "Ka_50" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "APC_BTR_80", + "IFV_BMD_1", + "IFV_BMP_1", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorad_units": [ + "SAM_SA_9_Strela_1_9P31", + "SAM_SA_13_Strela_10M3_9A35M3", + "SPAAA_ZSU_23_4_Shilka", + "AAA_ZU_23_Closed" + ], + "sams": [ + "SA6Generator", + "SA3Generator" + ], + "aircraft_carrier": [ + "CV_1143_5_Admiral_Kuznetsov" + ], + "helicopter_carrier": [ + ], + "lhanames": [ + ], + "destroyer": [ + "FF_1135M_Rezky" + ], + "cruiser": [ + "FSG_1241_1MP_Molniya" + ], + "requirements": {}, + "carrier_names": [ + "Admiral Kuznetov", + "Admiral Gorshkov" + ], + "navy_generators": [ + "RussianNavyGroupGenerator", + "KiloSubGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json new file mode 100644 index 00000000..d381322f --- /dev/null +++ b/resources/factions/usa_2005.json @@ -0,0 +1,81 @@ +{ + "country": "USA", + "name": "USA 2005", + "aircrafts": [ + "F_15C", + "F_15E", + "F_14B", + "FA_18C_hornet", + "F_16C_50", + "A_10C", + "A_10C_2", + "AV8BN", + "UH_1H", + "AH_64D" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "ATGM_M1134_Stryker", + "APC_M1126_Stryker_ICV", + "IFV_M2A2_Bradley", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorad_units": [ + "SAM_Avenger_M1097" + ], + "sams": [ + "HawkGenerator", + "PatriotGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyer": [ + "USS_Arleigh_Burke_IIa" + ], + "cruiser": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "lhanames": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} From 59010f69492f3b7b28cb88b7fc8ba0af2fae7a67 Mon Sep 17 00:00:00 2001 From: Khopa Date: Wed, 21 Oct 2020 21:40:31 +0200 Subject: [PATCH 02/29] Added support for Su-57 mod by Cubanace --- game/db.py | 7 + game/factions/russia_2020.py | 117 ++ gen/flights/ai_flight_planner_db.py | 3 + pydcs_extensions/su57/su57.py | 1736 +++++++++++++++++++++ resources/customized_payloads/Su-57.lua | 289 ++++ resources/ui/units/aircrafts/Su-57_24.jpg | Bin 0 -> 1201 bytes 6 files changed, 2152 insertions(+) create mode 100644 game/factions/russia_2020.py create mode 100644 pydcs_extensions/su57/su57.py create mode 100644 resources/customized_payloads/Su-57.lua create mode 100644 resources/ui/units/aircrafts/Su-57_24.jpg diff --git a/game/db.py b/game/db.py index 97c3c4fc..432d23dc 100644 --- a/game/db.py +++ b/game/db.py @@ -190,6 +190,7 @@ from game.factions.russia_1965 import Russia_1965 from game.factions.russia_1975 import Russia_1975 from game.factions.russia_1990 import Russia_1990 from game.factions.russia_2010 import Russia_2010 +from game.factions.russia_2020 import Russia_2020 from game.factions.spain_1990 import Spain_1990 from game.factions.sweden_1990 import Sweden_1990 from game.factions.syria import ( @@ -216,11 +217,13 @@ from game.factions.usa_2005 import USA_2005 from pydcs_extensions.a4ec.a4ec import A_4E_C from pydcs_extensions.mb339.mb339 import MB_339PAN from pydcs_extensions.rafale.rafale import Rafale_A_S, Rafale_M +from pydcs_extensions.su57.su57 import Su_57 plane_map["A-4E-C"] = A_4E_C plane_map["MB-339PAN"] = MB_339PAN plane_map["Rafale_M"] = Rafale_M plane_map["Rafale_A_S"] = Rafale_A_S +plane_map["Su-57"] = Su_57 vehicle_map["FieldHL"] = frenchpack._FIELD_HIDE vehicle_map["HARRIERH"] = frenchpack._FIELD_HIDE_SMALL @@ -297,6 +300,7 @@ PRICES = { J_11A: 26, JF_17: 20, Su_30: 24, + Su_57: 40, SpitfireLFMkIX: 14, SpitfireLFMkIXCW: 14, @@ -608,6 +612,7 @@ UNIT_BY_TASK = { F_5E_3, Su_27, Su_33, + Su_57, MiG_19P, MiG_21Bis, MiG_23MLD, @@ -975,6 +980,7 @@ FACTIONS: Dict[str, Dict[str, Any]] = { "Russia 1975": Russia_1975, "Russia 1990": Russia_1990, "Russia 2010": Russia_2010, + "Russia 2020 (Modded)": Russia_2020, "France 1995": France_1995, "France 2005": France_2005, @@ -1135,6 +1141,7 @@ PLANE_PAYLOAD_OVERRIDES: Dict[Type[PlaneType], Dict[Type[Task], str]] = { Su_24M:COMMON_OVERRIDE, Su_30: COMMON_OVERRIDE, Su_34: COMMON_OVERRIDE, + Su_57: COMMON_OVERRIDE, MiG_23MLD: COMMON_OVERRIDE, MiG_27K: COMMON_OVERRIDE, Tornado_GR4: COMMON_OVERRIDE, diff --git a/game/factions/russia_2020.py b/game/factions/russia_2020.py new file mode 100644 index 00000000..6cc60bc1 --- /dev/null +++ b/game/factions/russia_2020.py @@ -0,0 +1,117 @@ +from dcs.helicopters import ( + Ka_50, + Mi_24V, + Mi_28N, + Mi_8MT, +) +from dcs.planes import ( + A_50, + An_26B, + An_30M, + IL_76MD, + IL_78M, + L_39ZA, + MiG_29S, + MiG_31, + Su_24M, + Su_25, + Su_25T, + Su_27, + Su_30, + Su_33, + Su_34, + Yak_40, +) +from dcs.ships import ( + Bulk_cargo_ship_Yakushev, + CV_1143_5_Admiral_Kuznetsov, + Dry_cargo_ship_Ivanov, + FF_1135M_Rezky, + FSG_1241_1MP_Molniya, + Tanker_Elnya_160, +) +from dcs.vehicles import ( + AirDefence, + Armor, + Artillery, + Infantry, + Unarmed, +) + +from pydcs_extensions.su57.su57 import Su_57 + +Russia_2020 = { + "country": "Russia", + "side": "red", + "units": [ + + Su_27, + Su_30, + Su_33, + MiG_29S, + MiG_31, + Su_57, + + Su_25, + Su_25T, + Su_34, + Su_24M, + L_39ZA, + + IL_76MD, + IL_78M, + An_26B, + An_30M, + Yak_40, + A_50, + + Ka_50, + Mi_8MT, + Mi_24V, + Mi_28N, + + AirDefence.SAM_SA_19_Tunguska_2S6, + AirDefence.SAM_SA_11_Buk_LN_9A310M1, + AirDefence.SAM_SA_10_S_300PS_LN_5P85C, + + Armor.APC_BTR_80, + Armor.MBT_T_90, + Armor.MBT_T_80U, + Armor.MBT_T_72B, + Armor.IFV_BMP_1, + Armor.IFV_BMP_2, + Armor.IFV_BMP_3, + + Artillery.MLRS_9K57_Uragan_BM_27, + Artillery.SPH_2S19_Msta, + + Unarmed.Transport_Ural_375, + Unarmed.Transport_UAZ_469, + + CV_1143_5_Admiral_Kuznetsov, + Bulk_cargo_ship_Yakushev, + Dry_cargo_ship_Ivanov, + Tanker_Elnya_160, + + # Infantry squad + Infantry.Paratrooper_AKS, + Infantry.Infantry_Soldier_Rus, + Infantry.Paratrooper_RPG_16, + ], + "shorad":[ + AirDefence.SAM_SA_19_Tunguska_2S6, + AirDefence.SAM_SA_13_Strela_10M3_9A35M3 + ], "aircraft_carrier": [ + CV_1143_5_Admiral_Kuznetsov, + ], "carrier_names": [ + "Admiral Kuznetov" + ], "destroyer": [ + FF_1135M_Rezky, + ], "cruiser": [ + FSG_1241_1MP_Molniya, + ], "boat": [ + "RussianNavyGroupGenerator", "KiloSubGroupGenerator" + ], "requirements": { + "SU-57 Felon By CubanAce Simulations": "https://www.digitalcombatsimulator.com/fr/files/2539621/" + } +} diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index 2baadf7d..02b21f40 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -83,6 +83,7 @@ from pydcs_extensions.rafale.rafale import Rafale_A_S, Rafale_M # TODO: These lists really ought to be era (faction) dependent. # Factions which have F-5s, F-86s, and A-4s will should prefer F-5s for CAP, but # factions that also have F-4s should not. +from pydcs_extensions.su57.su57 import Su_57 INTERCEPT_CAPABLE = [ MiG_21Bis, @@ -120,6 +121,7 @@ CAP_CAPABLE = [ JF_17, Su_30, Su_33, + Su_57, M_2000C, Mirage_2000_5, @@ -169,6 +171,7 @@ CAP_PREFERRED = [ J_11A, Su_30, Su_33, + Su_57, M_2000C, Mirage_2000_5, diff --git a/pydcs_extensions/su57/su57.py b/pydcs_extensions/su57/su57.py new file mode 100644 index 00000000..a586222e --- /dev/null +++ b/pydcs_extensions/su57/su57.py @@ -0,0 +1,1736 @@ +from enum import Enum + +from dcs import task +from dcs.planes import PlaneType +from dcs.weapons_data import Weapons + + +class Su57Weapons: + Kh_59MK2 = {"clsid": "{KH_59MK2}", "name": "Kh-59MK2", "weight": None} + RVV_AE = {"clsid": "{RVV-AE}", "name": "RVV-AE", "weight": 250} + RVV_BD = {"clsid": "{RVV-BD}", "name": "RVV-BD", "weight": 600} + RVV_L = {"clsid": "{RVV-L}", "name": "RVV-L", "weight": 748} + RVV_M = {"clsid": "{RVV-M}", "name": "RVV-M", "weight": 190} + Su_57_Fuel_Tank = {"clsid": "{SU_57Tank}", "name": "Su-57 Fuel Tank", "weight": 1561.421} + + +class Su_57(PlaneType): + id = "Su-57" + flyable = True + height = 4.074 + width = 13.95 + length = 19.008 + fuel_max = 10300 + max_speed = 2499.984 + chaff = 100 + flare = 96 + charge_total = 200 + chaff_charge_size = 1 + flare_charge_size = 1 + category = "Interceptor" #{78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F} + + class Liveries: + + class USSR(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Georgia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Venezuela(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Australia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Israel(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Combined_Joint_Task_Forces_Blue(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Sudan(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Norway(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Romania(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Iran(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Ukraine(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Libya(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Belgium(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Slovakia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Greece(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class UK(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Third_Reich(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Hungary(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Abkhazia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Morocco(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class United_Nations_Peacekeepers(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Switzerland(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class SouthOssetia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Vietnam(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class China(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Yemen(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Kuwait(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Serbia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Oman(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class India(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Egypt(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class TheNetherlands(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Poland(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Syria(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Finland(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Kazakhstan(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Denmark(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Sweden(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Croatia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class CzechRepublic(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class GDR(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Yugoslavia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Bulgaria(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class SouthKorea(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Tunisia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Combined_Joint_Task_Forces_Red(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Lebanon(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Portugal(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Cuba(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Insurgents(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class SaudiArabia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class France(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class USA(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Honduras(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Qatar(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Russia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class United_Arab_Emirates(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Italian_Social_Republi(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Austria(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Bahrain(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Italy(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Chile(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Turkey(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Philippines(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Algeria(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Pakistan(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Malaysia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Indonesia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Iraq(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Germany(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class South_Africa(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Jordan(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Mexico(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class USAFAggressors(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Brazil(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Spain(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Belarus(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Canada(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class NorthKorea(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Ethiopia(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Japan(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Thailand(Enum): + _22 = "22" + _20 = "20" + _24 = "24" + _23 = "23" + _25 = "25" + _26 = "26" + _21 = "21" + _13 = "13" + _3 = "3" + _14 = "14" + _10 = "10" + _11 = "11" + _6 = "6" + _12 = "12" + _8 = "8" + _15 = "15" + + class Pylon1: + R_73 = (1, Weapons.R_73) + RVV_AE = (1, Su57Weapons.RVV_AE) + RVV_M = (1, Su57Weapons.RVV_M) + Smoke_Generator___red = (1, Weapons.Smoke_Generator___red) + Smoke_Generator___green = (1, Weapons.Smoke_Generator___green) + Smoke_Generator___blue = (1, Weapons.Smoke_Generator___blue) + Smoke_Generator___white = (1, Weapons.Smoke_Generator___white) + Smoke_Generator___yellow = (1, Weapons.Smoke_Generator___yellow) + Smoke_Generator___orange = (1, Weapons.Smoke_Generator___orange) + + class Pylon2: + R_27R = (2, Weapons.R_27R) + R_27ER = (2, Weapons.R_27ER) + R_27T = (2, Weapons.R_27T) + R_27ET = (2, Weapons.R_27ET) + R_77 = (2, Weapons.R_77) + R_73 = (2, Weapons.R_73) + Kh_31P = (2, Weapons.Kh_31P) + Kh_31A = (2, Weapons.Kh_31A) + Kh_29L = (2, Weapons.Kh_29L) + Kh_29T = (2, Weapons.Kh_29T) + Kh_59M = (2, Weapons.Kh_59M) + MER_6_FAB_100 = (2, Weapons.MER_6_FAB_100) + B_8M1___20_S_8KOM = (2, Weapons.B_8M1___20_S_8KOM) + B_13L___5_S_13_OF = (2, Weapons.B_13L___5_S_13_OF) + S_25_OFM = (2, Weapons.S_25_OFM) + BetAB_500 = (2, Weapons.BetAB_500) + KMGU_2___96_AO_2_5RT = (2, Weapons.KMGU_2___96_AO_2_5RT) + KMGU_2___96_PTAB_2_5KO = (2, Weapons.KMGU_2___96_PTAB_2_5KO) + FAB_250 = (2, Weapons.FAB_250) + RBK_250_PTAB_2_5M = (2, Weapons.RBK_250_PTAB_2_5M) + FAB_500_M62 = (2, Weapons.FAB_500_M62) + RBK_500_255_PTAB_10_5 = (2, Weapons.RBK_500_255_PTAB_10_5) + KAB_500L = (2, Weapons.KAB_500L) + KAB_500kr = (2, Weapons.KAB_500kr) + FAB_1500_M54 = (2, Weapons.FAB_1500_M54) + KAB_1500L = (2, Weapons.KAB_1500L) + MER_6_FAB_250 = (2, Weapons.MER_6_FAB_250) + RVV_BD = (2, Su57Weapons.RVV_BD) + RVV_AE = (2, Su57Weapons.RVV_AE) + RVV_M = (2, Su57Weapons.RVV_M) + RVV_L = (2, Su57Weapons.RVV_L) + Fuel_tank_800L_Wing = (2, Weapons.Fuel_tank_800L_Wing) + RN_28 = (2, Weapons.RN_28) + Su_57_Fuel_Tank = (2, Su57Weapons.Su_57_Fuel_Tank) + Kh_59MK2 = (2, Su57Weapons.Kh_59MK2) + Smoke_Generator___red = (2, Weapons.Smoke_Generator___red) + Smoke_Generator___green = (2, Weapons.Smoke_Generator___green) + Smoke_Generator___blue = (2, Weapons.Smoke_Generator___blue) + Smoke_Generator___white = (2, Weapons.Smoke_Generator___white) + Smoke_Generator___yellow = (2, Weapons.Smoke_Generator___yellow) + Smoke_Generator___orange = (2, Weapons.Smoke_Generator___orange) + + class Pylon3: + R_73 = (3, Weapons.R_73) + Smoke_Generator___red = (3, Weapons.Smoke_Generator___red) + Smoke_Generator___green = (3, Weapons.Smoke_Generator___green) + Smoke_Generator___blue = (3, Weapons.Smoke_Generator___blue) + Smoke_Generator___white = (3, Weapons.Smoke_Generator___white) + Smoke_Generator___yellow = (3, Weapons.Smoke_Generator___yellow) + Smoke_Generator___orange = (3, Weapons.Smoke_Generator___orange) + + class Pylon4: + R_27R = (4, Weapons.R_27R) + R_27ER = (4, Weapons.R_27ER) + R_27T = (4, Weapons.R_27T) + R_27ET = (4, Weapons.R_27ET) + R_77 = (4, Weapons.R_77) + R_73 = (4, Weapons.R_73) + Kh_31P = (4, Weapons.Kh_31P) + Kh_31A = (4, Weapons.Kh_31A) + Kh_29L = (4, Weapons.Kh_29L) + Kh_29T = (4, Weapons.Kh_29T) + Kh_59M = (4, Weapons.Kh_59M) + MER_6_FAB_100 = (4, Weapons.MER_6_FAB_100) + B_8M1___20_S_8KOM = (4, Weapons.B_8M1___20_S_8KOM) + B_13L___5_S_13_OF = (4, Weapons.B_13L___5_S_13_OF) + S_25_OFM = (4, Weapons.S_25_OFM) + BetAB_500 = (4, Weapons.BetAB_500) + KMGU_2___96_AO_2_5RT = (4, Weapons.KMGU_2___96_AO_2_5RT) + KMGU_2___96_PTAB_2_5KO = (4, Weapons.KMGU_2___96_PTAB_2_5KO) + FAB_250 = (4, Weapons.FAB_250) + RBK_250_PTAB_2_5M = (4, Weapons.RBK_250_PTAB_2_5M) + FAB_500_M62 = (4, Weapons.FAB_500_M62) + RBK_500_255_PTAB_10_5 = (4, Weapons.RBK_500_255_PTAB_10_5) + KAB_500L = (4, Weapons.KAB_500L) + KAB_500kr = (4, Weapons.KAB_500kr) + FAB_1500_M54 = (4, Weapons.FAB_1500_M54) + KAB_1500L = (4, Weapons.KAB_1500L) + MER_6_FAB_250 = (4, Weapons.MER_6_FAB_250) + RVV_BD = (4, Su57Weapons.RVV_BD) + RVV_AE = (4, Su57Weapons.RVV_AE) + RVV_M = (4, Su57Weapons.RVV_M) + RVV_L = (4, Su57Weapons.RVV_L) + RN_28 = (4, Weapons.RN_28) + Su_57_Fuel_Tank = (4, Su57Weapons.Su_57_Fuel_Tank) + Kh_59MK2 = (4, Su57Weapons.Kh_59MK2) + + class Pylon5: + R_77 = (5, Weapons.R_77) + RVV_AE = (5, Su57Weapons.RVV_AE) + RVV_M = (5, Su57Weapons.RVV_M) + Kh_59MK2 = (5, Su57Weapons.Kh_59MK2) + + class Pylon6: + R_77 = (6, Weapons.R_77) + RVV_AE = (6, Su57Weapons.RVV_AE) + RVV_M = (6, Su57Weapons.RVV_M) + Kh_59MK2 = (6, Su57Weapons.Kh_59MK2) + + class Pylon7: + R_77 = (7, Weapons.R_77) + RVV_AE = (7, Su57Weapons.RVV_AE) + RVV_M = (7, Su57Weapons.RVV_M) + Kh_59MK2 = (7, Su57Weapons.Kh_59MK2) + + class Pylon8: + R_77 = (8, Weapons.R_77) + RVV_AE = (8, Su57Weapons.RVV_AE) + RVV_M = (8, Su57Weapons.RVV_M) + Kh_59MK2 = (8, Su57Weapons.Kh_59MK2) + + class Pylon9: + R_27R = (9, Weapons.R_27R) + R_27ER = (9, Weapons.R_27ER) + R_27T = (9, Weapons.R_27T) + R_27ET = (9, Weapons.R_27ET) + R_77 = (9, Weapons.R_77) + R_73 = (9, Weapons.R_73) + Kh_31P = (9, Weapons.Kh_31P) + Kh_31A = (9, Weapons.Kh_31A) + Kh_29L = (9, Weapons.Kh_29L) + Kh_29T = (9, Weapons.Kh_29T) + Kh_59M = (9, Weapons.Kh_59M) + MER_6_FAB_100 = (9, Weapons.MER_6_FAB_100) + B_8M1___20_S_8KOM = (9, Weapons.B_8M1___20_S_8KOM) + B_13L___5_S_13_OF = (9, Weapons.B_13L___5_S_13_OF) + S_25_OFM = (9, Weapons.S_25_OFM) + BetAB_500 = (9, Weapons.BetAB_500) + KMGU_2___96_AO_2_5RT = (9, Weapons.KMGU_2___96_AO_2_5RT) + KMGU_2___96_PTAB_2_5KO = (9, Weapons.KMGU_2___96_PTAB_2_5KO) + FAB_250 = (9, Weapons.FAB_250) + RBK_250_PTAB_2_5M = (9, Weapons.RBK_250_PTAB_2_5M) + FAB_500_M62 = (9, Weapons.FAB_500_M62) + RBK_500_255_PTAB_10_5 = (9, Weapons.RBK_500_255_PTAB_10_5) + KAB_500L = (9, Weapons.KAB_500L) + KAB_500kr = (9, Weapons.KAB_500kr) + FAB_1500_M54 = (9, Weapons.FAB_1500_M54) + KAB_1500L = (9, Weapons.KAB_1500L) + MER_6_FAB_250 = (9, Weapons.MER_6_FAB_250) + RVV_BD = (9, Su57Weapons.RVV_BD) + RVV_AE = (9, Su57Weapons.RVV_AE) + RVV_M = (9, Su57Weapons.RVV_M) + RVV_L = (9, Su57Weapons.RVV_L) + RN_28 = (9, Weapons.RN_28) + Su_57_Fuel_Tank = (9, Su57Weapons.Su_57_Fuel_Tank) + Kh_59MK2 = (9, Su57Weapons.Kh_59MK2) + + class Pylon10: + R_73 = (10, Weapons.R_73) + Smoke_Generator___red = (10, Weapons.Smoke_Generator___red) + Smoke_Generator___green = (10, Weapons.Smoke_Generator___green) + Smoke_Generator___blue = (10, Weapons.Smoke_Generator___blue) + Smoke_Generator___white = (10, Weapons.Smoke_Generator___white) + Smoke_Generator___yellow = (10, Weapons.Smoke_Generator___yellow) + Smoke_Generator___orange = (10, Weapons.Smoke_Generator___orange) + + class Pylon11: + R_27R = (11, Weapons.R_27R) + R_27ER = (11, Weapons.R_27ER) + R_27T = (11, Weapons.R_27T) + R_27ET = (11, Weapons.R_27ET) + R_77 = (11, Weapons.R_77) + R_73 = (11, Weapons.R_73) + Kh_31P = (11, Weapons.Kh_31P) + Kh_31A = (11, Weapons.Kh_31A) + Kh_29L = (11, Weapons.Kh_29L) + Kh_29T = (11, Weapons.Kh_29T) + Kh_59M = (11, Weapons.Kh_59M) + MER_6_FAB_100 = (11, Weapons.MER_6_FAB_100) + B_8M1___20_S_8KOM = (11, Weapons.B_8M1___20_S_8KOM) + B_13L___5_S_13_OF = (11, Weapons.B_13L___5_S_13_OF) + S_25_OFM = (11, Weapons.S_25_OFM) + BetAB_500 = (11, Weapons.BetAB_500) + KMGU_2___96_AO_2_5RT = (11, Weapons.KMGU_2___96_AO_2_5RT) + KMGU_2___96_PTAB_2_5KO = (11, Weapons.KMGU_2___96_PTAB_2_5KO) + FAB_250 = (11, Weapons.FAB_250) + RBK_250_PTAB_2_5M = (11, Weapons.RBK_250_PTAB_2_5M) + FAB_500_M62 = (11, Weapons.FAB_500_M62) + RBK_500_255_PTAB_10_5 = (11, Weapons.RBK_500_255_PTAB_10_5) + KAB_500L = (11, Weapons.KAB_500L) + KAB_500kr = (11, Weapons.KAB_500kr) + FAB_1500_M54 = (11, Weapons.FAB_1500_M54) + KAB_1500L = (11, Weapons.KAB_1500L) + MER_6_FAB_250 = (11, Weapons.MER_6_FAB_250) +#ERRR {R-33} + RVV_BD = (11,Su57Weapons.RVV_BD) + RVV_AE = (11, Su57Weapons.RVV_AE) + RVV_M = (11, Su57Weapons.RVV_M) + RVV_L = (11, Su57Weapons.RVV_L) + Fuel_tank_800L_Wing = (11, Weapons.Fuel_tank_800L_Wing) + Su_57_Fuel_Tank = (11, Su57Weapons.Su_57_Fuel_Tank) + RN_28 = (11, Weapons.RN_28) + Smoke_Generator___red = (11, Weapons.Smoke_Generator___red) + Smoke_Generator___green = (11, Weapons.Smoke_Generator___green) + Smoke_Generator___blue = (11, Weapons.Smoke_Generator___blue) + Smoke_Generator___white = (11, Weapons.Smoke_Generator___white) + Smoke_Generator___yellow = (11, Weapons.Smoke_Generator___yellow) + Smoke_Generator___orange = (11, Weapons.Smoke_Generator___orange) + Kh_59MK2 = (11, Su57Weapons.Kh_59MK2) + + class Pylon12: + R_73 = (12, Weapons.R_73) + RVV_AE = (12, Su57Weapons.RVV_AE) + RVV_M = (12, Su57Weapons.RVV_M) + Smoke_Generator___red = (12, Weapons.Smoke_Generator___red) + Smoke_Generator___green = (12, Weapons.Smoke_Generator___green) + Smoke_Generator___blue = (12, Weapons.Smoke_Generator___blue) + Smoke_Generator___white = (12, Weapons.Smoke_Generator___white) + Smoke_Generator___yellow = (12, Weapons.Smoke_Generator___yellow) + Smoke_Generator___orange = (12, Weapons.Smoke_Generator___orange) + + pylons = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} + + tasks = [task.CAP, task.Intercept, task.Escort, task.FighterSweep, task.AFAC, task.GroundAttack, task.RunwayAttack, task.AntishipStrike, task.CAS] + task_default = task.CAP diff --git a/resources/customized_payloads/Su-57.lua b/resources/customized_payloads/Su-57.lua new file mode 100644 index 00000000..fd4f7479 --- /dev/null +++ b/resources/customized_payloads/Su-57.lua @@ -0,0 +1,289 @@ +local unitPayloads = { + ["name"] = "Su-57", + ["payloads"] = { + [1] = { + ["name"] = "CAP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 12, + }, + [2] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 11, + }, + [4] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 2, + }, + [5] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 7, + }, + [6] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 6, + }, + [7] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 8, + }, + [8] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 5, + }, + [9] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 4, + }, + [10] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 3, + }, + [11] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 9, + }, + [12] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 10, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [2] = { + ["name"] = "SEAD", + ["pylons"] = { + [1] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 12, + }, + [2] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{40AB87E8-BEFB-4D85-90D9-B2753ACF9514}", + ["num"] = 2, + }, + [4] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 3, + }, + [5] = { + ["CLSID"] = "{40AB87E8-BEFB-4D85-90D9-B2753ACF9514}", + ["num"] = 11, + }, + [6] = { + ["CLSID"] = "{40AB87E8-BEFB-4D85-90D9-B2753ACF9514}", + ["num"] = 9, + }, + [7] = { + ["CLSID"] = "{40AB87E8-BEFB-4D85-90D9-B2753ACF9514}", + ["num"] = 4, + }, + [8] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 8, + }, + [9] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 5, + }, + [10] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 6, + }, + [11] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 7, + }, + [12] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 10, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [3] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 12, + }, + [2] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 2, + }, + [4] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 3, + }, + [5] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 11, + }, + [6] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 9, + }, + [7] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 4, + }, + [8] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 8, + }, + [9] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 5, + }, + [10] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 6, + }, + [11] = { + ["CLSID"] = "{KH_59MK2}", + ["num"] = 7, + }, + [12] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 10, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [4] = { + ["name"] = "CAS", + ["pylons"] = { + [1] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 12, + }, + [2] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{B4FC81C9-B861-4E87-BBDC-A1158E648EBF}", + ["num"] = 2, + }, + [4] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 3, + }, + [5] = { + ["CLSID"] = "{B4FC81C9-B861-4E87-BBDC-A1158E648EBF}", + ["num"] = 11, + }, + [6] = { + ["CLSID"] = "{F72F47E5-C83A-4B85-96ED-D3E46671EE9A}", + ["num"] = 9, + }, + [7] = { + ["CLSID"] = "{F72F47E5-C83A-4B85-96ED-D3E46671EE9A}", + ["num"] = 4, + }, + [8] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 8, + }, + [9] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 5, + }, + [10] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 6, + }, + [11] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 7, + }, + [12] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 10, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [5] = { + ["name"] = "STRIKE", + ["pylons"] = { + [1] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 12, + }, + [2] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}", + ["num"] = 2, + }, + [4] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 3, + }, + [5] = { + ["CLSID"] = "{3C612111-C7AD-476E-8A8E-2485812F4E5C}", + ["num"] = 11, + }, + [6] = { + ["CLSID"] = "{53BE25A4-C86C-4571-9BC0-47D668349595}", + ["num"] = 9, + }, + [7] = { + ["CLSID"] = "{53BE25A4-C86C-4571-9BC0-47D668349595}", + ["num"] = 4, + }, + [8] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 8, + }, + [9] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 5, + }, + [10] = { + ["CLSID"] = "{FBC29BFE-3D24-4C64-B81D-941239D12249}", + ["num"] = 10, + }, + [11] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 7, + }, + [12] = { + ["CLSID"] = "{RVV-AE}", + ["num"] = 6, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + }, + ["tasks"] = { + }, + ["unitType"] = "Su-57", +} +return unitPayloads diff --git a/resources/ui/units/aircrafts/Su-57_24.jpg b/resources/ui/units/aircrafts/Su-57_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..adf32207a675ba5bb76be8b62585dd89fceb0451 GIT binary patch literal 1201 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!xx+I*%kd^JG+lwS2`a!&%FIq|H*!x1%2hB z=Y8f#z1P#%o6@rB(!2F4>MRY)y|t&e%TLRmex-)7xN?Q>iu}&J)Cs5C$_}V+_p4a6 z=G~f}MBY-XT)E%BgHE46#P&}$?)Z+?H`Y}jzNNNy@m=j{+cTm&nNI)e>AUiuLFmWa z63vT?wupzFlP*>{=;OnGS9#VdQ|Ykkt^n`g>RjpUw*E&xLj04xc9wndWUf~Xd-$ z=L-v0e^%GGoYmWUx5^$7FZSq9I-(K0PgA7G<1z0mj`y!a9`3y&WLbA}(JQTs>Cd|4 z4J>4jU8>u$Y?T_{++N--xyyde*P66ucY{S@^G_*%lb~-MG3}abUPk5Z<;kv53-f8I zNXxice0@3lN48BS_t}pwjoo@}{+j!Ww?bFPd&2 z@sX_iFv+m(`-_5X#kYI1I5JG5!%`m?rn2-Ov(i|r9OW4iu64fhqt?wUhbxu!eK&eb zGrqr&wEpIg=HqTb*9GF-&J-+MZf*Fga9(wwt9jtojh=H=d;Y1+J+gh)oox%4Sog4a zNdH}Qq^@cCj(=BYddV3kN1a0i}S<~iIbIeq+_zkD} O*F{~+Ee-DczX Date: Thu, 22 Oct 2020 01:32:33 +0200 Subject: [PATCH 03/29] Factions are properly loaded, now need to refactor whole code. --- game/db.py | 6 +- game/factions/faction.py | 104 +++++++++++++++++------- game/factions/faction_loader.py | 19 +++-- qt_ui/windows/newgame/QNewGameWizard.py | 18 ++-- resources/factions/russia_2010.json | 81 ++++++++++++++++++ resources/factions/usa_2005.json | 2 +- 6 files changed, 182 insertions(+), 48 deletions(-) create mode 100644 resources/factions/russia_2010.json diff --git a/game/db.py b/game/db.py index 432d23dc..d09ba7eb 100644 --- a/game/db.py +++ b/game/db.py @@ -149,6 +149,7 @@ from dcs.vehicles import ( ) import pydcs_extensions.frenchpack.frenchpack as frenchpack +from game.factions import faction_loader from game.factions.australia_2005 import Australia_2005 from game.factions.bluefor_coldwar import BLUEFOR_COLDWAR from game.factions.bluefor_coldwar_a4 import BLUEFOR_COLDWAR_A4 @@ -156,6 +157,7 @@ from game.factions.bluefor_coldwar_mods import BLUEFOR_COLDWAR_MODS from game.factions.bluefor_modern import BLUEFOR_MODERN from game.factions.canada_2005 import Canada_2005 from game.factions.china_2010 import China_2010 +from game.factions.faction import Faction from game.factions.france_1995 import France_1995 from game.factions.france_2005 import France_2005 from game.factions.france_modded import France_2005_Modded @@ -961,7 +963,9 @@ CARRIER_TAKEOFF_BAN: List[Type[FlyingType]] = [ Units separated by country. country : DCS Country name """ -FACTIONS: Dict[str, Dict[str, Any]] = { +FACTIONS : [Faction] = faction_loader.load_factions() + +FACTIONS3: Dict[str, Dict[str, Any]] = { "Bluefor Modern": BLUEFOR_MODERN, "Bluefor Cold War 1970s": BLUEFOR_COLDWAR, diff --git a/game/factions/faction.py b/game/factions/faction.py index 33794f5e..be135ce1 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -2,11 +2,12 @@ import logging from dataclasses import dataclass from typing import Optional +import dcs from dcs.planes import PlaneType, plane_map from dcs.unittype import VehicleType, UnitType from dcs.vehicles import vehicle_map, Armor, Unarmed, Infantry, Fortification, Artillery, AirDefence -from game.data.doctrine import Doctrine +from game.data.doctrine import Doctrine, MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE @dataclass @@ -36,6 +37,9 @@ class Faction: # Infantry units used infantry_units: [VehicleType] + # Logistics units used + logistics_units: [VehicleType] + # List of units that can be deployed as SHORAD shorad_units: [VehicleType] @@ -70,7 +74,26 @@ class Faction: doctrine: Doctrine def __init__(self): - pass + self.country = "" + self.name = "" + self.aircrafts = [] + self.awacs = [] + self.tankers = [] + self.frontline_units = [] + self.artillery_units = [] + self.infantry_units = [] + self.logistics_units = [] + self.shorad_units = [] + self.sams = [] + self.requirements = {} + self.carrier_names = [] + self.lha_names = [] + self.navy_generators = [] + self.destroyers = [] + self.cruisers = [] + self.has_jtac = False + self.jtac_unit = "" + self.doctrine = None @classmethod def from_json(cls, json): @@ -80,42 +103,63 @@ class Faction: faction.country = json.get("country", "USA") faction.name = json.get("name", "???") - faction.aircrafts = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("aircrafts", [])] is not None] - faction.awacs = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("awacs", [])] is not None] - faction.tankers = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("tankers", [])] is not None] + faction.aircrafts = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("aircrafts", [])] if f is not None] + faction.awacs = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("awacs", [])] if f is not None] + faction.tankers = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("tankers", [])] if f is not None] + + faction.frontline_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("frontline_units", [])] if f is not None] + faction.artillery_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("artillery_units", [])] if f is not None] + faction.infantry_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("infantry_units", [])] if f is not None] + faction.logistics_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("logistics_units", [])] if f is not None] + faction.shorad_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("shorad_units", [])] if f is not None] + + faction.sams = json.get("sams", []) + faction.name = json.get("requirements", {}) + + faction.carrier_names = json.get("carrier_names", []) + faction.lha_names = json.get("lha_names", []) + faction.navy_generators = json.get("navy_generators", []) + faction.destroyers = [f for f in [ship_loader(vehicle) for vehicle in json.get("destroyers", [])] if f is not None] + faction.cruisers = [f for f in [ship_loader(vehicle) for vehicle in json.get("cruisers", [])] if f is not None] + faction.has_jtac = json.get("has_jtac", False) + faction.jtac_unit = json.get("jtac_unit", "") + + # Load doctrine + doctrine = json.get("doctrine", "modern") + if doctrine == "modern": + faction.doctrine = MODERN_DOCTRINE + if doctrine == "coldwar": + faction.doctrine = COLDWAR_DOCTRINE + else: + faction.doctrine = WWII_DOCTRINE + + return faction + + @property + def units(self): + return self.infantry_units + self.aircrafts + self.awacs + self.artillery_units + self.frontline_units + self.tankers + self.logistics_units -def aircraft_loader(aircraft: str) -> Optional[PlaneType]: +def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: """ - Find aircraft by name - :param aircraft: Aircraft name as string - :return: The aircraft as a PyDCS type + Find unit by name + :param unit: Unit name as string + :return: The unit as a PyDCS type """ - if aircraft in plane_map.keys(): - return plane_map[aircraft] + if unit in plane_map.keys(): + return plane_map[unit] else: - for mother_class in [PlaneType, Unarmed, Infantry, Armor, AirDefence, Artillery, Fortification]: - if getattr(mother_class, vehicle) is not None: - return getattr(mother_class, vehicle) - logging.info("FACTION ERROR : Unable to find " + aircraft + " in pydcs") + for mother_class in class_repository: + if getattr(mother_class, unit, None) is not None: + return getattr(mother_class, unit) + logging.info("FACTION ERROR : Unable to find " + unit + " in pydcs") + print("FACTION ERROR : Unable to find " + unit + " in pydcs") return None -def vehicle_loader(vehicle: str) -> Optional[VehicleType]: - """ - Find vehicle by name - :param vehicle: Vehicle name as string - :return: The vehicle as a PyDCS type - """ - if vehicle in plane_map.keys(): - return plane_map[vehicle] - else: - for mother_class in [Armor, Unarmed, Infantry, Armor, AirDefence, Artillery, Fortification]: - if getattr(mother_class, vehicle) is not None: - return getattr(mother_class, vehicle) - logging.info("FACTION ERROR : Unable to find " + vehicle + " in pydcs") - return None -vehicle_map +aircraft_loader = lambda x: unit_loader(x, [dcs.planes, dcs.helicopters]) +vehicle_loader = lambda x: unit_loader(x, [Infantry, Unarmed, Armor, AirDefence, Artillery]) +ship_loader = lambda x: unit_loader(x, [dcs.ships]) diff --git a/game/factions/faction_loader.py b/game/factions/faction_loader.py index a743c177..6b439b9e 100644 --- a/game/factions/faction_loader.py +++ b/game/factions/faction_loader.py @@ -2,6 +2,8 @@ import json import os import logging +from game.factions.faction import Faction + FACTION_DIRECTORY = "./resources/factions/" def load_factions() -> {}: @@ -11,16 +13,19 @@ def load_factions() -> {}: factions = {} for f in files: + print(f) path = os.path.join(FACTION_DIRECTORY, f) logging.info("Loading faction" + path) - try: - with open(path, "r") as fdata: - data = json.load(fdata) - factions[data["name"]] = data - logging.info("Loaded faction : " + path) - except: - logging.error("Unable to load faction : " + path) + #try: + with open(path, "r") as fdata: + data = json.load(fdata) + factions[data["name"]] = Faction.from_json(data) + logging.info("Loaded faction : " + path) + #except Exception as e: + # print(e) + # logging.error("Unable to load faction : " + path) + print(factions) return factions diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index 9f49e8d1..04535aae 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -200,8 +200,8 @@ class FactionSelection(QtWidgets.QWizardPage): red_faction = db.FACTIONS[self.redFactionSelect.currentText()] blue_faction = db.FACTIONS[self.blueFactionSelect.currentText()] - red_units = red_faction["units"] - blue_units = blue_faction["units"] + red_units = red_faction.aircrafts + blue_units = blue_faction.aircrafts blue_txt = "" for u in blue_units: @@ -218,16 +218,16 @@ class FactionSelection(QtWidgets.QWizardPage): self.redSideRecap.setText(red_txt) has_mod = False - if "requirements" in red_faction.keys(): + if len(red_faction.requirements.keys()) > 0: has_mod = True - for mod in red_faction["requirements"].keys(): - self.requiredMods.setText(self.requiredMods.text() + "\n
  • " + mod + ": " + red_faction["requirements"][mod] + "
  • ") + for mod in red_faction.requirements.keys(): + self.requiredMods.setText(self.requiredMods.text() + "\n
  • " + mod + ": " + red_faction.requirements[mod] + "
  • ") - if "requirements" in blue_faction.keys(): + if len(blue_faction.requirements.keys()) > 0: has_mod = True - for mod in blue_faction["requirements"].keys(): - if not "requirements" in red_faction.keys() or mod not in red_faction["requirements"].keys(): - self.requiredMods.setText(self.requiredMods.text() + "\n
  • " + mod + ": " + blue_faction["requirements"][mod] + "
  • ") + for mod in blue_faction.requirements.keys(): + if not "requirements" in red_faction.keys() or mod not in red_faction.requirements.keys(): + self.requiredMods.setText(self.requiredMods.text() + "\n
  • " + mod + ": " + blue_faction.requirements[mod] + "
  • ") if has_mod: self.requiredMods.setText(self.requiredMods.text() + "\n\n") diff --git a/resources/factions/russia_2010.json b/resources/factions/russia_2010.json new file mode 100644 index 00000000..0d5c59da --- /dev/null +++ b/resources/factions/russia_2010.json @@ -0,0 +1,81 @@ +{ + "country": "Russia", + "name": "Russia 2010", + "aircrafts": [ + "MiG_29S", + "MiG_31", + "Su_24M", + "Su_25", + "Su_25T", + "Su_27", + "Su_30", + "Su_33", + "Su_34", + "L_39ZA", + "Mi_8MT", + "Mi_24V", + "Mi_28N", + "Ka_50" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_1", + "IFV_BMP_2", + "IFV_BMP_3", + "APC_BTR_80", + "MBT_T_90", + "MBT_T_80U", + "MBT_T_72B" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorad_units": [ + "SAM_SA_19_Tunguska_2S6", + "SAM_SA_13_Strela_10M3_9A35M3" + ], + "sams": [ + "SA11Generator", + "SA10Generator", + "SA6Generator", + "SA19Generator" + ], + "aircraft_carrier": [ + "CV_1143_5_Admiral_Kuznetsov" + ], + "helicopter_carrier": [ + ], + "lhanames": [ + ], + "destroyer": [ + "FF_1135M_Rezky" + ], + "cruiser": [ + "FSG_1241_1MP_Molniya" + ], + "requirements": {}, + "carrier_names": [ + "Admiral Kuznetov" + ], + "navy_generators": [ + "RussianNavyGroupGenerator", + "KiloSubGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index d381322f..e827b5fc 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -9,7 +9,7 @@ "F_16C_50", "A_10C", "A_10C_2", - "AV8BN", + "AV8BNA", "UH_1H", "AH_64D" ], From aa1ac56ec39de3da6765632323f2f2595650f03e Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 22 Oct 2020 13:33:18 +0200 Subject: [PATCH 04/29] Faction rework, working :) --- game/db.py | 10 ++- game/factions/faction.py | 54 ++++++++++++-- game/game.py | 16 +++-- game/operation/operation.py | 4 +- gen/armor.py | 6 +- gen/defenses/armor_group_generator.py | 3 +- gen/fleet/carrier_group.py | 12 ++-- gen/fleet/lha_group.py | 10 +-- gen/fleet/ship_group_generator.py | 18 +++-- gen/flights/flightplan.py | 2 +- gen/missiles/missiles_group_generator.py | 4 +- gen/sam/sam_group_generator.py | 87 ++++++++++------------- resources/factions/china_2010.json | 12 ++-- resources/factions/russia_1990.json | 14 ++-- resources/factions/russia_2010.json | 10 +-- resources/factions/usa_2005.json | 8 +-- resources/tools/generate_loadout_check.py | 2 +- theater/start_generator.py | 34 +++------ 18 files changed, 163 insertions(+), 143 deletions(-) diff --git a/game/db.py b/game/db.py index d09ba7eb..304468f8 100644 --- a/game/db.py +++ b/game/db.py @@ -1325,6 +1325,7 @@ def upgrade_to_supercarrier(unit, name: str): else: return unit + def unit_task(unit: UnitType) -> Optional[Task]: for task, units in UNIT_BY_TASK.items(): if unit in units: @@ -1336,8 +1337,10 @@ def unit_task(unit: UnitType) -> Optional[Task]: print(unit.name + " cause issue") return None + def find_unittype(for_task: Task, country_name: str) -> List[UnitType]: - return [x for x in UNIT_BY_TASK[for_task] if x in FACTIONS[country_name]["units"]] + return [x for x in UNIT_BY_TASK[for_task] if x in FACTIONS[country_name].units] + def find_infantry(country_name: str) -> List[UnitType]: inf = [ @@ -1354,14 +1357,17 @@ def find_infantry(country_name: str) -> List[UnitType]: Infantry.Infantry_M1_Garand, Infantry.Infantry_M1_Garand, Infantry.Infantry_M1_Garand, Infantry.Infantry_Soldier_Insurgents, Infantry.Infantry_Soldier_Insurgents, Infantry.Infantry_Soldier_Insurgents ] - return [x for x in inf if x in FACTIONS[country_name]["units"]] + return [x for x in inf if x in FACTIONS[country_name].infantry_units] + def unit_type_name(unit_type) -> str: return unit_type.id and unit_type.id or unit_type.name + def unit_type_name_2(unit_type) -> str: return unit_type.name and unit_type.name or unit_type.id + def unit_type_from_name(name: str) -> Optional[UnitType]: if name in vehicle_map: return vehicle_map[name] diff --git a/game/factions/faction.py b/game/factions/faction.py index be135ce1..3595b10b 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -7,6 +7,7 @@ from dcs.planes import PlaneType, plane_map from dcs.unittype import VehicleType, UnitType from dcs.vehicles import vehicle_map, Armor, Unarmed, Infantry, Fortification, Artillery, AirDefence +from game.data.building_data import WW2_ALLIES_BUILDINGS, DEFAULT_AVAILABLE_BUILDINGS, WW2_GERMANY_BUILDINGS from game.data.doctrine import Doctrine, MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE @@ -41,14 +42,23 @@ class Faction: logistics_units: [VehicleType] # List of units that can be deployed as SHORAD - shorad_units: [VehicleType] + shorads: [str] # Possible SAMS site generators for this faction sams: [str] + # Possible Missile site generators for this faction + missiles: [str] + # Required mods or asset packs requirements: {str: str} + # possible aircraft carrier units + aircraft_carrier: [UnitType] + + # possible helicopter carrier units + helicopter_carrier: [UnitType] + # Possible carrier names carrier_names: [str] @@ -64,15 +74,24 @@ class Faction: # Available cruisers cruisers: [str] - # JTAC + # How many navy group should we try to generate per CP on startup for this faction + navy_group_count: int + + # How many missiles group should we try to generate per CP on startup for this faction + missiles_group_count: int + + # Whether this faction has JTAC access has_jtac: bool - # Unit to use as JTAC + # Unit to use as JTAC for this faction jtac_unit: str # doctrine doctrine: Doctrine + # List of available buildings for this faction + building_set: [str] + def __init__(self): self.country = "" self.name = "" @@ -83,14 +102,19 @@ class Faction: self.artillery_units = [] self.infantry_units = [] self.logistics_units = [] - self.shorad_units = [] + self.shorads = [] self.sams = [] + self.missiles = [] self.requirements = {} + self.aircraft_carrier = [] + self.helicopter_carrier = [] self.carrier_names = [] self.lha_names = [] self.navy_generators = [] self.destroyers = [] self.cruisers = [] + self.navy_group_count = 0 + self.missiles_group_count = 0 self.has_jtac = False self.jtac_unit = "" self.doctrine = None @@ -111,18 +135,23 @@ class Faction: faction.artillery_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("artillery_units", [])] if f is not None] faction.infantry_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("infantry_units", [])] if f is not None] faction.logistics_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("logistics_units", [])] if f is not None] - faction.shorad_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("shorad_units", [])] if f is not None] + faction.shorads = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("shorads", [])] if f is not None] faction.sams = json.get("sams", []) + faction.missiles = json.get("missiles", []) faction.name = json.get("requirements", {}) faction.carrier_names = json.get("carrier_names", []) faction.lha_names = json.get("lha_names", []) faction.navy_generators = json.get("navy_generators", []) + faction.aircraft_carrier = [f for f in [ship_loader(vehicle) for vehicle in json.get("aircraft_carrier", [])] if f is not None] + faction.helicopter_carrier = [f for f in [ship_loader(vehicle) for vehicle in json.get("helicopter_carrier", [])] if f is not None] faction.destroyers = [f for f in [ship_loader(vehicle) for vehicle in json.get("destroyers", [])] if f is not None] faction.cruisers = [f for f in [ship_loader(vehicle) for vehicle in json.get("cruisers", [])] if f is not None] faction.has_jtac = json.get("has_jtac", False) - faction.jtac_unit = json.get("jtac_unit", "") + faction.jtac_unit = aircraft_loader(json.get("jtac_unit", None)) + faction.navy_group_count = int(json.get("navy_group_count", 1)) + faction.missiles_group_count = int(json.get("missiles_group_count", 0)) # Load doctrine doctrine = json.get("doctrine", "modern") @@ -133,6 +162,15 @@ class Faction: else: faction.doctrine = WWII_DOCTRINE + # Load the building set + building_set = json.get("building_set", "default") + if building_set == "default": + faction.building_set = DEFAULT_AVAILABLE_BUILDINGS + elif building_set == "ww2ally": + faction.building_set = WW2_ALLIES_BUILDINGS + else: + faction.building_set = WW2_GERMANY_BUILDINGS + return faction @property @@ -146,7 +184,9 @@ def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: :param unit: Unit name as string :return: The unit as a PyDCS type """ - if unit in plane_map.keys(): + if unit is None: + return None + elif unit in plane_map.keys(): return plane_map[unit] else: for mother_class in class_repository: diff --git a/game/game.py b/game/game.py index bd0f68f7..53e81619 100644 --- a/game/game.py +++ b/game/game.py @@ -26,6 +26,7 @@ from . import persistency from .debriefing import Debriefing from .event.event import Event, UnitsDeliveryEvent from .event.frontlineattack import FrontlineAttackEvent +from .factions.faction import Faction from .infos.information import Information from .settings import Settings from plugin import LuaPluginManager @@ -76,9 +77,9 @@ class Game: self.events: List[Event] = [] self.theater = theater self.player_name = player_name - self.player_country = db.FACTIONS[player_name]["country"] + self.player_country = db.FACTIONS[player_name].country self.enemy_name = enemy_name - self.enemy_country = db.FACTIONS[enemy_name]["country"] + self.enemy_country = db.FACTIONS[enemy_name].country self.turn = 0 self.date = date(start_date.year, start_date.month, start_date.day) self.game_stats = GameStats() @@ -123,11 +124,11 @@ class Game: self.enemy_country = "Russia" @property - def player_faction(self) -> Dict[str, Any]: + def player_faction(self) -> Faction: return db.FACTIONS[self.player_name] @property - def enemy_faction(self) -> Dict[str, Any]: + def enemy_faction(self) -> Faction: return db.FACTIONS[self.enemy_name] def _roll(self, prob, mult): @@ -314,7 +315,7 @@ class Game: potential_cp_armor = self.theater.enemy_points() i = 0 - potential_units = [u for u in db.FACTIONS[self.enemy_name]["units"] if u in db.UNIT_BY_TASK[PinpointStrike]] + potential_units = db.FACTIONS[self.enemy_name].frontline_units print("Enemy Recruiting") print(potential_cp_armor) @@ -340,8 +341,9 @@ class Game: if budget_for_armored_units > 0: budget_for_aircraft += budget_for_armored_units - potential_units = [u for u in db.FACTIONS[self.enemy_name]["units"] if - u in db.UNIT_BY_TASK[CAS] or u in db.UNIT_BY_TASK[CAP]] + potential_units = [u for u in db.FACTIONS[self.enemy_name].aircrafts + if u in db.UNIT_BY_TASK[CAS] or u in db.UNIT_BY_TASK[CAP]] + if len(potential_units) > 0 and len(potential_cp_armor) > 0: while budget_for_aircraft > 0: i = i + 1 diff --git a/game/operation/operation.py b/game/operation/operation.py index c83f903f..dade4eb6 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -66,9 +66,9 @@ class Operation: to_cp: ControlPoint): self.game = game self.attacker_name = attacker_name - self.attacker_country = db.FACTIONS[attacker_name]["country"] + self.attacker_country = db.FACTIONS[attacker_name].country self.defender_name = defender_name - self.defender_country = db.FACTIONS[defender_name]["country"] + self.defender_country = db.FACTIONS[defender_name].country print(self.defender_country, self.attacker_country) self.from_cp = from_cp self.departure_cp = departure_cp diff --git a/gen/armor.py b/gen/armor.py index 2873002a..a717b677 100644 --- a/gen/armor.py +++ b/gen/armor.py @@ -142,13 +142,13 @@ class GroundConflictGenerator: # Add JTAC jtacPlugin = LuaPluginManager().getPlugin("jtacautolase") useJTAC = jtacPlugin and jtacPlugin.isEnabled() - if "has_jtac" in self.game.player_faction and self.game.player_faction["has_jtac"] and useJTAC: + if self.game.player_faction.has_jtac and useJTAC: n = "JTAC" + str(self.conflict.from_cp.id) + str(self.conflict.to_cp.id) code = 1688 - len(self.jtacs) utype = MQ_9_Reaper - if "jtac_unit" in self.game.player_faction: - utype = self.game.player_faction["jtac_unit"] + if self.game.player_faction.jtac_unit is not None: + utype = self.game.player_faction.jtac_unit jtac = self.mission.flight_group(country=self.mission.country(self.game.player_country), name=n, diff --git a/gen/defenses/armor_group_generator.py b/gen/defenses/armor_group_generator.py index 7b772e31..c8bc472c 100644 --- a/gen/defenses/armor_group_generator.py +++ b/gen/defenses/armor_group_generator.py @@ -11,8 +11,7 @@ def generate_armor_group(faction:str, game, ground_object): This generate a group of ground units :return: Generated group """ - - possible_unit = [u for u in db.FACTIONS[faction]["units"] if u in Armor.__dict__.values()] + possible_unit = [u for u in db.FACTIONS[faction].frontline_units if u in Armor.__dict__.values()] if len(possible_unit) > 0: unit_type = random.choice(possible_unit) return generate_armor_group_of_type(game, ground_object, unit_type) diff --git a/gen/fleet/carrier_group.py b/gen/fleet/carrier_group.py index 119bc2d4..bc7a712c 100644 --- a/gen/fleet/carrier_group.py +++ b/gen/fleet/carrier_group.py @@ -12,19 +12,15 @@ class CarrierGroupGenerator(GroupGenerator): def generate(self): # Add carrier - if "aircraft_carrier" in self.faction.keys(): - - if "supercarrier" in self.faction.keys() and self.game.settings.supercarrier: - carrier_type = random.choice(self.faction["supercarrier"]) - else: - carrier_type = random.choice(self.faction["aircraft_carrier"]) + if len(self.faction.aircraft_carrier) > 0: + carrier_type = random.choice(self.faction.aircraft_carrier) self.add_unit(carrier_type, "Carrier", self.position.x, self.position.y, self.heading) else: return # Add destroyers escort - if "destroyer" in self.faction.keys(): - dd_type = random.choice(self.faction["destroyer"]) + if len(self.faction.destroyers) > 0: + dd_type = random.choice(self.faction.destroyers) self.add_unit(dd_type, "DD1", self.position.x + 2500, self.position.y + 4500, self.heading) self.add_unit(dd_type, "DD2", self.position.x + 2500, self.position.y - 4500, self.heading) diff --git a/gen/fleet/lha_group.py b/gen/fleet/lha_group.py index 8945c8f2..d64b933e 100644 --- a/gen/fleet/lha_group.py +++ b/gen/fleet/lha_group.py @@ -12,13 +12,15 @@ class LHAGroupGenerator(GroupGenerator): def generate(self): # Add carrier - if "helicopter_carrier" in self.faction.keys(): - carrier_type = random.choice(self.faction["helicopter_carrier"]) + if len(self.faction.helicopter_carrier) > 0: + carrier_type = random.choice(self.faction.helicopter_carrier) self.add_unit(carrier_type, "LHA", self.position.x, self.position.y, self.heading) + else: + return # Add destroyers escort - if "destroyer" in self.faction.keys(): - dd_type = random.choice(self.faction["destroyer"]) + if len(self.faction.destroyers) > 0: + dd_type = random.choice(self.faction.destroyers) self.add_unit(dd_type, "DD1", self.position.x + 1250, self.position.y + 1450, self.heading) self.add_unit(dd_type, "DD2", self.position.x + 1250, self.position.y - 1450, self.heading) diff --git a/gen/fleet/ship_group_generator.py b/gen/fleet/ship_group_generator.py index db974d6c..b60746b7 100644 --- a/gen/fleet/ship_group_generator.py +++ b/gen/fleet/ship_group_generator.py @@ -34,16 +34,14 @@ def generate_ship_group(game, ground_object, faction_name: str): :return: Nothing, but put the group reference inside the ground object """ faction = db.FACTIONS[faction_name] - if "boat" in faction: - generators = faction["boat"] - if len(generators) > 0: - gen = random.choice(generators) - if gen in SHIP_MAP.keys(): - generator = SHIP_MAP[gen](game, ground_object, faction) - generator.generate() - return generator.get_generated_group() - else: - logging.info("Unable to generate ship group, generator : " + str(gen) + "does not exists") + if len(faction.navy_generators) > 0: + gen = random.choice(faction.navy_generators) + if gen in SHIP_MAP.keys(): + generator = SHIP_MAP[gen](game, ground_object, faction) + generator.generate() + return generator.get_generated_group() + else: + logging.info("Unable to generate ship group, generator : " + str(gen) + "does not exists") return None diff --git a/gen/flights/flightplan.py b/gen/flights/flightplan.py index ed2b7bb0..a290bab2 100644 --- a/gen/flights/flightplan.py +++ b/gen/flights/flightplan.py @@ -46,7 +46,7 @@ class FlightPlanBuilder: faction = self.game.player_faction else: faction = self.game.enemy_faction - self.doctrine: Doctrine = faction.get("doctrine", MODERN_DOCTRINE) + self.doctrine: Doctrine = faction.doctrine def populate_flight_plan( self, flight: Flight, diff --git a/gen/missiles/missiles_group_generator.py b/gen/missiles/missiles_group_generator.py index 4e2e9d73..9a89669b 100644 --- a/gen/missiles/missiles_group_generator.py +++ b/gen/missiles/missiles_group_generator.py @@ -14,8 +14,8 @@ def generate_missile_group(game, ground_object, faction_name: str): :return: Nothing, but put the group reference inside the ground object """ faction = db.FACTIONS[faction_name] - if "missiles" in faction: - generators = faction["missiles"] + if len(faction.missiles) > 0: + generators = faction.missiles if len(generators) > 0: gen = random.choice(generators) if gen in MISSILES_MAP.keys(): diff --git a/gen/sam/sam_group_generator.py b/gen/sam/sam_group_generator.py index add0c9fa..ba8583b0 100644 --- a/gen/sam/sam_group_generator.py +++ b/gen/sam/sam_group_generator.py @@ -34,37 +34,33 @@ from gen.sam.sam_zu23_ural import ZU23UralGenerator from gen.sam.sam_zu23_ural_insurgent import ZU23UralInsurgentGenerator SAM_MAP = { - AirDefence.SAM_Hawk_PCP: HawkGenerator, - AirDefence.AAA_ZU_23_Emplacement: ZU23Generator, - AirDefence.AAA_ZU_23_Closed: ZU23Generator, - AirDefence.AAA_ZU_23_on_Ural_375: ZU23UralGenerator, - AirDefence.AAA_ZU_23_Insurgent_on_Ural_375: ZU23UralInsurgentGenerator, - AirDefence.AAA_ZU_23_Insurgent_Closed: ZU23InsurgentGenerator, - AirDefence.AAA_ZU_23_Insurgent: ZU23InsurgentGenerator, - AirDefence.SPAAA_ZSU_23_4_Shilka: ZSU23Generator, - AirDefence.AAA_Vulcan_M163: VulcanGenerator, - AirDefence.SAM_Linebacker_M6: LinebackerGenerator, - AirDefence.Rapier_FSA_Launcher: RapierGenerator, - AirDefence.SAM_Avenger_M1097: AvengerGenerator, - AirDefence.SPAAA_Gepard: GepardGenerator, - AirDefence.SAM_Roland_ADS: RolandGenerator, - AirDefence.SAM_Patriot_LN_M901: PatriotGenerator, - AirDefence.SAM_Patriot_EPP_III: PatriotGenerator, - AirDefence.SAM_Chaparral_M48: ChaparralGenerator, - AirDefence.AAA_Bofors_40mm: BoforsGenerator, - AirDefence.AAA_8_8cm_Flak_36: FlakGenerator, - AirDefence.SAM_SA_2_LN_SM_90: SA2Generator, - AirDefence.SAM_SA_3_S_125_LN_5P73: SA3Generator, - AirDefence.SAM_SA_6_Kub_LN_2P25: SA6Generator, - AirDefence.SAM_SA_8_Osa_9A33: SA8Generator, - AirDefence.SAM_SA_9_Strela_1_9P31: SA9Generator, - AirDefence.SAM_SA_10_S_300PS_LN_5P85C: SA10Generator, - AirDefence.SAM_SA_10_S_300PS_CP_54K6: SA10Generator, - AirDefence.SAM_SA_11_Buk_LN_9A310M1: SA11Generator, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3: SA13Generator, - AirDefence.SAM_SA_15_Tor_9A331: SA15Generator, - AirDefence.SAM_SA_19_Tunguska_2S6: SA19Generator, - AirDefence.HQ_7_Self_Propelled_LN: HQ7Generator + "HawkGenerator": HawkGenerator, + "ZU23Generator": ZU23Generator, + "ZU23UralGenerator": ZU23UralGenerator, + "ZU23UralInsurgentGenerator": ZU23UralInsurgentGenerator, + "ZU23InsurgentGenerator": ZU23InsurgentGenerator, + "ZSU23Generator": ZSU23Generator, + "VulcanGenerator": VulcanGenerator, + "LinebackerGenerator": LinebackerGenerator, + "RapierGenerator": RapierGenerator, + "AvengerGenerator": AvengerGenerator, + "GepardGenerator": GepardGenerator, + "RolandGenerator": RolandGenerator, + "PatriotGenerator": PatriotGenerator, + "ChaparralGenerator": ChaparralGenerator, + "BoforsGenerator": BoforsGenerator, + "FlakGenerator": FlakGenerator, + "SA2Generator": SA2Generator, + "SA3Generator": SA3Generator, + "SA6Generator": SA6Generator, + "SA8Generator": SA8Generator, + "SA9Generator": SA9Generator, + "SA10Generator": SA10Generator, + "SA11Generator": SA11Generator, + "SA13Generator": SA13Generator, + "SA15Generator": SA15Generator, + "SA19Generator": SA19Generator, + "HQ7Generator": HQ7Generator } SAM_PRICES = { @@ -102,20 +98,12 @@ SAM_PRICES = { } -def get_faction_possible_sams_units(faction: str) -> List[UnitType]: - """ - Return the list - :param faction: Faction to search units for - """ - return [u for u in db.FACTIONS[faction]["units"] if u in AirDefence.__dict__.values()] - - def get_faction_possible_sams_generator(faction: str) -> List[UnitType]: """ Return the list of possible SAM generator for the given faction - :param faction: Faction to search units for + :param faction: Faction name to search units for """ - return [SAM_MAP[u] for u in get_faction_possible_sams_units(faction)] + return db.FACTIONS[faction].sams def generate_anti_air_group(game, parent_cp, ground_object, faction:str): @@ -126,24 +114,25 @@ def generate_anti_air_group(game, parent_cp, ground_object, faction:str): :param country: Owner country :return: Nothing, but put the group reference inside the ground object """ - possible_sams = get_faction_possible_sams_units(faction) - if len(possible_sams) > 0: - sam = random.choice(possible_sams) + possible_sams_generators = get_faction_possible_sams_generator(faction) + if len(possible_sams_generators) > 0: + sam = random.choice(possible_sams_generators) generator = SAM_MAP[sam](game, ground_object) generator.generate() return generator.get_generated_group() return None -def generate_shorad_group(game, parent_cp, ground_object, faction:str): - if("shorad") in db.FACTIONS[faction].keys(): - shorad = db.FACTIONS[faction]["shorad"] - sam = random.choice(shorad) +def generate_shorad_group(game, parent_cp, ground_object, faction_name: str): + faction = db.FACTIONS[faction_name] + + if len(faction.shorads) > 0: + sam = random.choice(faction.shorads) generator = SAM_MAP[sam](game, ground_object) generator.generate() return generator.get_generated_group() else: - return generate_anti_air_group(game, parent_cp, ground_object, faction) + return generate_anti_air_group(game, parent_cp, ground_object, faction_name) diff --git a/resources/factions/china_2010.json b/resources/factions/china_2010.json index ae0fdcea..bff4d388 100644 --- a/resources/factions/china_2010.json +++ b/resources/factions/china_2010.json @@ -35,11 +35,11 @@ "Infantry_Soldier_Rus", "Paratrooper_RPG_16" ], - "shorad_units": [ - "SAM_SA_9_Strela_1_9P31", - "SAM_SA_13_Strela_10M3_9A35M3", - "SPAAA_ZSU_23_4_Shilka", - "AAA_ZU_23_Closed" + "shorads": [ + "SA9Generator", + "SA13Generator", + "ZSU23Generator", + "ZU23Generator" ], "sams": [ "HQ7Generator", @@ -65,7 +65,7 @@ "Wuzhi Shan", "Wudang Shan" ], - "destroyer": [ + "destroyers": [ "Type_052B_Destroyer", "Type_052C_Destroyer" ], diff --git a/resources/factions/russia_1990.json b/resources/factions/russia_1990.json index 4cf97170..13e91eb7 100644 --- a/resources/factions/russia_1990.json +++ b/resources/factions/russia_1990.json @@ -38,11 +38,11 @@ "Infantry_Soldier_Rus", "Paratrooper_RPG_16" ], - "shorad_units": [ - "SAM_SA_9_Strela_1_9P31", - "SAM_SA_13_Strela_10M3_9A35M3", - "SPAAA_ZSU_23_4_Shilka", - "AAA_ZU_23_Closed" + "shorads": [ + "SA9Generator", + "SA13Generator", + "ZSU23Generator", + "ZU23Generator" ], "sams": [ "SA6Generator", @@ -55,10 +55,10 @@ ], "lhanames": [ ], - "destroyer": [ + "destroyers": [ "FF_1135M_Rezky" ], - "cruiser": [ + "cruisers": [ "FSG_1241_1MP_Molniya" ], "requirements": {}, diff --git a/resources/factions/russia_2010.json b/resources/factions/russia_2010.json index 0d5c59da..6d404c08 100644 --- a/resources/factions/russia_2010.json +++ b/resources/factions/russia_2010.json @@ -45,9 +45,9 @@ "Infantry_Soldier_Rus", "Paratrooper_RPG_16" ], - "shorad_units": [ - "SAM_SA_19_Tunguska_2S6", - "SAM_SA_13_Strela_10M3_9A35M3" + "shorads": [ + "SA19Generator", + "SA13Generator" ], "sams": [ "SA11Generator", @@ -62,10 +62,10 @@ ], "lhanames": [ ], - "destroyer": [ + "destroyers": [ "FF_1135M_Rezky" ], - "cruiser": [ + "cruisers": [ "FSG_1241_1MP_Molniya" ], "requirements": {}, diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index e827b5fc..78052bc7 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -40,8 +40,8 @@ "Infantry_M4", "Soldier_M249" ], - "shorad_units": [ - "SAM_Avenger_M1097" + "shorads": [ + "AvengerGenerator" ], "sams": [ "HawkGenerator", @@ -53,10 +53,10 @@ "helicopter_carrier": [ "LHA_1_Tarawa" ], - "destroyer": [ + "destroyers": [ "USS_Arleigh_Burke_IIa" ], - "cruiser": [ + "cruisers": [ "Ticonderoga_class" ], "requirements": {}, diff --git a/resources/tools/generate_loadout_check.py b/resources/tools/generate_loadout_check.py index 09835265..21a6e997 100644 --- a/resources/tools/generate_loadout_check.py +++ b/resources/tools/generate_loadout_check.py @@ -20,7 +20,7 @@ for t, uts in db.UNIT_BY_TASK.items(): pos.x += 10000 for ut in uts: pos.y += 5000 - ctr = mis.country([v["country"] for k, v in db.FACTIONS.items() if ut in v["units"]][0]) + ctr = mis.country([v["country"] for k, v in db.FACTIONS.items() if ut in v.units][0]) g = mis.flight_group_inflight( country=ctr, diff --git a/theater/start_generator.py b/theater/start_generator.py index b14f1b99..4e2a67da 100644 --- a/theater/start_generator.py +++ b/theater/start_generator.py @@ -31,7 +31,7 @@ from theater import ( ) from theater.conflicttheater import IMPORTANCE_HIGH, IMPORTANCE_LOW -UNIT_VARIETY = 3 +UNIT_VARIETY = 6 UNIT_AMOUNT_FACTOR = 16 UNIT_COUNT_IMPORTANCE_LOG = 1.3 @@ -90,6 +90,7 @@ def generate_groundobjects(theater: ConflictTheater, game): faction_name = game.player_name else: faction_name = game.enemy_name + faction = db.FACTIONS[faction_name] if cp.cptype == ControlPointType.AIRCRAFT_CARRIER_GROUP: # Create ground object group @@ -110,8 +111,8 @@ def generate_groundobjects(theater: ConflictTheater, game): g.groups.append(group) cp.ground_objects.append(g) # Set new name : - if "carrier_names" in db.FACTIONS[faction_name]: - cp.name = random.choice(db.FACTIONS[faction_name]["carrier_names"]) + if len(faction.carrier_names) > 0: + cp.name = random.choice(faction.carrier_names) else: cp_to_remove.append(cp) elif cp.cptype == ControlPointType.LHA_GROUP: @@ -133,8 +134,8 @@ def generate_groundobjects(theater: ConflictTheater, game): g.groups.append(group) cp.ground_objects.append(g) # Set new name : - if "lhanames" in db.FACTIONS[faction_name]: - cp.name = random.choice(db.FACTIONS[faction_name]["lhanames"]) + if len(faction.lha_names) > 0: + cp.name = random.choice(faction.lha_names) else: cp_to_remove.append(cp) else: @@ -171,19 +172,14 @@ def generate_groundobjects(theater: ConflictTheater, game): logging.info(ground_object.groups) # Generate navy groups - if "boat" in db.FACTIONS[faction_name].keys() and cp.allow_sea_units: + if len(faction.navy_generators) > 0 and cp.allow_sea_units: if cp.captured and game.settings.do_not_generate_player_navy: continue - if not cp.captured and game.settings.do_not_generate_enemy_navy: continue - boat_count = 1 - if "boat_count" in db.FACTIONS[faction_name].keys(): - boat_count = int(db.FACTIONS[faction_name]["boat_count"]) - - for i in range(boat_count): + for i in range(faction.navy_group_count): point = find_location(False, cp.position, theater, 5000, 40000, [], False) @@ -210,15 +206,9 @@ def generate_groundobjects(theater: ConflictTheater, game): g.groups.append(group) cp.ground_objects.append(g) + if len(faction.missiles) > 0: - - if "missiles" in db.FACTIONS[faction_name].keys(): - - missiles_count = 1 - if "missiles_count" in db.FACTIONS[faction_name].keys(): - missiles_count = int(db.FACTIONS[faction_name]["missiles_count"]) - - for i in range(missiles_count): + for i in range(faction.missiles_group_count): point = find_location(True, cp.position, theater, 2500, 40000, [], False) @@ -347,9 +337,7 @@ def generate_cp_ground_points(cp: ControlPoint, theater, game, group_id, templat faction = game.enemy_name faction_data = db.FACTIONS[faction] - available_categories = DEFAULT_AVAILABLE_BUILDINGS - if "objects" in faction_data.keys(): - available_categories = faction_data["objects"] + available_categories = faction_data.building_set if len(available_categories) == 0: return False From dd7b9f17902eff418ae9636f4fa48af426130775 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 22 Oct 2020 13:50:24 +0200 Subject: [PATCH 05/29] Fix faction shorad units loader --- game/factions/faction.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/game/factions/faction.py b/game/factions/faction.py index 3595b10b..9f242bb8 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -9,6 +9,7 @@ from dcs.vehicles import vehicle_map, Armor, Unarmed, Infantry, Fortification, A from game.data.building_data import WW2_ALLIES_BUILDINGS, DEFAULT_AVAILABLE_BUILDINGS, WW2_GERMANY_BUILDINGS from game.data.doctrine import Doctrine, MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE +from pydcs_extensions.mod_units import MODDED_VEHICLES, MODDED_AIRPLANES @dataclass @@ -135,9 +136,9 @@ class Faction: faction.artillery_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("artillery_units", [])] if f is not None] faction.infantry_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("infantry_units", [])] if f is not None] faction.logistics_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("logistics_units", [])] if f is not None] - faction.shorads = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("shorads", [])] if f is not None] faction.sams = json.get("sams", []) + faction.shorads = json.get("shorads", []) faction.missiles = json.get("missiles", []) faction.name = json.get("requirements", {}) @@ -197,8 +198,8 @@ def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: return None -aircraft_loader = lambda x: unit_loader(x, [dcs.planes, dcs.helicopters]) -vehicle_loader = lambda x: unit_loader(x, [Infantry, Unarmed, Armor, AirDefence, Artillery]) +aircraft_loader = lambda x: unit_loader(x, [dcs.planes, dcs.helicopters, MODDED_AIRPLANES]) +vehicle_loader = lambda x: unit_loader(x, [Infantry, Unarmed, Armor, AirDefence, Artillery, MODDED_VEHICLES]) ship_loader = lambda x: unit_loader(x, [dcs.ships]) From aa7eacc0439657b16d72610a196af37b38aed81f Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 22 Oct 2020 13:51:24 +0200 Subject: [PATCH 06/29] Added list of modded units in pydcs_extensions module --- pydcs_extensions/mod_units.py | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pydcs_extensions/mod_units.py diff --git a/pydcs_extensions/mod_units.py b/pydcs_extensions/mod_units.py new file mode 100644 index 00000000..132a7b2f --- /dev/null +++ b/pydcs_extensions/mod_units.py @@ -0,0 +1,43 @@ +from pydcs_extensions.a4ec.a4ec import A_4E_C +from pydcs_extensions.mb339.mb339 import MB_339PAN +from pydcs_extensions.rafale.rafale import Rafale_M, Rafale_A_S +from pydcs_extensions.su57.su57 import Su_57 +import pydcs_extensions.frenchpack.frenchpack as frenchpack + +MODDED_AIRPLANES = [A_4E_C, MB_339PAN, Rafale_A_S, Rafale_M, Su_57] +MODDED_VEHICLES = [ + frenchpack._FIELD_HIDE, + frenchpack._FIELD_HIDE_SMALL, + frenchpack.SMOKE_SAM_IR, + frenchpack.SmokeD1, + frenchpack.SmokeD3, + frenchpack.AMX_10RCR, + frenchpack.AMX_10RCR_SEPAR, + frenchpack.ERC_90, + frenchpack.MO_120_RT, + frenchpack._53T2, + frenchpack.TRM_2000, + frenchpack.TRM_2000_Fuel, + frenchpack.TRM_2000_53T2, + frenchpack.TRM_2000_PAMELA, + frenchpack.VAB_MEDICAL, + frenchpack.VAB, + frenchpack.VAB__50, + frenchpack.VAB_T20_13, + frenchpack.VAB_MEPHISTO, + frenchpack.VAB_MORTIER, + frenchpack.VBL__50, + frenchpack.VBL_AANF1, + frenchpack.VBL, + frenchpack.VBAE_CRAB, + frenchpack.VBAE_CRAB_MMP, + frenchpack.AMX_30B2, + frenchpack.Tracma_TD_1500, + frenchpack.Infantry_Soldier_JTAC, + frenchpack.Char_M551_Sheridan, + frenchpack.Leclerc_Serie_XXI, + frenchpack.DIM__TOYOTA_BLUE, + frenchpack.DIM__TOYOTA_GREEN, + frenchpack.DIM__TOYOTA_DESERT, + frenchpack.DIM__KAMIKAZE +] \ No newline at end of file From bc1e793ce6ff1ecea176478b3127003d95d36fdc Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 22 Oct 2020 13:55:37 +0200 Subject: [PATCH 07/29] Fixed faction loader so it works with known modded units --- game/factions/faction.py | 4 ++ resources/factions/russia_2020.json | 78 +++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 resources/factions/russia_2020.json diff --git a/game/factions/faction.py b/game/factions/faction.py index 9f242bb8..6c894398 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -193,6 +193,10 @@ def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: for mother_class in class_repository: if getattr(mother_class, unit, None) is not None: return getattr(mother_class, unit) + if type(mother_class) is list: + for m in mother_class: + if m.__name__ == unit: + return m logging.info("FACTION ERROR : Unable to find " + unit + " in pydcs") print("FACTION ERROR : Unable to find " + unit + " in pydcs") return None diff --git a/resources/factions/russia_2020.json b/resources/factions/russia_2020.json new file mode 100644 index 00000000..b12bf7d1 --- /dev/null +++ b/resources/factions/russia_2020.json @@ -0,0 +1,78 @@ +{ + "country": "Russia", + "name": "Russia 2020 (Modded)", + "aircrafts": [ + "MiG_29S", + "MiG_31", + "Su_24M", + "Su_25", + "Su_25T", + "Su_27", + "Su_30", + "Su_33", + "Su_34", + "Su_57", + "L_39ZA", + "Mi_8MT", + "Mi_24V", + "Mi_28N", + "Ka_50" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_2", + "IFV_BMP_3", + "MBT_T_90", + "MBT_T_80U", + "MBT_T_72B" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorads": [ + "SA19Generator" + ], + "sams": [ + "SA11Generator", + "SA10Generator", + "SA19Generator" + ], + "aircraft_carrier": [ + "CV_1143_5_Admiral_Kuznetsov" + ], + "helicopter_carrier": [ + ], + "lhanames": [ + ], + "destroyers": [ + "FF_1135M_Rezky" + ], + "cruisers": [ + "FSG_1241_1MP_Molniya" + ], + "requirements": {}, + "carrier_names": [ + "Admiral Kuznetov" + ], + "navy_generators": [ + "RussianNavyGroupGenerator", + "KiloSubGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} From b4d0eb0b99af0cc2c4c48632918b0e5e0c540ac9 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 23 Oct 2020 01:38:08 +0200 Subject: [PATCH 08/29] Started cleaning old factions, added back most factions as json. Fixed LHA not spawning. --- game/db.py | 162 +----------------- game/factions/australia_2005.py | 70 -------- game/factions/bluefor_coldwar.py | 81 --------- game/factions/bluefor_coldwar_a4.py | 89 ---------- game/factions/bluefor_coldwar_mods.py | 92 ---------- game/factions/bluefor_modern.py | 121 ------------- game/factions/canada_2005.py | 62 ------- game/factions/china_2010.py | 111 ------------ game/factions/faction.py | 17 +- game/factions/faction_loader.py | 13 +- game/factions/france_1995.py | 68 -------- game/factions/france_2005.py | 86 ---------- game/factions/france_modded.py | 103 ----------- game/factions/germany_1944.py | 58 ------- game/factions/germany_1944_easy.py | 51 ------ game/factions/germany_1990.py | 66 ------- game/factions/india_2010.py | 80 --------- game/factions/insurgent.py | 34 ---- game/factions/insurgent_modded.py | 46 ----- game/factions/iran_2015.py | 86 ---------- game/factions/israel_1948.py | 47 ----- game/factions/israel_1973.py | 131 -------------- game/factions/israel_2000.py | 66 ------- game/factions/italy_1990.py | 69 -------- game/factions/italy_1990_mb339.py | 73 -------- game/factions/japan_2005.py | 2 +- game/factions/spain_1990.py | 2 +- game/factions/uk_1990.py | 2 +- game/factions/us_aggressors.py | 2 +- game/factions/usa_1990.py | 2 +- game/factions/usa_2005.py | 2 +- gen/fleet/lha_group.py | 2 - resources/factions/australia_2005.json | 61 +++++++ resources/factions/bluefor_coldwar.json | 75 ++++++++ resources/factions/bluefor_coldwar_a4.json | 78 +++++++++ .../factions/bluefor_coldwar_a4_mb339.json | 79 +++++++++ resources/factions/bluefor_modern.json | 92 ++++++++++ resources/factions/canada_2005.json | 59 +++++++ resources/factions/china_2010.json | 2 +- resources/factions/france_1995.json | 69 ++++++++ resources/factions/france_2005_modded.json | 84 +++++++++ resources/factions/germany_1942.json | 56 ++++++ resources/factions/germany_1944.json | 63 +++++++ resources/factions/germany_1990.json | 61 +++++++ resources/factions/india_2010.json | 68 ++++++++ resources/factions/insurgents.json | 33 ++++ resources/factions/insurgents_modded.json | 36 ++++ resources/factions/iran_2015.json | 74 ++++++++ resources/factions/israel_1948.json | 51 ++++++ resources/factions/israel_1973.json | 58 +++++++ resources/factions/israel_1982.json | 60 +++++++ resources/factions/israel_2000.json | 63 +++++++ resources/factions/italy_1990.json | 62 +++++++ resources/factions/italy_1990_mb339.json | 63 +++++++ resources/factions/japan_2005.json | 68 ++++++++ resources/factions/libya_2011.json | 64 +++++++ resources/factions/russia_1990.json | 2 +- resources/factions/russia_2010.json | 2 +- resources/factions/russia_2020.json | 2 +- resources/factions/usa_2005.json | 2 +- theater/start_generator.py | 4 +- 61 files changed, 1508 insertions(+), 1879 deletions(-) delete mode 100644 game/factions/australia_2005.py delete mode 100644 game/factions/bluefor_coldwar.py delete mode 100644 game/factions/bluefor_coldwar_a4.py delete mode 100644 game/factions/bluefor_coldwar_mods.py delete mode 100644 game/factions/bluefor_modern.py delete mode 100644 game/factions/canada_2005.py delete mode 100644 game/factions/china_2010.py delete mode 100644 game/factions/france_1995.py delete mode 100644 game/factions/france_2005.py delete mode 100644 game/factions/france_modded.py delete mode 100644 game/factions/germany_1944.py delete mode 100644 game/factions/germany_1944_easy.py delete mode 100644 game/factions/germany_1990.py delete mode 100644 game/factions/india_2010.py delete mode 100644 game/factions/insurgent.py delete mode 100644 game/factions/insurgent_modded.py delete mode 100644 game/factions/iran_2015.py delete mode 100644 game/factions/israel_1948.py delete mode 100644 game/factions/israel_1973.py delete mode 100644 game/factions/israel_2000.py delete mode 100644 game/factions/italy_1990.py delete mode 100644 game/factions/italy_1990_mb339.py create mode 100644 resources/factions/australia_2005.json create mode 100644 resources/factions/bluefor_coldwar.json create mode 100644 resources/factions/bluefor_coldwar_a4.json create mode 100644 resources/factions/bluefor_coldwar_a4_mb339.json create mode 100644 resources/factions/bluefor_modern.json create mode 100644 resources/factions/canada_2005.json create mode 100644 resources/factions/france_1995.json create mode 100644 resources/factions/france_2005_modded.json create mode 100644 resources/factions/germany_1942.json create mode 100644 resources/factions/germany_1944.json create mode 100644 resources/factions/germany_1990.json create mode 100644 resources/factions/india_2010.json create mode 100644 resources/factions/insurgents.json create mode 100644 resources/factions/insurgents_modded.json create mode 100644 resources/factions/iran_2015.json create mode 100644 resources/factions/israel_1948.json create mode 100644 resources/factions/israel_1973.json create mode 100644 resources/factions/israel_1982.json create mode 100644 resources/factions/israel_2000.json create mode 100644 resources/factions/italy_1990.json create mode 100644 resources/factions/italy_1990_mb339.json create mode 100644 resources/factions/japan_2005.json create mode 100644 resources/factions/libya_2011.json diff --git a/game/db.py b/game/db.py index 304468f8..cce962bc 100644 --- a/game/db.py +++ b/game/db.py @@ -150,71 +150,8 @@ from dcs.vehicles import ( import pydcs_extensions.frenchpack.frenchpack as frenchpack from game.factions import faction_loader -from game.factions.australia_2005 import Australia_2005 -from game.factions.bluefor_coldwar import BLUEFOR_COLDWAR -from game.factions.bluefor_coldwar_a4 import BLUEFOR_COLDWAR_A4 -from game.factions.bluefor_coldwar_mods import BLUEFOR_COLDWAR_MODS -from game.factions.bluefor_modern import BLUEFOR_MODERN -from game.factions.canada_2005 import Canada_2005 -from game.factions.china_2010 import China_2010 from game.factions.faction import Faction -from game.factions.france_1995 import France_1995 -from game.factions.france_2005 import France_2005 -from game.factions.france_modded import France_2005_Modded -from game.factions.germany_1944 import Germany_1944 -from game.factions.germany_1944_easy import Germany_1944_Easy -from game.factions.germany_1990 import Germany_1990 -from game.factions.india_2010 import India_2010 -from game.factions.insurgent import Insurgent -from game.factions.insurgent_modded import Insurgent_modded -from game.factions.iran_2015 import Iran_2015 -from game.factions.israel_1948 import Israel_1948 -from game.factions.israel_1973 import ( - Israel_1973, - Israel_1973_NO_WW2_UNITS, - Israel_1982, -) -from game.factions.israel_2000 import Israel_2000 -from game.factions.italy_1990 import Italy_1990 -from game.factions.italy_1990_mb339 import Italy_1990_MB339 -from game.factions.japan_2005 import Japan_2005 -from game.factions.libya_2011 import Libya_2011 -from game.factions.netherlands_1990 import Netherlands_1990 -from game.factions.north_korea_2000 import NorthKorea_2000 -from game.factions.pakistan_2015 import Pakistan_2015 -from game.factions.private_miltary_companies import ( - PMC_RUSSIAN, - PMC_WESTERN_A, - PMC_WESTERN_B, -) -from game.factions.russia_1955 import Russia_1955 -from game.factions.russia_1965 import Russia_1965 -from game.factions.russia_1975 import Russia_1975 -from game.factions.russia_1990 import Russia_1990 -from game.factions.russia_2010 import Russia_2010 -from game.factions.russia_2020 import Russia_2020 -from game.factions.spain_1990 import Spain_1990 -from game.factions.sweden_1990 import Sweden_1990 -from game.factions.syria import ( - Arab_Armies_1948, - Syria_1967, - Syria_1967_WW2_Weapons, - Syria_1973, - Syria_1982, - Syria_2011, -) -from game.factions.turkey_2005 import Turkey_2005 -from game.factions.uae_2005 import UAE_2005 -from game.factions.uk_1944 import UK_1944 -from game.factions.uk_1990 import UnitedKingdom_1990 -from game.factions.ukraine_2010 import Ukraine_2010 -from game.factions.us_aggressors import US_Aggressors -from game.factions.usa_1944 import ALLIES_1944, USA_1944 -from game.factions.usa_1955 import USA_1955 -from game.factions.usa_1960 import USA_1960 -from game.factions.usa_1965 import USA_1965 -from game.factions.usa_1990 import USA_1990 -from game.factions.usa_2005 import USA_2005 + # PATCH pydcs data with MODS from pydcs_extensions.a4ec.a4ec import A_4E_C from pydcs_extensions.mb339.mb339 import MB_339PAN @@ -963,101 +900,7 @@ CARRIER_TAKEOFF_BAN: List[Type[FlyingType]] = [ Units separated by country. country : DCS Country name """ -FACTIONS : [Faction] = faction_loader.load_factions() - -FACTIONS3: Dict[str, Dict[str, Any]] = { - - "Bluefor Modern": BLUEFOR_MODERN, - "Bluefor Cold War 1970s": BLUEFOR_COLDWAR, - "Bluefor Cold War (with A-4)": BLUEFOR_COLDWAR_A4, - "Bluefor Cold War (with A-4 and MB339)": BLUEFOR_COLDWAR_MODS, - - "USA 1955 (WW2 Pack)": USA_1955, - "USA 1960": USA_1960, - "USA 1965": USA_1965, - "USA 1990": USA_1990, - "USA 2005": USA_2005, - "USA Aggressors 2005": US_Aggressors, - - "Russia 1955": Russia_1955, - "Russia 1965": Russia_1965, - "Russia 1975": Russia_1975, - "Russia 1990": Russia_1990, - "Russia 2010": Russia_2010, - "Russia 2020 (Modded)": Russia_2020, - - "France 1995": France_1995, - "France 2005": France_2005, - "France 2005 (Modded)": France_2005_Modded, - - "Germany 1990": Germany_1990, - - "Netherlands 1990": Netherlands_1990, - - "United Kingdom 1990": UnitedKingdom_1990, - - "Spain 1990": Spain_1990, - - "Italy 1990": Italy_1990, - "Italy 1990 (With MB339)": Italy_1990_MB339, - - "Israel 2000": Israel_2000, - "Israel 1982": Israel_1982, - "Israel 1973 (WW2 Pack)": Israel_1973, - "Israel 1973": Israel_1973_NO_WW2_UNITS, - "Israel 1948": Israel_1948, - - "Arab Armies 1982": Syria_1982, - "Arab Armies 1973": Syria_1973, - "Arab Armies 1967 (WW2 Pack)": Syria_1967_WW2_Weapons, - "Arab Armies 1967": Syria_1967, - "Arab League 1948": Arab_Armies_1948, - - "China 2010": China_2010, - - "Sweden 1990": Sweden_1990, - - "Australia 2005": Australia_2005, - - "Canada 2005": Canada_2005, - - "Japan 2005": Japan_2005, - - "Turkey 2005": Turkey_2005, - - "United Arab Emirates 2005": UAE_2005, - - "Ukraine 2010": Ukraine_2010, - - "India 2010": India_2010, - - "Libya 2011": Libya_2011, - - "Syria 2011": Syria_2011, - - - "Pakistan 2015": Pakistan_2015, - - "Iran 2015": Iran_2015, - - "North Korea 2000": NorthKorea_2000, - - "Insurgent": Insurgent, - "Insurgent (Modded)": Insurgent_modded, - - "PMC (American)": PMC_WESTERN_A, - "PMC (American) - MB339": PMC_WESTERN_B, - "PMC (Russian)": PMC_RUSSIAN, - - "Allies 1944 (WW2 Pack)": USA_1944, - "USA 1944 (WW2 Pack)": ALLIES_1944, - "UK 1944 (WW2 Pack)": UK_1944, - - "Germany 1944 (WW2 Pack)": Germany_1944, - "Germany 1944 Easy (WW2 Pack)": Germany_1944_Easy, - -} - +FACTIONS: [Faction] = faction_loader.load_factions() CARRIER_TYPE_BY_PLANE = { FA_18C_hornet: CVN_74_John_C__Stennis, @@ -1262,6 +1105,7 @@ CARRIER_CAPABLE = [ AV8BNA, Su_33, A_4E_C, + Rafale_M, UH_1H, Mi_8MT, diff --git a/game/factions/australia_2005.py b/game/factions/australia_2005.py deleted file mode 100644 index c9cfb320..00000000 --- a/game/factions/australia_2005.py +++ /dev/null @@ -1,70 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - UH_1H, -) -from dcs.planes import ( - C_130, - E_3A, - FA_18C_hornet, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Ticonderoga_class, - USS_Arleigh_Burke_IIa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Australia_2005 = { - "country": "Australia", - "side": "blue", - "units": [ - FA_18C_hornet, - - KC_135, - KC130, - C_130, - E_3A, - - Armor.MBT_M1A2_Abrams, - Armor.MBT_Leopard_1A3, - Armor.APC_M113, - Armor.IFV_LAV_25, - Armor.IFV_MCV_80, - - UH_1H, - AH_1W, # Standing as EC Tiger - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.Rapier_FSA_Launcher, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.Rapier_FSA_Launcher, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "lhanames": [ - "HMAS Canberra", - "HMAS Adelaide" - ], "boat":[ - "ArleighBurkeGroupGenerator" - ], "has_jtac": True -} diff --git a/game/factions/bluefor_coldwar.py b/game/factions/bluefor_coldwar.py deleted file mode 100644 index c241bbae..00000000 --- a/game/factions/bluefor_coldwar.py +++ /dev/null @@ -1,81 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - UH_1H, -) -from dcs.planes import ( - AJS37, - A_10A, - C_130, - E_3A, - F_14B, - F_4E, - F_5E_3, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -BLUEFOR_COLDWAR = { - "country": "Combined Joint Task Forces Blue", - "side": "blue", - "units": [ - - F_14B, - F_4E, - F_5E_3, - A_10A, - AJS37, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - SA342M, - SA342L, - - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Chaparral_M48, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.AAA_Vulcan_M163, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "carrier_names": [ - "CVN-71 Theodore Roosevelt", - "CVN-72 Abraham Lincoln", - "CVN-73 George Washington", - "CVN-74 John C. Stennis", - ], "lhanames": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat": [ - ], "has_jtac": True -} diff --git a/game/factions/bluefor_coldwar_a4.py b/game/factions/bluefor_coldwar_a4.py deleted file mode 100644 index ce6cf016..00000000 --- a/game/factions/bluefor_coldwar_a4.py +++ /dev/null @@ -1,89 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - UH_1H, -) -from dcs.planes import ( - AJS37, - A_10A, - C_130, - E_3A, - F_14B, - F_4E, - F_5E_3, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from pydcs_extensions.a4ec.a4ec import A_4E_C - -BLUEFOR_COLDWAR_A4 = { - "country": "Combined Joint Task Forces Blue", - "side": "blue", - "units": [ - - F_14B, - F_4E, - F_5E_3, - A_10A, - AJS37, - A_4E_C, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - SA342M, - SA342L, - - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Chaparral_M48, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.AAA_Vulcan_M163, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "CVN-71 Theodore Roosevelt", - "CVN-72 Abraham Lincoln", - "CVN-73 George Washington", - "CVN-74 John C. Stennis", - ], "lhanames": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat": [ - ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/", - }, "has_jtac": True -} diff --git a/game/factions/bluefor_coldwar_mods.py b/game/factions/bluefor_coldwar_mods.py deleted file mode 100644 index a395fc48..00000000 --- a/game/factions/bluefor_coldwar_mods.py +++ /dev/null @@ -1,92 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - UH_1H, -) -from dcs.planes import ( - AJS37, - A_10A, - C_130, - E_3A, - F_14B, - F_4E, - F_5E_3, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from pydcs_extensions.a4ec.a4ec import A_4E_C -from pydcs_extensions.mb339.mb339 import MB_339PAN - -BLUEFOR_COLDWAR_MODS = { - "country": "USA", - "side": "blue", - "units": [ - - F_14B, - F_4E, - F_5E_3, - A_10A, - AJS37, - A_4E_C, - MB_339PAN, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - SA342M, - SA342L, - - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Chaparral_M48, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.AAA_Vulcan_M163, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "CVN-71 Theodore Roosevelt", - "CVN-72 Abraham Lincoln", - "CVN-73 George Washington", - "CVN-74 John C. Stennis", - ], "lhanames": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat": [ - ], "requirements": { - "MB-339A": "http://www.freccetricolorivirtuali.net/", - "Community A-4E": "https://heclak.github.io/community-a4e-c/", - }, "has_jtac": True -} diff --git a/game/factions/bluefor_modern.py b/game/factions/bluefor_modern.py deleted file mode 100644 index 9f97827b..00000000 --- a/game/factions/bluefor_modern.py +++ /dev/null @@ -1,121 +0,0 @@ -from dcs.helicopters import ( - AH_64D, - Ka_50, - SA342L, - SA342M, - UH_1H, -) -from dcs.planes import ( - AJS37, - AV8BNA, - A_10A, - A_10C, - A_10C_2, - C_130, - E_3A, - FA_18C_hornet, - F_14B, - F_15C, - F_16C_50, - F_5E_3, - JF_17, - KC130, - KC_135, - M_2000C, - Su_25T, - Su_27, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, - USS_Arleigh_Burke_IIa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -BLUEFOR_MODERN = { - "country": "Combined Joint Task Forces Blue", - "side": "blue", - "units": [ - - F_15C, - F_14B, - FA_18C_hornet, - F_16C_50, - JF_17, - M_2000C, - F_5E_3, - Su_27, - - Su_25T, - A_10A, - A_10C, - A_10C_2, - AV8BNA, - AJS37, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - AH_64D, - Ka_50, - SA342M, - SA342L, - - Armor.MBT_M1A2_Abrams, - Armor.MBT_Leopard_2, - Armor.ATGM_M1134_Stryker, - Armor.IFV_M2A2_Bradley, - Armor.IFV_Marder, - Armor.APC_M1043_HMMWV_Armament, - - Artillery.MLRS_M270, - Artillery.SPH_M109_Paladin, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Patriot_EPP_III, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.SAM_Avenger_M1097, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "CVN-71 Theodore Roosevelt", - "CVN-72 Abraham Lincoln", - "CVN-73 George Washington", - "CVN-74 John C. Stennis", - ], "lhanames": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} diff --git a/game/factions/canada_2005.py b/game/factions/canada_2005.py deleted file mode 100644 index 7a664709..00000000 --- a/game/factions/canada_2005.py +++ /dev/null @@ -1,62 +0,0 @@ -from dcs.helicopters import ( - UH_1H, -) -from dcs.planes import ( - C_130, - E_3A, - FA_18C_hornet, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Ticonderoga_class, - USS_Arleigh_Burke_IIa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Canada_2005 = { - "country": "Canada", - "side": "blue", - "units": [ - FA_18C_hornet, - - KC_135, - KC130, - C_130, - E_3A, - - Armor.MBT_Leopard_1A3, - Armor.MBT_Leopard_2, - Armor.IFV_LAV_25, - Armor.APC_M113, - Armor.IFV_MCV_80, - - UH_1H, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Avenger_M1097, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.SAM_Avenger_M1097, - ], "destroyer": [ - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "boat":[ - "ArleighBurkeGroupGenerator" - ], "has_jtac": True -} diff --git a/game/factions/china_2010.py b/game/factions/china_2010.py deleted file mode 100644 index 577fb33d..00000000 --- a/game/factions/china_2010.py +++ /dev/null @@ -1,111 +0,0 @@ -from dcs.helicopters import ( - Mi_28N, - Mi_8MT, -) -from dcs.planes import ( - An_26B, - An_30M, - IL_76MD, - IL_78M, - JF_17, - J_11A, - KJ_2000, - MiG_21Bis, - Su_30, - Su_33, - WingLoong_I, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - Type_052B_Destroyer, - Type_052C_Destroyer, - Type_054A_Frigate, - Type_071_Amphibious_Transport_Dock, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -China_2010 = { - "country": "China", - "side": "red", - "units": [ - - MiG_21Bis, # Standing as J-7 - Su_30, - Su_33, - J_11A, - JF_17, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - KJ_2000, - - Mi_8MT, - Mi_28N, - - AirDefence.SAM_SA_10_S_300PS_LN_5P85C, # Standing as HQ-9+ - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.HQ_7_Self_Propelled_LN, - - Armor.ZTZ_96B, - Armor.MBT_T_55, - Armor.ZBD_04A, - Armor.IFV_BMP_1, - Artillery.MLRS_9A52_Smerch, - Artillery.SPH_2S9_Nona, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160 - ], - "shorad":[ - AirDefence.SPAAA_ZSU_23_4_Shilka, - AirDefence.Rapier_FSA_Launcher, # Standing as PL-9C Shorad - AirDefence.HQ_7_Self_Propelled_LN - ], "aircraft_carrier": [ - CV_1143_5_Admiral_Kuznetsov, - ], "destroyer": [ - Type_052B_Destroyer, - Type_052C_Destroyer - ], "cruiser": [ - Type_054A_Frigate, - ], "helicopter_carrier": [ - Type_071_Amphibious_Transport_Dock, - ], "lhanames": [ - "Kunlun Shan", - "Jinggang Shan", - "Changbai Shan", - "Yimeng Shan", - "Longhu Shan", - "Wuzhi Shan", - "Wudang Shan" - ], "carrier_names": [ - "001 Liaoning", - "002 Shandong", - ], "boat":[ - "Type54GroupGenerator" - ], - "has_jtac": True, - "jtac_unit": WingLoong_I -} \ No newline at end of file diff --git a/game/factions/faction.py b/game/factions/faction.py index 6c894398..9bb5f8a0 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -64,7 +64,7 @@ class Faction: carrier_names: [str] # Possible helicopter carrier names - lha_names: [str] + helicopter_carrier_names: [str] # Navy group generators navy_generators: [str] @@ -110,7 +110,7 @@ class Faction: self.aircraft_carrier = [] self.helicopter_carrier = [] self.carrier_names = [] - self.lha_names = [] + self.helicopter_carrier_names = [] self.navy_generators = [] self.destroyers = [] self.cruisers = [] @@ -143,7 +143,7 @@ class Faction: faction.name = json.get("requirements", {}) faction.carrier_names = json.get("carrier_names", []) - faction.lha_names = json.get("lha_names", []) + faction.helicopter_carrier_names = json.get("helicopter_carrier_names", []) faction.navy_generators = json.get("navy_generators", []) faction.aircraft_carrier = [f for f in [ship_loader(vehicle) for vehicle in json.get("aircraft_carrier", [])] if f is not None] faction.helicopter_carrier = [f for f in [ship_loader(vehicle) for vehicle in json.get("helicopter_carrier", [])] if f is not None] @@ -158,10 +158,12 @@ class Faction: doctrine = json.get("doctrine", "modern") if doctrine == "modern": faction.doctrine = MODERN_DOCTRINE - if doctrine == "coldwar": + elif doctrine == "coldwar": faction.doctrine = COLDWAR_DOCTRINE - else: + elif doctrine == "ww2": faction.doctrine = WWII_DOCTRINE + else: + faction.doctrine = MODERN_DOCTRINE # Load the building set building_set = json.get("building_set", "default") @@ -169,8 +171,10 @@ class Faction: faction.building_set = DEFAULT_AVAILABLE_BUILDINGS elif building_set == "ww2ally": faction.building_set = WW2_ALLIES_BUILDINGS - else: + elif building_set == "ww2germany": faction.building_set = WW2_GERMANY_BUILDINGS + else: + faction.building_set = DEFAULT_AVAILABLE_BUILDINGS return faction @@ -201,7 +205,6 @@ def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: print("FACTION ERROR : Unable to find " + unit + " in pydcs") return None - aircraft_loader = lambda x: unit_loader(x, [dcs.planes, dcs.helicopters, MODDED_AIRPLANES]) vehicle_loader = lambda x: unit_loader(x, [Infantry, Unarmed, Armor, AirDefence, Artillery, MODDED_VEHICLES]) ship_loader = lambda x: unit_loader(x, [dcs.ships]) diff --git a/game/factions/faction_loader.py b/game/factions/faction_loader.py index 6b439b9e..36b0c532 100644 --- a/game/factions/faction_loader.py +++ b/game/factions/faction_loader.py @@ -6,7 +6,8 @@ from game.factions.faction import Faction FACTION_DIRECTORY = "./resources/factions/" -def load_factions() -> {}: + +def load_factions() -> {str, Faction}: files = os.listdir(FACTION_DIRECTORY) files = [f for f in files if f.endswith(".json")] @@ -17,8 +18,8 @@ def load_factions() -> {}: path = os.path.join(FACTION_DIRECTORY, f) logging.info("Loading faction" + path) #try: - with open(path, "r") as fdata: - data = json.load(fdata) + with open(path, "r", encoding="utf-8") as fdata: + data = json.load(fdata, encoding="utf-8") factions[data["name"]] = Faction.from_json(data) logging.info("Loaded faction : " + path) #except Exception as e: @@ -26,8 +27,4 @@ def load_factions() -> {}: # logging.error("Unable to load faction : " + path) print(factions) - return factions - - -if __name__ == "__main__": - load_factions() \ No newline at end of file + return factions \ No newline at end of file diff --git a/game/factions/france_1995.py b/game/factions/france_1995.py deleted file mode 100644 index a14f24e5..00000000 --- a/game/factions/france_1995.py +++ /dev/null @@ -1,68 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - SA342Mistral, -) -from dcs.planes import ( - C_130, - E_3A, - KC130, - KC_135, - M_2000C, - Mirage_2000_5, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -France_1995 = { - "country": "France", - "side": "blue", - "units": [ - M_2000C, - Mirage_2000_5, - - KC_135, - KC130, - C_130, - E_3A, - - SA342M, - SA342L, - SA342Mistral, - - Armor.MBT_Leclerc, - Armor.TPz_Fuchs, # Standing as VAB - Armor.APC_Cobra, # Standing as VBL - Armor.ATGM_M1134_Stryker, # Standing as VAB Mephisto - Artillery.SPH_M109_Paladin, # Standing as AMX30 AuF1 - Artillery.MLRS_M270, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Roland_ADS, - AirDefence.SAM_Hawk_PCP, - AirDefence.HQ_7_Self_Propelled_LN, # Standing as Crotale - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - - ], "shorad": [ - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.SAM_Roland_ADS - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/france_2005.py b/game/factions/france_2005.py deleted file mode 100644 index 28c00ae4..00000000 --- a/game/factions/france_2005.py +++ /dev/null @@ -1,86 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - SA342Mistral, -) -from dcs.planes import ( - C_130, - E_3A, - FA_18C_hornet, - KC130, - KC_135, - M_2000C, - Mirage_2000_5, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -France_2005 = { - "country": "France", - "side": "blue", - "units":[ - M_2000C, - Mirage_2000_5, - FA_18C_hornet, # Standing as Rafale M - - KC_135, - KC130, - C_130, - E_3A, - - SA342M, - SA342L, - SA342Mistral, - - Armor.MBT_Leclerc, - Armor.TPz_Fuchs, # Standing as VAB - Armor.APC_Cobra, # Standing as VBL - Armor.ATGM_M1134_Stryker, # Standing as VAB Mephisto - Artillery.SPH_M109_Paladin, # Standing as AMX30 AuF1 - Artillery.MLRS_M270, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Roland_ADS, - AirDefence.SAM_Hawk_PCP, - AirDefence.HQ_7_Self_Propelled_LN, # Standing as Crotale - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - - ], "shorad":[ - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.SAM_Roland_ADS - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, # Standing as CDG Aircraft Carrier - ], "helicopter_carrier": [ - LHA_1_Tarawa, # Standing as Mistral Class - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "PA Charles de Gaulle", - ], "lhanames": [ - "L9013 Mistral", - "L9014 Tonerre", - "L9015 Dixmude" - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/france_modded.py b/game/factions/france_modded.py deleted file mode 100644 index 8283d090..00000000 --- a/game/factions/france_modded.py +++ /dev/null @@ -1,103 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - SA342Mistral, -) -from dcs.planes import ( - C_130, - E_3A, - KC130, - KC_135, - M_2000C, - Mirage_2000_5, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -import pydcs_extensions.frenchpack.frenchpack as frenchpack -from pydcs_extensions.rafale.rafale import Rafale_A_S, Rafale_M - -France_2005_Modded = { - "country": "France", - "side": "blue", - "units": [ - M_2000C, - Mirage_2000_5, - Rafale_M, - Rafale_A_S, - - KC_135, - KC130, - C_130, - E_3A, - - SA342M, - SA342L, - SA342Mistral, - - Armor.MBT_Leclerc, - Artillery.SPH_M109_Paladin, # Standing as AMX30 AuF1 - Artillery.MLRS_M270, - - frenchpack.AMX_10RCR, - frenchpack.AMX_10RCR_SEPAR, - frenchpack.ERC_90, - frenchpack.TRM_2000_PAMELA, - frenchpack.VAB__50, - frenchpack.VAB_MEPHISTO, - frenchpack.VAB_T20_13, - frenchpack.VBL__50, - frenchpack.VBL_AANF1, - frenchpack.VBAE_CRAB, - frenchpack.VBAE_CRAB_MMP, - frenchpack.AMX_30B2, - frenchpack.Leclerc_Serie_XXI, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Roland_ADS, - AirDefence.SAM_Hawk_PCP, - AirDefence.HQ_7_Self_Propelled_LN, # Standing as Crotale - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - - ], "shorad": [ - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.SAM_Roland_ADS - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, # Standing as CDG Aircraft Carrier - ], "helicopter_carrier": [ - LHA_1_Tarawa, # Standing as Mistral Class - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "PA Charles de Gaulle", - ], "lhanames": [ - "L9013 Mistral", - "L9014 Tonerre", - "L9015 Dixmude" - ], "boat": [ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ], "requirements": { - "frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974", - "RAFALE 2.5.5": "https://www.digitalcombatsimulator.com/fr/files/3307478/", - }, "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/germany_1944.py b/game/factions/germany_1944.py deleted file mode 100644 index c63f88f4..00000000 --- a/game/factions/germany_1944.py +++ /dev/null @@ -1,58 +0,0 @@ -from dcs.planes import ( - Bf_109K_4, - FW_190A8, - FW_190D9, - Ju_88A4, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -from game.data.building_data import WW2_GERMANY_BUILDINGS -from game.data.doctrine import WWII_DOCTRINE - -Germany_1944 = { - "country": "Third Reich", - "side": "red", - "units": [ - - FW_190A8, - FW_190D9, - Bf_109K_4, - Ju_88A4, - - Armor.MT_Pz_Kpfw_V_Panther_Ausf_G, - Armor.MT_Pz_Kpfw_IV_Ausf_H, - Armor.HT_Pz_Kpfw_VI_Tiger_I, - Armor.HT_Pz_Kpfw_VI_Ausf__B__Tiger_II, - Armor.APC_Sd_Kfz_251, - Armor.IFV_Sd_Kfz_234_2_Puma, - Armor.Sd_Kfz_184_Elefant, - Armor.TD_Jagdpanther_G1, - Armor.TD_Jagdpanzer_IV, - - Artillery.Sturmpanzer_IV_Brummbär, - - Unarmed.Sd_Kfz_2, - Unarmed.Sd_Kfz_7, - Unarmed.Kübelwagen_82, - - Infantry.Infantry_Mauser_98, - AirDefence.AAA_8_8cm_Flak_36, - ],"requirements":{ - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "shorad": [ - AirDefence.AAA_8_8cm_Flak_36, - ], - "objects": WW2_GERMANY_BUILDINGS, - "doctrine": WWII_DOCTRINE, - "boat": ["UBoatGroupGenerator", "SchnellbootGroupGenerator"], - "boat_count": 2, - "missiles": ["V1GroupGenerator"], - "missiles_count": 1 -} \ No newline at end of file diff --git a/game/factions/germany_1944_easy.py b/game/factions/germany_1944_easy.py deleted file mode 100644 index 8be93457..00000000 --- a/game/factions/germany_1944_easy.py +++ /dev/null @@ -1,51 +0,0 @@ -from dcs.planes import ( - Bf_109K_4, - FW_190A8, - FW_190D9, - Ju_88A4, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -from game.data.building_data import WW2_GERMANY_BUILDINGS -from game.data.doctrine import WWII_DOCTRINE - -Germany_1944_Easy = { - "country": "Third Reich", - "side": "red", - "units": [ - - FW_190A8, - FW_190D9, - Bf_109K_4, - Ju_88A4, - - Armor.MT_Pz_Kpfw_IV_Ausf_H, - Armor.APC_Sd_Kfz_251, - Armor.IFV_Sd_Kfz_234_2_Puma, - Artillery.Sturmpanzer_IV_Brummbär, - - Unarmed.Sd_Kfz_2, - Unarmed.Sd_Kfz_7, - Unarmed.Kübelwagen_82, - - Infantry.Infantry_Mauser_98, - AirDefence.AAA_8_8cm_Flak_36, - ],"requirements":{ - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "shorad":[ - AirDefence.AAA_8_8cm_Flak_36, - ], - "objects": WW2_GERMANY_BUILDINGS, - "doctrine": WWII_DOCTRINE, - "boat": ["UBoatGroupGenerator", "SchnellbootGroupGenerator"], - "boat_count": 1, - "missiles": ["V1GroupGenerator"], - "missiles_count": 1 -} \ No newline at end of file diff --git a/game/factions/germany_1990.py b/game/factions/germany_1990.py deleted file mode 100644 index 54432ef4..00000000 --- a/game/factions/germany_1990.py +++ /dev/null @@ -1,66 +0,0 @@ -from dcs.helicopters import ( - SA342L, - SA342M, - UH_1H, -) -from dcs.planes import ( - C_130, - E_3A, - F_4E, - KC130, - KC_135, - MiG_29G, - Tornado_IDS, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Germany_1990 = { - "country": "Germany", - "side": "blue", - "units":[ - MiG_29G, - Tornado_IDS, - F_4E, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - SA342M, - SA342L, - - Armor.TPz_Fuchs, - Armor.MBT_Leopard_1A3, - Armor.MBT_Leopard_2, - Armor.IFV_Marder, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Roland_ADS, - AirDefence.SAM_Hawk_PCP, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], - "shorad":[ - AirDefence.SPAAA_Gepard, - AirDefence.SAM_Roland_ADS, - ], "boat":[ - "OliverHazardPerryGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/india_2010.py b/game/factions/india_2010.py deleted file mode 100644 index 756faa23..00000000 --- a/game/factions/india_2010.py +++ /dev/null @@ -1,80 +0,0 @@ -from dcs.helicopters import ( - AH_64A, - Mi_8MT, -) -from dcs.planes import ( - C_130, - E_3A, - KC130, - KC_135, - M_2000C, - MiG_21Bis, - MiG_27K, - MiG_29S, - Mirage_2000_5, - Su_30, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - CV_1143_5_Admiral_Kuznetsov, - FSG_1241_1MP_Molniya, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -India_2010 = { - "country": "India", - "side": "blue", - "units": [ - Mirage_2000_5, - M_2000C, - MiG_27K, - MiG_21Bis, - MiG_29S, - Su_30, - - KC_135, - KC130, - C_130, - E_3A, - - AH_64A, - Mi_8MT, - - Armor.MBT_T_90, - Armor.MBT_T_72B, - Armor.IFV_BMP_2, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_3_S_125_LN_5P73, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], - "shorad":[ - AirDefence.SAM_SA_8_Osa_9A33, - AirDefence.AAA_ZU_23_Emplacement, - AirDefence.SPAAA_ZSU_23_4_Shilka, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3, - AirDefence.SAM_SA_8_Osa_9A33, - AirDefence.SAM_SA_19_Tunguska_2S6 - ], "aircraft_carrier": [ - CV_1143_5_Admiral_Kuznetsov, - ], "destroyer": [ - FSG_1241_1MP_Molniya, - ], "carrier_names": [ - "INS Vikramaditya" - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator", "MolniyaGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/insurgent.py b/game/factions/insurgent.py deleted file mode 100644 index 66ae3459..00000000 --- a/game/factions/insurgent.py +++ /dev/null @@ -1,34 +0,0 @@ -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Insurgent = { - "country": "Insurgents", - "side": "red", - "units": [ - - AirDefence.AAA_ZU_23_Insurgent_Closed, - AirDefence.AAA_ZU_23_Insurgent_on_Ural_375, - - Armor.APC_Cobra, - Armor.APC_MTLB, - Armor.ARV_BRDM_2, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - Infantry.Infantry_Soldier_Insurgents, - Infantry.Soldier_RPG, - - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160 - ] -} \ No newline at end of file diff --git a/game/factions/insurgent_modded.py b/game/factions/insurgent_modded.py deleted file mode 100644 index b19b4344..00000000 --- a/game/factions/insurgent_modded.py +++ /dev/null @@ -1,46 +0,0 @@ -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from pydcs_extensions.frenchpack.frenchpack import ( - DIM__KAMIKAZE, - DIM__TOYOTA_BLUE, - DIM__TOYOTA_DESERT, - DIM__TOYOTA_GREEN, -) - -Insurgent_modded = { - "country": "Insurgents", - "side": "red", - "units": [ - - AirDefence.AAA_ZU_23_Insurgent_Closed, - AirDefence.AAA_ZU_23_Insurgent_on_Ural_375, - - DIM__TOYOTA_BLUE, - DIM__TOYOTA_DESERT, - DIM__TOYOTA_GREEN, - DIM__KAMIKAZE, - Armor.ARV_BRDM_2, - Armor.APC_Cobra, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - Infantry.Soldier_AK, - Infantry.Infantry_Soldier_Insurgents, - - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160 - ], "requirements": { - "frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974", - } -} \ No newline at end of file diff --git a/game/factions/iran_2015.py b/game/factions/iran_2015.py deleted file mode 100644 index 53f20dd6..00000000 --- a/game/factions/iran_2015.py +++ /dev/null @@ -1,86 +0,0 @@ -from dcs.helicopters import ( - Mi_24V, - Mi_28N, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - F_14B, - F_4E, - F_5E_3, - IL_76MD, - IL_78M, - MiG_21Bis, - MiG_29A, - Su_17M4, - Su_24M, - Su_25, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Iran_2015 = { - "country": "Iran", - "side": "red", - "units": [ - - MiG_29A, - F_4E, - F_14B, - F_5E_3, - - MiG_21Bis, - Su_24M, - Su_25, - Su_17M4, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - A_50, - - Mi_28N, - Mi_24V, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_SA_2_LN_SM_90, - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.SAM_SA_11_Buk_LN_9A310M1, - - Armor.APC_M113, - Armor.APC_BTR_80, - Armor.MBT_M60A3_Patton, - Armor.MBT_T_72B, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - Infantry.Soldier_AK, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160 - ], - "shorad":[ - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.AAA_ZU_23_Insurgent_Closed - ], "boat":[ - "GrishaGroupGenerator", "MolniyaGroupGenerator", "KiloSubGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/israel_1948.py b/game/factions/israel_1948.py deleted file mode 100644 index bc3b615c..00000000 --- a/game/factions/israel_1948.py +++ /dev/null @@ -1,47 +0,0 @@ -from dcs.planes import ( - B_17G, - Bf_109K_4, - P_51D, - P_51D_30_NA, - SpitfireLFMkIX, - SpitfireLFMkIXCW, -) -from dcs.ships import ( - Armed_speedboat, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Israel_1948 = { - "country": "Israel", - "side": "blue", - "units":[ - SpitfireLFMkIXCW, - SpitfireLFMkIX, - P_51D, - P_51D_30_NA, - Bf_109K_4, # Standing as Avia S-199 - B_17G, - - Armor.MT_M4A4_Sherman_Firefly, - Armor.APC_M2A1, - Armor.MT_M4_Sherman, - Armor.LAC_M8_Greyhound, - - Unarmed.Transport_M818, - Infantry.Infantry_SMLE_No_4_Mk_1, - - AirDefence.AAA_Bofors_40mm, - Armed_speedboat, - ],"requirements":{ - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "shorad": [ - AirDefence.AAA_Bofors_40mm - ], "boat": [ - ], "has_jtac": False -} \ No newline at end of file diff --git a/game/factions/israel_1973.py b/game/factions/israel_1973.py deleted file mode 100644 index 3bfa5d15..00000000 --- a/game/factions/israel_1973.py +++ /dev/null @@ -1,131 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - UH_1H, -) -from dcs.planes import ( - C_130, - E_3A, - F_15C, - F_16A, - F_16C_50, - F_4E, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from pydcs_extensions.a4ec.a4ec import A_4E_C - -Israel_1973 = { - "country": "Israel", - "side": "blue", - "units":[ - F_4E, - A_4E_C, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - - Armor.MT_M4A4_Sherman_Firefly, - Armor.APC_M2A1, - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Hawk_PCP, - AirDefence.AAA_Bofors_40mm, - AirDefence.SAM_Chaparral_M48, - - Armed_speedboat, - ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/", - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, "shorad": [ - AirDefence.SAM_Chaparral_M48, - AirDefence.AAA_Bofors_40mm - ], "boat": [ - ], "has_jtac": True -} - -Israel_1973_NO_WW2_UNITS = { - "country": "Israel", - "side": "blue", - "units":[ - F_4E, - A_4E_C, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Chaparral_M48, - - Armed_speedboat, - ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/", - }, "shorad": [ - AirDefence.SAM_Chaparral_M48, - ], "boat": [ - ], "has_jtac": True -} - -Israel_1982 = { - "country": "Israel", - "side": "blue", - "units":[ - F_4E, - A_4E_C, - F_15C, - F_16A, - F_16C_50, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - AH_1W, - - Armor.APC_M113, - Armor.MBT_M60A3_Patton, - Armor.MBT_Merkava_Mk__4, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Chaparral_M48, - - Armed_speedboat, - ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/", - }, "shorad": [ - AirDefence.SAM_Chaparral_M48, - ], "boat": [ - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/israel_2000.py b/game/factions/israel_2000.py deleted file mode 100644 index d87460f9..00000000 --- a/game/factions/israel_2000.py +++ /dev/null @@ -1,66 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - AH_64D, -) -from dcs.planes import ( - C_130, - E_3A, - F_15C, - F_15E, - F_16C_50, - F_4E, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -Israel_2000 = { - "country": "Israel", - "side": "blue", - "units":[ - F_16C_50, - F_15C, - F_15E, - F_4E, - - KC_135, - KC130, - C_130, - E_3A, - - AH_1W, - AH_64D, - - Armor.MBT_Merkava_Mk__4, - Armor.APC_M113, - Armor.APC_M1043_HMMWV_Armament, - Armor.ATGM_M1045_HMMWV_TOW, - Artillery.SPH_M109_Paladin, - Artillery.MLRS_M270, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Patriot_EPP_III, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], - "shorad": [ - AirDefence.SAM_Avenger_M1097 - ], "boat": [ - "ArleighBurkeGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/italy_1990.py b/game/factions/italy_1990.py deleted file mode 100644 index 267cd611..00000000 --- a/game/factions/italy_1990.py +++ /dev/null @@ -1,69 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - UH_1H, -) -from dcs.planes import ( - AV8BNA, - C_130, - E_3A, - KC_135, - S_3B_Tanker, - Tornado_IDS, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Italy_1990 = { - "country": "Italy", - "side": "blue", - "units": [ - Tornado_IDS, - AV8BNA, - # MB339, - - KC_135, - S_3B_Tanker, - C_130, - E_3A, - - AH_1W, - UH_1H, - - Armor.MBT_Leopard_1A3, # OF-40 MBT - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Avenger_M1097, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - ], "cruiser": [ - Ticonderoga_class, - ], "lhanames": [ - "Giuseppe Garibaldi", - "Cavour", - ], "boat":[ - "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} diff --git a/game/factions/italy_1990_mb339.py b/game/factions/italy_1990_mb339.py deleted file mode 100644 index 9d594817..00000000 --- a/game/factions/italy_1990_mb339.py +++ /dev/null @@ -1,73 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - UH_1H, -) -from dcs.planes import ( - AV8BNA, - C_130, - E_3A, - KC_135, - S_3B_Tanker, - Tornado_IDS, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from pydcs_extensions.mb339.mb339 import MB_339PAN - -Italy_1990_MB339 = { - "country": "Italy", - "side": "blue", - "units": [ - Tornado_IDS, - AV8BNA, - MB_339PAN, - - KC_135, - S_3B_Tanker, - C_130, - E_3A, - - AH_1W, - UH_1H, - - Armor.MBT_Leopard_1A3, # OF-40 MBT - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Avenger_M1097, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - ], "cruiser": [ - Ticonderoga_class, - ], "lhanames": [ - "Giuseppe Garibaldi", - "Cavour", - ], "boat": [ - "OliverHazardPerryGroupGenerator" - ], "requirements": { - "MB-339A": "http://www.freccetricolorivirtuali.net/", - }, "has_jtac": True -} diff --git a/game/factions/japan_2005.py b/game/factions/japan_2005.py index d33800ff..5201d8d3 100644 --- a/game/factions/japan_2005.py +++ b/game/factions/japan_2005.py @@ -62,7 +62,7 @@ Japan_2005 = { USS_Arleigh_Burke_IIa, ], "cruiser": [ Ticonderoga_class, - ], "lhanames": [ + ], "helicopter_carrier_names": [ "Hyuga", "Ise", ], "boat":[ diff --git a/game/factions/spain_1990.py b/game/factions/spain_1990.py index 246484a4..2dfb6ec3 100644 --- a/game/factions/spain_1990.py +++ b/game/factions/spain_1990.py @@ -62,7 +62,7 @@ Spain_1990 = { Ticonderoga_class, ], "carrier_names": [ "Principe de Asturias", - ], "lhanames": [ + ], "helicopter_carrier_names": [ "Juan Carlos I", ], "boat":[ "OliverHazardPerryGroupGenerator" diff --git a/game/factions/uk_1990.py b/game/factions/uk_1990.py index 4855059d..242fea63 100644 --- a/game/factions/uk_1990.py +++ b/game/factions/uk_1990.py @@ -64,7 +64,7 @@ UnitedKingdom_1990 = { Oliver_Hazzard_Perry_class, ], "cruiser": [ Ticonderoga_class, - ], "lhanames": [ + ], "helicopter_carrier_names": [ "HMS Invincible", "HMS Illustrious", "HMS Ark Royal", diff --git a/game/factions/us_aggressors.py b/game/factions/us_aggressors.py index 650c09cd..f466c5dd 100644 --- a/game/factions/us_aggressors.py +++ b/game/factions/us_aggressors.py @@ -89,7 +89,7 @@ US_Aggressors = { "CVN-72 Abraham Lincoln", "CVN-73 George Washington", "CVN-74 John C. Stennis", - ], "lhanames": [ + ], "helicopter_carrier_names": [ "LHA-1 Tarawa", "LHA-2 Saipan", "LHA-3 Belleau Wood", diff --git a/game/factions/usa_1990.py b/game/factions/usa_1990.py index 4014237a..b678537d 100644 --- a/game/factions/usa_1990.py +++ b/game/factions/usa_1990.py @@ -80,7 +80,7 @@ USA_1990 = { "CVN-72 Abraham Lincoln", "CVN-73 Georges Washington", "CVN-74 John C. Stennis", - ], "lhanames": [ + ], "helicopter_carrier_names": [ "LHA-1 Tarawa", "LHA-2 Saipan", "LHA-3 Belleau Wood", diff --git a/game/factions/usa_2005.py b/game/factions/usa_2005.py index 5b9e03ca..0eb3175a 100644 --- a/game/factions/usa_2005.py +++ b/game/factions/usa_2005.py @@ -90,7 +90,7 @@ USA_2005 = { "CVN-72 Abraham Lincoln", "CVN-73 George Washington", "CVN-74 John C. Stennis", - ], "lhanames": [ + ], "helicopter_carrier_names": [ "LHA-1 Tarawa", "LHA-2 Saipan", "LHA-3 Belleau Wood", diff --git a/gen/fleet/lha_group.py b/gen/fleet/lha_group.py index d64b933e..6fbf23ac 100644 --- a/gen/fleet/lha_group.py +++ b/gen/fleet/lha_group.py @@ -15,8 +15,6 @@ class LHAGroupGenerator(GroupGenerator): if len(self.faction.helicopter_carrier) > 0: carrier_type = random.choice(self.faction.helicopter_carrier) self.add_unit(carrier_type, "LHA", self.position.x, self.position.y, self.heading) - else: - return # Add destroyers escort if len(self.faction.destroyers) > 0: diff --git a/resources/factions/australia_2005.json b/resources/factions/australia_2005.json new file mode 100644 index 00000000..79282881 --- /dev/null +++ b/resources/factions/australia_2005.json @@ -0,0 +1,61 @@ +{ + "country": "Australia", + "name": "Australia 2005", + "aircrafts": [ + "FA_18C_hornet", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "MBT_Leopard_1A3", + "APC_M113", + "IFV_LAV_25", + "IFV_MCV_80" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "RapierGenerator" + ], + "sams": [ + "HawkGenerator", + "RapierGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + "HMAS Canberra", + "HMAS Adelaide" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/bluefor_coldwar.json b/resources/factions/bluefor_coldwar.json new file mode 100644 index 00000000..2e2a120b --- /dev/null +++ b/resources/factions/bluefor_coldwar.json @@ -0,0 +1,75 @@ +{ + "country": "Combined Joint Task Forces Blue", + "name": "Bluefor Coldwar", + "aircrafts": [ + "F_14B", + "F_4E", + "F_5E_3", + "A_10A", + "AJS37", + "UH_1H", + "SA342M", + "SA342L" + ], + "awacs": [ + "C_130", + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "VulcanGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper", + "doctrine": "coldwar" +} diff --git a/resources/factions/bluefor_coldwar_a4.json b/resources/factions/bluefor_coldwar_a4.json new file mode 100644 index 00000000..bcc2ba2f --- /dev/null +++ b/resources/factions/bluefor_coldwar_a4.json @@ -0,0 +1,78 @@ +{ + "country": "Combined Joint Task Forces Blue", + "name": "Bluefor Coldwar (With A4)", + "aircrafts": [ + "F_14B", + "F_4E", + "F_5E_3", + "A_10A", + "AJS37", + "UH_1H", + "SA342M", + "SA342L", + "A_4E_C" + ], + "awacs": [ + "C_130", + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "VulcanGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": { + "Community A-4E": "https://heclak.github.io/community-a4e-c/" + }, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper", + "doctrine": "coldwar" +} diff --git a/resources/factions/bluefor_coldwar_a4_mb339.json b/resources/factions/bluefor_coldwar_a4_mb339.json new file mode 100644 index 00000000..2c6b314a --- /dev/null +++ b/resources/factions/bluefor_coldwar_a4_mb339.json @@ -0,0 +1,79 @@ +{ + "country": "Combined Joint Task Forces Blue", + "name": "Bluefor Coldwar (With A4 & MB339)", + "aircrafts": [ + "F_14B", + "F_4E", + "F_5E_3", + "A_10A", + "AJS37", + "UH_1H", + "SA342M", + "SA342L", + "A_4E_C", + "MB_339PAN" + ], + "awacs": [ + "C_130", + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "VulcanGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": { + "Community A-4E": "https://heclak.github.io/community-a4e-c/" + }, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper", + "doctrine": "coldwar" +} diff --git a/resources/factions/bluefor_modern.json b/resources/factions/bluefor_modern.json new file mode 100644 index 00000000..1f011c6c --- /dev/null +++ b/resources/factions/bluefor_modern.json @@ -0,0 +1,92 @@ +{ + "country": "Combined Joint Task Forces Blue", + "name": "Bluefor Modern", + "aircrafts": [ + "F_14B", + "F_15C", + "F_16C_50", + "FA_18C_hornet", + "JF_17", + "M_2000C", + "F_5E_3", + "Su_27", + "Su_25T", + "A_10A", + "A_10C", + "A_10C_2", + "AV8BNA", + "AJS37", + "UH_1H", + "AH_64D", + "Ka_50", + "SA342M", + "SA342L" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "MBT_Leopard_2", + "MBT_Merkava_Mk__4", + "ATGM_M1134_Stryker", + "IFV_M2A2_Bradley", + "IFV_Marder", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator", + "PatriotGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/canada_2005.json b/resources/factions/canada_2005.json new file mode 100644 index 00000000..c01a0b3d --- /dev/null +++ b/resources/factions/canada_2005.json @@ -0,0 +1,59 @@ +{ + "country": "Canada", + "name": "Canada 2005", + "aircrafts": [ + "FA_18C_hornet", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Leopard_1A3", + "MBT_Leopard_2", + "IFV_LAV_25", + "APC_M113", + "IFV_MCV_80" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator", + "AvengerGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/china_2010.json b/resources/factions/china_2010.json index bff4d388..52e886b1 100644 --- a/resources/factions/china_2010.json +++ b/resources/factions/china_2010.json @@ -56,7 +56,7 @@ "helicopter_carrier": [ "Type_071_Amphibious_Transport_Dock" ], - "lhanames": [ + "helicopter_carrier_names": [ "Kunlun Shan", "Jinggang Shan", "Changbai Shan", diff --git a/resources/factions/france_1995.json b/resources/factions/france_1995.json new file mode 100644 index 00000000..2dae2a03 --- /dev/null +++ b/resources/factions/france_1995.json @@ -0,0 +1,69 @@ +{ + "country": "France", + "name": "France 1995", + "aircrafts": [ + "M_2000C", + "Mirage_2000_5", + "SA342M", + "SA342L", + "SA342Mistral" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Leclerc", + "TPz_Fuchs", + "APC_Cobra", + "ATGM_M1134_Stryker", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "HQ7Generator", + "RolandGenerator" + ], + "sams": [ + "RolandGenerator", + "HawkGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa", + "Oliver_Hazzard_Perry_class" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + "Jeanne d'Arc" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/france_2005_modded.json b/resources/factions/france_2005_modded.json new file mode 100644 index 00000000..f16f9f4a --- /dev/null +++ b/resources/factions/france_2005_modded.json @@ -0,0 +1,84 @@ +{ + "country": "France", + "name": "France 2005 (Modded)", + "aircrafts": [ + "M_2000C", + "Mirage_2000_5", + "Rafale_M", + "Rafale_A_S", + "SA342M", + "SA342L", + "SA342Mistral" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "AMX_10RCR", + "AMX_10RCR_SEPAR", + "ERC_90", + "TRM_2000_PAMELA", + "VAB__50", + "VAB_MEPHISTO", + "VAB_T20_13", + "VAB_T20_13", + "VBL__50", + "VBL_AANF1", + "VBAE_CRAB", + "VBAE_CRAB_MMP", + "AMX_30B2", + "Leclerc_Serie_XXI" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "HQ7Generator", + "RolandGenerator" + ], + "sams": [ + "RolandGenerator", + "HawkGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": { + "frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974", + "RAFALE 2.5.5": "https://www.digitalcombatsimulator.com/fr/files/3307478/" + }, + "carrier_names": [ + "L9013 Mistral", + "L9014 Tonerre", + "L9015 Dixmude" + ], + "helicopter_carrier_names": [ + "Jeanne d'Arc" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/germany_1942.json b/resources/factions/germany_1942.json new file mode 100644 index 00000000..9f07a4c4 --- /dev/null +++ b/resources/factions/germany_1942.json @@ -0,0 +1,56 @@ +{ + "country": "Third Reich", + "name": "Germany 1944", + "aircrafts": [ + "FW_190A8", + "FW_190D9", + "Bf_109K_4", + "Ju_88A4" + ], + "frontline_units": [ + "MT_Pz_Kpfw_IV_Ausf_H", + "APC_Sd_Kfz_251", + "IFV_Sd_Kfz_234_2_Puma", + "TD_Jagdpanzer_IV" + ], + "artillery_units": [ + "Sturmpanzer_IV_Brummbär" + ], + "logistics_units": [ + "Blitz_3_6_6700A", + "Kübelwagen_82", + "Sd_Kfz_7", + "Sd_Kfz_2" + ], + "infantry_units": [ + "Infantry_Mauser_98" + ], + "shorads": [ + "FlakGenerator" + ], + "sams": [ + "FlakGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "UBoatGroupGenerator", "SchnellbootGroupGenerator" + ], + "navy_group_count": 2, + "has_jtac": false, + "doctrine": "ww2", + "building_set": "ww2germany" +} diff --git a/resources/factions/germany_1944.json b/resources/factions/germany_1944.json new file mode 100644 index 00000000..5479701e --- /dev/null +++ b/resources/factions/germany_1944.json @@ -0,0 +1,63 @@ +{ + "country": "Third Reich", + "name": "Germany 1944", + "aircrafts": [ + "FW_190A8", + "FW_190D9", + "Bf_109K_4", + "Ju_88A4" + ], + "frontline_units": [ + "MT_Pz_Kpfw_V_Panther_Ausf_G", + "MT_Pz_Kpfw_IV_Ausf_H", + "HT_Pz_Kpfw_VI_Tiger_I", + "HT_Pz_Kpfw_VI_Ausf__B__Tiger_II", + "APC_Sd_Kfz_251", + "IFV_Sd_Kfz_234_2_Puma", + "Sd_Kfz_184_Elefant", + "TD_Jagdpanther_G1", + "TD_Jagdpanzer_IV" + ], + "artillery_units": [ + "Sturmpanzer_IV_Brummbär" + ], + "logistics_units": [ + "Blitz_3_6_6700A", + "Kübelwagen_82", + "Sd_Kfz_7", + "Sd_Kfz_2" + ], + "infantry_units": [ + "Infantry_Mauser_98" + ], + "shorads": [ + "FlakGenerator" + ], + "sams": [ + "FlakGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "UBoatGroupGenerator", "SchnellbootGroupGenerator" + ], + "navy_group_count": 2, + "missiles": ["V1GroupGenerator"], + "missiles_group_count": 1, + "has_jtac": false, + "doctrine": "ww2", + "building_set": "ww2germany" +} diff --git a/resources/factions/germany_1990.json b/resources/factions/germany_1990.json new file mode 100644 index 00000000..c462aa84 --- /dev/null +++ b/resources/factions/germany_1990.json @@ -0,0 +1,61 @@ +{ + "country": "Germany", + "name": "Germany 1990", + "aircrafts": [ + "MiG_29G", + "Tornado_IDS", + "F_4E", + "UH_1H", + "SA342M", + "SA342L" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "TPz_Fuchs", + "MBT_Leopard_1A3", + "MBT_Leopard_2", + "IFV_Marder" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "RolandGenerator" + ], + "sams": [ + "HawkGenerator", + "RolandGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/india_2010.json b/resources/factions/india_2010.json new file mode 100644 index 00000000..4a4ba636 --- /dev/null +++ b/resources/factions/india_2010.json @@ -0,0 +1,68 @@ +{ + "country": "India", + "name": "India 2010", + "aircrafts": [ + "Mirage_2000_5", + "M_2000C", + "MiG_27K", + "MiG_21Bis", + "MiG_29S", + "Su_30", + "AH_64A", + "Mi_8MT" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "MBT_T_90", + "MBT_T_72B", + "IFV_BMP_2" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_M4", + "Paratrooper_RPG_16" + ], + "shorads": [ + "SA8Generator", + "SA13Generator", + "SA19Generator", + "ZSU23Generator" + ], + "sams": [ + "SA6Generator", + "SA3Generator" + ], + "aircraft_carrier": [ + "CV_1143_5_Admiral_Kuznetsov" + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + "FF_1135M_Rezky" + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + "INS Vikramaditya" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator", "MolniyaGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/insurgents.json b/resources/factions/insurgents.json new file mode 100644 index 00000000..7bbf51f4 --- /dev/null +++ b/resources/factions/insurgents.json @@ -0,0 +1,33 @@ +{ + "country": "Insurgents", + "name": "Insurgents", + "aircrafts": [ + ], + "frontline_units": [ + "APC_Cobra", + "APC_MTLB", + "ARV_BRDM_2", + "AAA_ZU_23_Insurgent_on_Ural_375" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Insurgents", + "Soldier_RPG" + ], + "shorads": [ + "SA9Generator", + "ZU23Generator", + "ZSU23Generator" + ], + "sams": [ + "ZU23Generator", + "ZSU23Generator" + ] +} diff --git a/resources/factions/insurgents_modded.json b/resources/factions/insurgents_modded.json new file mode 100644 index 00000000..487e8bfb --- /dev/null +++ b/resources/factions/insurgents_modded.json @@ -0,0 +1,36 @@ +{ + "country": "Insurgents", + "name": "Insurgents (Modded)", + "aircrafts": [ + ], + "frontline_units": [ + "DIM__TOYOTA_BLUE", + "DIM__TOYOTA_DESERT", + "DIM__TOYOTA_GREEN", + "DIM__KAMIKAZE", + "AAA_ZU_23_Insurgent_on_Ural_375" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Insurgents", + "Soldier_RPG" + ], + "shorads": [ + "SA9Generator", + "ZU23Generator", + "ZSU23Generator" + ], + "sams": [ + "ZU23Generator", + "ZSU23Generator" + ],"requirements": { + "frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974" + } +} diff --git a/resources/factions/iran_2015.json b/resources/factions/iran_2015.json new file mode 100644 index 00000000..dbaab752 --- /dev/null +++ b/resources/factions/iran_2015.json @@ -0,0 +1,74 @@ +{ + "country": "Iran", + "name": "Iran 2015", + "aircrafts": [ + "MiG_21Bis", + "MiG_29A", + "F_4E", + "F_5E_3", + "F_14B", + "Su_17M4", + "Su_24M", + "Su_25", + "Su_25T", + "Mi_28N", + "Mi_24V" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "APC_M113", + "APC_BTR_80", + "MBT_M60A3_Patton", + "IFV_BMP_1", + "MBT_T_72B" + ], + "artillery_units": [ + "MLRS_BM_21_Grad", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Insurgents", + "Paratrooper_RPG_16" + ], + "shorads": [ + "HQ7Generator", + "ZSU23Generator" + ], + "sams": [ + "SA2Generator", + "SA6Generator", + "SA11Generator", + "HawkGenerator", + "HQ7Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + "FF_1135M_Rezky" + ], + "cruisers": [ + "FSG_1241_1MP_Molniya" + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator", "MolniyaGroupGenerator", "KiloSubGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/israel_1948.json b/resources/factions/israel_1948.json new file mode 100644 index 00000000..ca1d7e40 --- /dev/null +++ b/resources/factions/israel_1948.json @@ -0,0 +1,51 @@ +{ + "country": "Israel", + "name": "Israel 1948", + "aircrafts": [ + "SpitfireLFMkIXCW", + "SpitfireLFMkIX", + "P_51D", + "P_51D_30_NA", + "Bf_109K_4", + "B_17G" + ], + "frontline_units": [ + "MT_M4A4_Sherman_Firefly", + "APC_M2A1", + "MT_M4_Sherman", + "LAC_M8_Greyhound" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_SMLE_No_4_Mk_1" + ], + "shorads": [ + "BoforsGenerator" + ], + "sams": [ + "BoforsGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + ], + "has_jtac": false, + "doctrine": "ww2" +} diff --git a/resources/factions/israel_1973.json b/resources/factions/israel_1973.json new file mode 100644 index 00000000..fd5d91fd --- /dev/null +++ b/resources/factions/israel_1973.json @@ -0,0 +1,58 @@ +{ + "country": "Israel", + "name": "Israel 1973", + "aircrafts": [ + "F_4E", + "A_4E_C", + "UH_1H" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MT_M4A4_Sherman_Firefly", + "APC_M2A1", + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "BoforsGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "Community A-4E": "https://heclak.github.io/community-a4e-c/", + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + ], + "has_jtac": false, + "doctrine": "coldwar" +} diff --git a/resources/factions/israel_1982.json b/resources/factions/israel_1982.json new file mode 100644 index 00000000..a5f23a9d --- /dev/null +++ b/resources/factions/israel_1982.json @@ -0,0 +1,60 @@ +{ + "country": "Israel", + "name": "Israel 1982", + "aircrafts": [ + "F_4E", + "A_4E_C", + "F_15C", + "F_16A", + "F_16C_50", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "APC_M113", + "MBT_M60A3_Patton", + "MBT_Merkava_Mk__4" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "ChaparralGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "Community A-4E": "https://heclak.github.io/community-a4e-c/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/israel_2000.json b/resources/factions/israel_2000.json new file mode 100644 index 00000000..0210a93d --- /dev/null +++ b/resources/factions/israel_2000.json @@ -0,0 +1,63 @@ +{ + "country": "Israel", + "name": "Israel 2000", + "aircrafts": [ + "F_4E", + "F_15C", + "F_15E", + "F_16C_50", + "UH_1H", + "AH_1W", + "AH_64D" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "APC_M113", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW", + "MBT_Merkava_Mk__4" + ], + "artillery_units": [ + "SPH_M109_Paladin", + "MLRS_M270" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "ChaparralGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/italy_1990.json b/resources/factions/italy_1990.json new file mode 100644 index 00000000..3f924868 --- /dev/null +++ b/resources/factions/italy_1990.json @@ -0,0 +1,62 @@ +{ + "country": "Italy", + "name": "Italy 1990", + "aircrafts": [ + "Tornado_IDS", + "AV8BNA", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Leopard_1A3", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator", + "AvengerGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": { + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + "Giuseppe Garibaldi", + "Cavour" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/italy_1990_mb339.json b/resources/factions/italy_1990_mb339.json new file mode 100644 index 00000000..aac954bf --- /dev/null +++ b/resources/factions/italy_1990_mb339.json @@ -0,0 +1,63 @@ +{ + "country": "Italy", + "name": "Italy 1990 (With MB339)", + "aircrafts": [ + "Tornado_IDS", + "AV8BNA", + "MB_339PAN", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Leopard_1A3", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator", + "AvengerGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": { + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + "Giuseppe Garibaldi", + "Cavour" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/japan_2005.json b/resources/factions/japan_2005.json new file mode 100644 index 00000000..010b8d38 --- /dev/null +++ b/resources/factions/japan_2005.json @@ -0,0 +1,68 @@ +{ + "country": "Japan", + "name": "Japan 2005", + "aircrafts": [ + "F_15C", + "F_16C_50", + "F_4E", + "AH_1W", + "AH_64D" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Merkava_Mk__4", + "MBT_M1A2_Abrams", + "IFV_Marder", + "TPz_Fuchs", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament" + ], + "artillery_units": [ + "SPH_M109_Paladin", + "MLRS_M270" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "GepardGenerator" + ], + "sams": [ + "HawkGenerator", + "PatriotGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": { + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + "Hyuga", + "Ise" + ], + "navy_generators": [ + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json new file mode 100644 index 00000000..fa0f1966 --- /dev/null +++ b/resources/factions/libya_2011.json @@ -0,0 +1,64 @@ +{ + "country": "Libya", + "name": "Libya 2011", + "aircrafts": [ + "MiG_21Bis", + "MiG_23MLD", + "Su_17M4", + "Su_24M", + "Mi_24V" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_1", + "ARV_BRDM_2", + "MBT_T_72B", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Insurgents", + "Paratrooper_RPG_16" + ], + "shorads": [ + "HQ7Generator", + "SA8Generator", + "ZSU23Generator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + "FF_1135M_Rezky" + ], + "cruisers": [ + "FSG_1241_1MP_Molniya" + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator", "MolniyaGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/russia_1990.json b/resources/factions/russia_1990.json index 13e91eb7..cf760e22 100644 --- a/resources/factions/russia_1990.json +++ b/resources/factions/russia_1990.json @@ -53,7 +53,7 @@ ], "helicopter_carrier": [ ], - "lhanames": [ + "helicopter_carrier_names": [ ], "destroyers": [ "FF_1135M_Rezky" diff --git a/resources/factions/russia_2010.json b/resources/factions/russia_2010.json index 6d404c08..7d3eedff 100644 --- a/resources/factions/russia_2010.json +++ b/resources/factions/russia_2010.json @@ -60,7 +60,7 @@ ], "helicopter_carrier": [ ], - "lhanames": [ + "helicopter_carrier_names": [ ], "destroyers": [ "FF_1135M_Rezky" diff --git a/resources/factions/russia_2020.json b/resources/factions/russia_2020.json index b12bf7d1..6efe6219 100644 --- a/resources/factions/russia_2020.json +++ b/resources/factions/russia_2020.json @@ -57,7 +57,7 @@ ], "helicopter_carrier": [ ], - "lhanames": [ + "helicopter_carrier_names": [ ], "destroyers": [ "FF_1135M_Rezky" diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index 78052bc7..af9cd507 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -66,7 +66,7 @@ "CVN-73 George Washington", "CVN-74 John C. Stennis" ], - "lhanames": [ + "helicopter_carrier_names": [ "LHA-1 Tarawa", "LHA-2 Saipan", "LHA-3 Belleau Wood", diff --git a/theater/start_generator.py b/theater/start_generator.py index 4e2a67da..135d50fc 100644 --- a/theater/start_generator.py +++ b/theater/start_generator.py @@ -134,8 +134,8 @@ def generate_groundobjects(theater: ConflictTheater, game): g.groups.append(group) cp.ground_objects.append(g) # Set new name : - if len(faction.lha_names) > 0: - cp.name = random.choice(faction.lha_names) + if len(faction.helicopter_carrier_names) > 0: + cp.name = random.choice(faction.helicopter_carrier_names) else: cp_to_remove.append(cp) else: From 0191eca9dc6cc1d734aa4e2a77eae8e999caaa3f Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 17:03:39 +0200 Subject: [PATCH 09/29] Keeping new factions up to date with develop branch. --- resources/factions/bluefor_coldwar.json | 3 +- resources/factions/bluefor_coldwar_a4.json | 3 +- .../factions/bluefor_coldwar_a4_mb339.json | 3 +- resources/factions/bluefor_modern.json | 4 +- resources/factions/usa_1990.json | 86 +++++++++++++++++++ resources/factions/usa_2005.json | 12 ++- 6 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 resources/factions/usa_1990.json diff --git a/resources/factions/bluefor_coldwar.json b/resources/factions/bluefor_coldwar.json index 2e2a120b..9c10f332 100644 --- a/resources/factions/bluefor_coldwar.json +++ b/resources/factions/bluefor_coldwar.json @@ -9,7 +9,8 @@ "AJS37", "UH_1H", "SA342M", - "SA342L" + "SA342L", + "B_52H" ], "awacs": [ "C_130", diff --git a/resources/factions/bluefor_coldwar_a4.json b/resources/factions/bluefor_coldwar_a4.json index bcc2ba2f..d3ff3337 100644 --- a/resources/factions/bluefor_coldwar_a4.json +++ b/resources/factions/bluefor_coldwar_a4.json @@ -10,7 +10,8 @@ "UH_1H", "SA342M", "SA342L", - "A_4E_C" + "A_4E_C", + "B_52H" ], "awacs": [ "C_130", diff --git a/resources/factions/bluefor_coldwar_a4_mb339.json b/resources/factions/bluefor_coldwar_a4_mb339.json index 2c6b314a..bfd3a41f 100644 --- a/resources/factions/bluefor_coldwar_a4_mb339.json +++ b/resources/factions/bluefor_coldwar_a4_mb339.json @@ -11,7 +11,8 @@ "SA342M", "SA342L", "A_4E_C", - "MB_339PAN" + "MB_339PAN", + "B_52H" ], "awacs": [ "C_130", diff --git a/resources/factions/bluefor_modern.json b/resources/factions/bluefor_modern.json index 1f011c6c..94c18902 100644 --- a/resources/factions/bluefor_modern.json +++ b/resources/factions/bluefor_modern.json @@ -20,7 +20,9 @@ "AH_64D", "Ka_50", "SA342M", - "SA342L" + "SA342L", + "B_52H", + "B_1B" ], "awacs": [ "E_3A" diff --git a/resources/factions/usa_1990.json b/resources/factions/usa_1990.json new file mode 100644 index 00000000..fd8b4869 --- /dev/null +++ b/resources/factions/usa_1990.json @@ -0,0 +1,86 @@ + +{ + + "country": "USA", + "name": "USA 2005", + "aircrafts": [ + "F_15C", + "F_15E", + "F_14B", + "FA_18C_hornet", + "F_16C_50", + "A_10A", + "AV8BNA", + "UH_1H", + "AH_64A", + "B_52H", + "B_1B", + "F_117A" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "ATGM_M1134_Stryker", + "APC_M1126_Stryker_ICV", + "IFV_M2A2_Bradley", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class", + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator", + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} \ No newline at end of file diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index af9cd507..58daa5bf 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -1,6 +1,6 @@ { "country": "USA", - "name": "USA 2005", + "name": "USA 1990", "aircrafts": [ "F_15C", "F_15E", @@ -11,7 +11,10 @@ "A_10C_2", "AV8BNA", "UH_1H", - "AH_64D" + "AH_64D", + "B_52H", + "B_1B", + "F_117A" ], "awacs": [ "E_3A" @@ -74,8 +77,9 @@ "LHA-5 Peleliu" ], "navy_generators": [ - "ArleighBurkeGroupGenerator" + "ArleighBurkeGroupGenerator", + "OliverHazardPerryGroupGenerator" ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" -} +} \ No newline at end of file From b6a933e264dcef19726f425903aacd7fe9c431d2 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 17:16:56 +0200 Subject: [PATCH 10/29] Readded Full Map - Caucasus, remade by Discord user "george" --- resources/campaigns/full_caucasus.json | 166 +++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 resources/campaigns/full_caucasus.json diff --git a/resources/campaigns/full_caucasus.json b/resources/campaigns/full_caucasus.json new file mode 100644 index 00000000..9db67f15 --- /dev/null +++ b/resources/campaigns/full_caucasus.json @@ -0,0 +1,166 @@ +{ + "name": "Caucasus - Full Map", + "theater": "Caucasus", + "player_points": [ + { + "type": "airbase", + "id": "Kobuleti", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Senaki-Kolkhi", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Kutaisi", + "size": 600, + "importance": 1 + }, + { + "type": "carrier", + "id": 1001, + "x": -304708, + "y": 552839, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -326050.6875, + "y": 519452.1875, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Beslan", + "size": 1000, + "importance": 1.3 + }, + { + "type": "airbase", + "id": "Nalchik", + "size": 1000, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Mozdok", + "size": 2000, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Mineralnye Vody", + "size": 2000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Maykop-Khanskaya", + "size": 3000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Sukhumi-Babushara", + "size": 2000, + "importance": 1.3 + }, + { + "type": "airbase", + "id": "Gudauta", + "size": 2000, + "importance": 1.3 + }, + { + "type": "airbase", + "id": "Sochi-Adler", + "size": 2000, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Gelendzhik", + "size": 2000, + "importance": 1.3 + }, + { + "type": "airbase", + "id": "Vaziani", + "size": 2000, + "importance": 1.3 + } + ], + "links": [ + [ + "Kutaisi", + "Vaziani" + ], + [ + "Beslan", + "Vaziani" + ], + [ + "Beslan", + "Mozdok" + ], + [ + "Beslan", + "Nalchik" + ], + [ + "Mozdok", + "Nalchik" + ], + [ + "Mineralnye Vody", + "Nalchik" + ], + [ + "Mineralnye Vody", + "Mozdok" + ], + [ + "Maykop-Khanskaya", + "Mineralnye Vody" + ], + [ + "Maykop-Khanskaya", + "Gelendzhik" + ], + [ + "Gelendzhik", + "Sochi-Adler" + ], + [ + "Gudauta", + "Sochi-Adler" + ], + [ + "Gudauta", + "Sukhumi-Babushara" + ], + [ + "Senaki-Kolkhi", + "Sukhumi-Babushara" + ], + [ + "Kutaisi", + "Senaki-Kolkhi" + ], + [ + "Senaki-Kolkhi", + "Kobuleti" + ], + [ + "Kobuleti", + "Kutaisi" + ] + ] +} \ No newline at end of file From d6c19a8affc41e7d394d418e911e51cf0d477577 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 17:18:55 +0200 Subject: [PATCH 11/29] Added author field to campaign json file --- resources/campaigns/battle_of_britain.json | 1 + resources/campaigns/desert_war.json | 1 + resources/campaigns/dunkirk.json | 1 + resources/campaigns/emirates.json | 1 + resources/campaigns/full_caucasus.json | 1 + resources/campaigns/full_map.json | 1 + resources/campaigns/golan_heights_battle.json | 1 + resources/campaigns/inherent_resolve.json | 1 + resources/campaigns/invasion_from_turkey.json | 1 + resources/campaigns/invasion_of_iran.json | 1 + resources/campaigns/invasion_of_iran_[lite].json | 1 + resources/campaigns/normandy.json | 1 + resources/campaigns/normandy_small.json | 1 + resources/campaigns/north_caucasus.json | 1 + resources/campaigns/north_nevada.json | 1 + resources/campaigns/russia_small.json | 1 + resources/campaigns/syrian_civil_war.json | 1 + resources/campaigns/western_georgia.json | 1 + 18 files changed, 18 insertions(+) diff --git a/resources/campaigns/battle_of_britain.json b/resources/campaigns/battle_of_britain.json index 38f5ab0f..28811e44 100644 --- a/resources/campaigns/battle_of_britain.json +++ b/resources/campaigns/battle_of_britain.json @@ -1,6 +1,7 @@ { "name": "The Channel - Battle of Britain", "theater": "The Channel", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/desert_war.json b/resources/campaigns/desert_war.json index e49f7081..eda0bd6c 100644 --- a/resources/campaigns/desert_war.json +++ b/resources/campaigns/desert_war.json @@ -1,6 +1,7 @@ { "name": "Persian Gulf - Desert War", "theater": "Persian Gulf", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/dunkirk.json b/resources/campaigns/dunkirk.json index d3cf11b0..009c0439 100644 --- a/resources/campaigns/dunkirk.json +++ b/resources/campaigns/dunkirk.json @@ -1,6 +1,7 @@ { "name": "The Channel - Dunkirk", "theater": "The Channel", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/emirates.json b/resources/campaigns/emirates.json index 1e032e63..c923f41c 100644 --- a/resources/campaigns/emirates.json +++ b/resources/campaigns/emirates.json @@ -1,6 +1,7 @@ { "name": "Persian Gulf - Emirates", "theater": "Persian Gulf", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/full_caucasus.json b/resources/campaigns/full_caucasus.json index 9db67f15..bc88c974 100644 --- a/resources/campaigns/full_caucasus.json +++ b/resources/campaigns/full_caucasus.json @@ -1,6 +1,7 @@ { "name": "Caucasus - Full Map", "theater": "Caucasus", + "authors": "george", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/full_map.json b/resources/campaigns/full_map.json index f88963ea..6acfc1ca 100644 --- a/resources/campaigns/full_map.json +++ b/resources/campaigns/full_map.json @@ -1,6 +1,7 @@ { "name": "Syria - Full Map", "theater": "Syria", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/golan_heights_battle.json b/resources/campaigns/golan_heights_battle.json index f498b3bb..a0c7d044 100644 --- a/resources/campaigns/golan_heights_battle.json +++ b/resources/campaigns/golan_heights_battle.json @@ -1,6 +1,7 @@ { "name": "Syria - Golan heights battle", "theater": "Syria", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/inherent_resolve.json b/resources/campaigns/inherent_resolve.json index b968bc77..c8589cff 100644 --- a/resources/campaigns/inherent_resolve.json +++ b/resources/campaigns/inherent_resolve.json @@ -1,6 +1,7 @@ { "name": "Syria - Inherent Resolve", "theater": "Syria", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/invasion_from_turkey.json b/resources/campaigns/invasion_from_turkey.json index de0f6189..bbe9d8eb 100644 --- a/resources/campaigns/invasion_from_turkey.json +++ b/resources/campaigns/invasion_from_turkey.json @@ -1,6 +1,7 @@ { "name": "Syria - Invasion from Turkey", "theater": "Syria", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/invasion_of_iran.json b/resources/campaigns/invasion_of_iran.json index 888d29f5..88c81af6 100644 --- a/resources/campaigns/invasion_of_iran.json +++ b/resources/campaigns/invasion_of_iran.json @@ -1,6 +1,7 @@ { "name": "Persian Gulf - Invasion of Iran", "theater": "Persian Gulf", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/invasion_of_iran_[lite].json b/resources/campaigns/invasion_of_iran_[lite].json index aa31a7fa..4230790b 100644 --- a/resources/campaigns/invasion_of_iran_[lite].json +++ b/resources/campaigns/invasion_of_iran_[lite].json @@ -1,6 +1,7 @@ { "name": "Persian Gulf - Invasion of Iran [Lite]", "theater": "Persian Gulf", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/normandy.json b/resources/campaigns/normandy.json index 8c71716e..f5f24559 100644 --- a/resources/campaigns/normandy.json +++ b/resources/campaigns/normandy.json @@ -1,6 +1,7 @@ { "name": "Normandy - Normandy", "theater": "Normandy", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/normandy_small.json b/resources/campaigns/normandy_small.json index a0bff78e..b2a79346 100644 --- a/resources/campaigns/normandy_small.json +++ b/resources/campaigns/normandy_small.json @@ -1,6 +1,7 @@ { "name": "Normandy - Normandy Small", "theater": "Normandy", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/north_caucasus.json b/resources/campaigns/north_caucasus.json index 0da83e72..163bceb0 100644 --- a/resources/campaigns/north_caucasus.json +++ b/resources/campaigns/north_caucasus.json @@ -1,6 +1,7 @@ { "name": "Caucasus - North Caucasus", "theater": "Caucasus", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/north_nevada.json b/resources/campaigns/north_nevada.json index d1687a7c..d7803b50 100644 --- a/resources/campaigns/north_nevada.json +++ b/resources/campaigns/north_nevada.json @@ -1,6 +1,7 @@ { "name": "Nevada - North Nevada", "theater": "Nevada", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/russia_small.json b/resources/campaigns/russia_small.json index 341d90d0..b5bdafd1 100644 --- a/resources/campaigns/russia_small.json +++ b/resources/campaigns/russia_small.json @@ -1,6 +1,7 @@ { "name": "Caucasus - Russia Small", "theater": "Caucasus", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/syrian_civil_war.json b/resources/campaigns/syrian_civil_war.json index 0f041d39..178caede 100644 --- a/resources/campaigns/syrian_civil_war.json +++ b/resources/campaigns/syrian_civil_war.json @@ -1,6 +1,7 @@ { "name": "Syria - Syrian Civil War", "theater": "Syria", + "authors": "Khopa", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/western_georgia.json b/resources/campaigns/western_georgia.json index b0e64464..cc8f877d 100644 --- a/resources/campaigns/western_georgia.json +++ b/resources/campaigns/western_georgia.json @@ -1,6 +1,7 @@ { "name": "Caucasus - Western Georgia", "theater": "Caucasus", + "authors": "Khopa", "player_points": [ { "type": "airbase", From a0c61bf73a366265dff9ef1fb35a6e39897cff22 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 17:23:09 +0200 Subject: [PATCH 12/29] Authors informations are loaded in Campaign object (to be displayed in UI later) --- qt_ui/windows/newgame/QCampaignList.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt_ui/windows/newgame/QCampaignList.py b/qt_ui/windows/newgame/QCampaignList.py index 5d3de21c..1c3ccf7d 100644 --- a/qt_ui/windows/newgame/QCampaignList.py +++ b/qt_ui/windows/newgame/QCampaignList.py @@ -19,6 +19,7 @@ from theater import ConflictTheater class Campaign: name: str icon_name: str + authors: str theater: ConflictTheater @classmethod @@ -27,7 +28,7 @@ class Campaign: data = json.load(campaign_file) sanitized_theater = data["theater"].replace(" ", "") - return cls(data["name"], f"Terrain_{sanitized_theater}", + return cls(data["name"], f"Terrain_{sanitized_theater}", data.get("authors", "???"), ConflictTheater.from_json(data)) From 4672252242daf8383c0f7f1a5341b3da7ce5f512 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 17:40:04 +0200 Subject: [PATCH 13/29] Added description field to both campaign and faction json file. --- game/factions/japan_2005.py | 71 ---- game/factions/libya_2011.py | 68 ---- game/factions/netherlands_1990.py | 56 --- game/factions/north_korea_2000.py | 79 ---- game/factions/pakistan_2015.py | 60 --- resources/campaigns/battle_of_britain.json | 165 ++++---- resources/campaigns/desert_war.json | 115 +++--- resources/campaigns/dunkirk.json | 147 +++---- resources/campaigns/emirates.json | 205 +++++----- resources/campaigns/full_caucasus.json | 1 + resources/campaigns/full_map.json | 359 +++++++++--------- resources/campaigns/golan_heights_battle.json | 155 ++++---- resources/campaigns/inherent_resolve.json | 157 ++++---- resources/campaigns/invasion_from_turkey.json | 163 ++++---- resources/campaigns/invasion_of_iran.json | 275 +++++++------- .../campaigns/invasion_of_iran_[lite].json | 143 +++---- resources/campaigns/normandy.json | 159 ++++---- resources/campaigns/normandy_small.json | 99 ++--- resources/campaigns/north_caucasus.json | 191 +++++----- resources/campaigns/north_nevada.json | 135 +++---- resources/campaigns/russia_small.json | 69 ++-- resources/campaigns/syrian_civil_war.json | 175 ++++----- resources/campaigns/western_georgia.json | 215 +++++------ resources/factions/australia_2005.json | 2 + resources/factions/bluefor_coldwar.json | 2 + resources/factions/bluefor_coldwar_a4.json | 6 +- .../factions/bluefor_coldwar_a4_mb339.json | 6 +- resources/factions/bluefor_modern.json | 2 + resources/factions/canada_2005.json | 2 + resources/factions/china_2010.json | 2 + resources/factions/france_1995.json | 5 +- resources/factions/france_2005_modded.json | 2 + resources/factions/germany_1942.json | 5 +- resources/factions/germany_1944.json | 9 +- resources/factions/germany_1990.json | 2 + resources/factions/india_2010.json | 5 +- resources/factions/insurgents.json | 2 + resources/factions/insurgents_modded.json | 7 +- resources/factions/iran_2015.json | 6 +- resources/factions/israel_1948.json | 2 + resources/factions/israel_1973.json | 6 +- resources/factions/israel_1982.json | 4 +- resources/factions/israel_2000.json | 2 + resources/factions/italy_1990.json | 2 + resources/factions/italy_1990_mb339.json | 2 + resources/factions/japan_2005.json | 2 + resources/factions/libya_2011.json | 129 ++++--- resources/factions/netherlands_1990.json | 55 +++ resources/factions/north_korea_2000.json | 72 ++++ resources/factions/pakistan_2015.json | 69 ++++ resources/factions/russia_1990.json | 2 + resources/factions/russia_2010.json | 2 + resources/factions/russia_2020.json | 2 + resources/factions/usa_1990.json | 4 +- resources/factions/usa_2005.json | 2 + 55 files changed, 1815 insertions(+), 1869 deletions(-) delete mode 100644 game/factions/japan_2005.py delete mode 100644 game/factions/libya_2011.py delete mode 100644 game/factions/netherlands_1990.py delete mode 100644 game/factions/north_korea_2000.py delete mode 100644 game/factions/pakistan_2015.py create mode 100644 resources/factions/netherlands_1990.json create mode 100644 resources/factions/north_korea_2000.json create mode 100644 resources/factions/pakistan_2015.json diff --git a/game/factions/japan_2005.py b/game/factions/japan_2005.py deleted file mode 100644 index 5201d8d3..00000000 --- a/game/factions/japan_2005.py +++ /dev/null @@ -1,71 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - AH_64D, -) -from dcs.planes import ( - C_130, - E_3A, - F_15C, - F_16C_50, - F_4E, - KC130, - KC_135, -) -from dcs.ships import LHA_1_Tarawa, Ticonderoga_class, USS_Arleigh_Burke_IIa -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -Japan_2005 = { - "country": "Japan", - "side": "blue", - "units": [ - F_15C, # F-15J/DJ - F_16C_50, # F-2A/B - F_4E, # F-4EJ - - KC_135, - KC130, - C_130, - E_3A, - - AH_1W, - AH_64D, - - Armor.MBT_Merkava_Mk__4, # Standing as Type 10 MBT - Armor.MBT_M1A2_Abrams, # Standing as Type 90 MBT - Armor.IFV_Marder, # Standing as Type 89 IFV - Armor.TPz_Fuchs, # Standing as Type 96 APC - Armor.IFV_LAV_25, # Standing as Type 16 or Type 87 - Armor.APC_M1043_HMMWV_Armament, - - Artillery.MLRS_M270, - Artillery.SPH_M109_Paladin, # Standing as Type 99 SPH - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Patriot_EPP_III, - - LHA_1_Tarawa, - ], "shorad": [ - AirDefence.SPAAA_Gepard, # Type 87 SPAG - ], "helicopter_carrier": [ - LHA_1_Tarawa, # Standing as Hyuga-class helicopter carrier - ], "destroyer": [ - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "helicopter_carrier_names": [ - "Hyuga", - "Ise", - ], "boat":[ - "ArleighBurkeGroupGenerator" - ], "has_jtac": True -} diff --git a/game/factions/libya_2011.py b/game/factions/libya_2011.py deleted file mode 100644 index 4de5b42c..00000000 --- a/game/factions/libya_2011.py +++ /dev/null @@ -1,68 +0,0 @@ -from dcs.helicopters import ( - Mi_24V, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - MiG_21Bis, - MiG_23MLD, - Su_17M4, - Su_24M, - Yak_40, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -Libya_2011 = { - "country": "Libya", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_23MLD, - Su_24M, - Su_17M4, - Mi_24V, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - A_50, - - AirDefence.SAM_SA_8_Osa_9A33, - AirDefence.SAM_SA_2_LN_SM_90, - AirDefence.SAM_SA_3_S_125_LN_5P73, - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.HQ_7_Self_Propelled_LN, - - Armor.IFV_BMP_1, - Armor.FDDM_Grad, - Armor.ARV_BRDM_2, - Armor.MBT_T_55, - Armor.MBT_T_72B, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Paratrooper_RPG_16, - Infantry.Infantry_Soldier_Insurgents - - ], - "shorad":[ - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.SAM_SA_8_Osa_9A33, - ], "boat": [ - "GrishaGroupGenerator", "MolniyaGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/netherlands_1990.py b/game/factions/netherlands_1990.py deleted file mode 100644 index 48c916bd..00000000 --- a/game/factions/netherlands_1990.py +++ /dev/null @@ -1,56 +0,0 @@ -from dcs.helicopters import ( - AH_64A, -) -from dcs.planes import ( - C_130, - E_3A, - F_16C_50, - F_5E_3, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Netherlands_1990 = { - "country": "The Netherlands", - "side": "blue", - "units": [ - F_16C_50, - F_5E_3, - - KC_135, - KC130, - C_130, - E_3A, - - AH_64A, - - Armor.APC_M113, - Armor.MBT_Leopard_1A3, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Avenger_M1097, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], - "shorad": [ - AirDefence.SAM_Avenger_M1097 - ], "boat": [ - "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} diff --git a/game/factions/north_korea_2000.py b/game/factions/north_korea_2000.py deleted file mode 100644 index 15d1f587..00000000 --- a/game/factions/north_korea_2000.py +++ /dev/null @@ -1,79 +0,0 @@ -from dcs.helicopters import ( - Mi_24V, - Mi_8MT, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - MiG_15bis, - MiG_19P, - MiG_21Bis, - MiG_23MLD, - MiG_29A, - Su_25, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -NorthKorea_2000 = { - "country": "North Korea", - "side": "red", - "units":[ - MiG_29A, - Su_25, - MiG_15bis, - MiG_21Bis, - MiG_23MLD, - MiG_19P, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - A_50, - - Mi_8MT, - Mi_24V, - - Armor.MBT_T_55, - Armor.MBT_T_72B, - Armor.MBT_T_80U, - Armor.IFV_BMP_1, - Armor.APC_BTR_80, - Armor.ARV_BRDM_2, - - Unarmed.Transport_M818, - Infantry.Soldier_AK, - - AirDefence.SAM_SA_2_LN_SM_90, - AirDefence.SAM_SA_3_S_125_LN_5P73, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160 - ], - "shorad":[ - AirDefence.AAA_ZU_23_Emplacement, - AirDefence.SPAAA_ZSU_23_4_Shilka - ], - "boat": [ - "GrishaGroupGenerator", "MolniyaGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/pakistan_2015.py b/game/factions/pakistan_2015.py deleted file mode 100644 index 8d7c6190..00000000 --- a/game/factions/pakistan_2015.py +++ /dev/null @@ -1,60 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - UH_1H, -) -from dcs.planes import ( - E_3A, - F_16C_50, - IL_78M, - JF_17, - MiG_19P, - MiG_21Bis, - WingLoong_I, -) -from dcs.ships import ( - Armed_speedboat, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Pakistan_2015 = { - "country": "Pakistan", - "side": "blue", - "units": [ - JF_17, - F_16C_50, - MiG_21Bis, # Standing as J-7 - MiG_19P, # Standing as J-6 - IL_78M, - E_3A, - - UH_1H, - AH_1W, - - Armor.MBT_T_80U, - Armor.MBT_T_55, # Standing as Al-Zarrar / Type 59 MBT - Armor.ZBD_04A, - Armor.APC_BTR_80, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_SA_2_LN_SM_90, # Standing as HQ-2 - AirDefence.SAM_SA_10_S_300PS_LN_5P85C, # Standing as HQ-9 - - Armed_speedboat, - ], "shorad": [ - AirDefence.HQ_7_Self_Propelled_LN, - AirDefence.AAA_ZU_23_Insurgent_on_Ural_375, - AirDefence.AAA_ZU_23_Closed - ], "boat": [ - "Type54GroupGenerator", "OliverHazardPerryGroupGenerator" - ], - "has_jtac": True, - "jtac_unit": WingLoong_I -} diff --git a/resources/campaigns/battle_of_britain.json b/resources/campaigns/battle_of_britain.json index 28811e44..281e2db3 100644 --- a/resources/campaigns/battle_of_britain.json +++ b/resources/campaigns/battle_of_britain.json @@ -1,87 +1,88 @@ { - "name": "The Channel - Battle of Britain", - "theater": "The Channel", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Hawkinge", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Lympne", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Manston", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "High Halden", - "size": 600, - "importance": 1 - } + "name": "The Channel - Battle of Britain", + "theater": "The Channel", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Hawkinge", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Lympne", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Manston", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "High Halden", + "size": 600, + "importance": 1 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Dunkirk Mardyck", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Saint Omer Longuenesse", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Merville Calonne", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Abbeville Drucat", + "size": 600, + "importance": 1, + "captured_invert": true + } + ], + "links": [ + [ + "Hawkinge", + "Lympne" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Dunkirk Mardyck", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Saint Omer Longuenesse", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Merville Calonne", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Abbeville Drucat", - "size": 600, - "importance": 1, - "captured_invert": true - } + [ + "Hawkinge", + "Manston" ], - "links": [ - [ - "Hawkinge", - "Lympne" - ], - [ - "Hawkinge", - "Manston" - ], - [ - "High Halden", - "Lympne" - ], - [ - "Dunkirk Mardyck", - "Saint Omer Longuenesse" - ], - [ - "Merville Calonne", - "Saint Omer Longuenesse" - ], - [ - "Abbeville Drucat", - "Saint Omer Longuenesse" - ] + [ + "High Halden", + "Lympne" + ], + [ + "Dunkirk Mardyck", + "Saint Omer Longuenesse" + ], + [ + "Merville Calonne", + "Saint Omer Longuenesse" + ], + [ + "Abbeville Drucat", + "Saint Omer Longuenesse" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/desert_war.json b/resources/campaigns/desert_war.json index eda0bd6c..088ba7b9 100644 --- a/resources/campaigns/desert_war.json +++ b/resources/campaigns/desert_war.json @@ -1,62 +1,63 @@ { - "name": "Persian Gulf - Desert War", - "theater": "Persian Gulf", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Liwa Airbase", - "size": 2000, - "importance": 1.2 - }, - { - "type": "lha", - "id": 1002, - "x": -164000, - "y": -257000, - "captured_invert": true - }, - { - "type": "carrier", - "id": 1001, - "x": -124000, - "y": -303000, - "captured_invert": true - } + "name": "Persian Gulf - Desert War", + "theater": "Persian Gulf", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Liwa Airbase", + "size": 2000, + "importance": 1.2 + }, + { + "type": "lha", + "id": 1002, + "x": -164000, + "y": -257000, + "captured_invert": true + }, + { + "type": "carrier", + "id": 1001, + "x": -124000, + "y": -303000, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Al Ain International Airport", + "size": 2000, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Al Maktoum Intl", + "size": 2000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Al Minhad AB", + "size": 1000, + "importance": 1 + } + ], + "links": [ + [ + "Al Ain International Airport", + "Liwa Airbase" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Al Ain International Airport", - "size": 2000, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Al Maktoum Intl", - "size": 2000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Al Minhad AB", - "size": 1000, - "importance": 1 - } + [ + "Al Ain International Airport", + "Al Maktoum Intl" ], - "links": [ - [ - "Al Ain International Airport", - "Liwa Airbase" - ], - [ - "Al Ain International Airport", - "Al Maktoum Intl" - ], - [ - "Al Maktoum Intl", - "Al Minhad AB" - ] + [ + "Al Maktoum Intl", + "Al Minhad AB" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/dunkirk.json b/resources/campaigns/dunkirk.json index 009c0439..a8b6c1ba 100644 --- a/resources/campaigns/dunkirk.json +++ b/resources/campaigns/dunkirk.json @@ -1,78 +1,79 @@ { - "name": "The Channel - Dunkirk", - "theater": "The Channel", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Hawkinge", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Lympne", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Manston", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Dunkirk Mardyck", - "size": 600, - "importance": 1, - "captured_invert": true - } + "name": "The Channel - Dunkirk", + "theater": "The Channel", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Hawkinge", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Lympne", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Manston", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Dunkirk Mardyck", + "size": 600, + "importance": 1, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Saint Omer Longuenesse", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Merville Calonne", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Abbeville Drucat", + "size": 600, + "importance": 1, + "captured_invert": true + } + ], + "links": [ + [ + "Hawkinge", + "Lympne" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Saint Omer Longuenesse", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Merville Calonne", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Abbeville Drucat", - "size": 600, - "importance": 1, - "captured_invert": true - } + [ + "Hawkinge", + "Manston" ], - "links": [ - [ - "Hawkinge", - "Lympne" - ], - [ - "Hawkinge", - "Manston" - ], - [ - "Dunkirk Mardyck", - "Saint Omer Longuenesse" - ], - [ - "Merville Calonne", - "Saint Omer Longuenesse" - ], - [ - "Abbeville Drucat", - "Saint Omer Longuenesse" - ] + [ + "Dunkirk Mardyck", + "Saint Omer Longuenesse" + ], + [ + "Merville Calonne", + "Saint Omer Longuenesse" + ], + [ + "Abbeville Drucat", + "Saint Omer Longuenesse" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/emirates.json b/resources/campaigns/emirates.json index c923f41c..acab6325 100644 --- a/resources/campaigns/emirates.json +++ b/resources/campaigns/emirates.json @@ -1,107 +1,108 @@ { - "name": "Persian Gulf - Emirates", - "theater": "Persian Gulf", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Fujairah Intl", - "radials": [ - 180, - 225, - 270, - 315, - 0 - ], - "size": 1000, - "importance": 1, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": -79770, - "y": 49430, - "captured_invert": true - }, - { - "type": "carrier", - "id": 1001, - "x": -61770, - "y": 69039, - "captured_invert": true - } + "name": "Persian Gulf - Emirates", + "theater": "Persian Gulf", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Fujairah Intl", + "radials": [ + 180, + 225, + 270, + 315, + 0 + ], + "size": 1000, + "importance": 1, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -79770, + "y": 49430, + "captured_invert": true + }, + { + "type": "carrier", + "id": 1001, + "x": -61770, + "y": 69039, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Al Dhafra AB", + "size": 2000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Al Ain International Airport", + "size": 2000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Al Maktoum Intl", + "size": 2000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Al Minhad AB", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Sharjah Intl", + "size": 2000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Ras Al Khaimah", + "size": 1000, + "importance": 1 + } + ], + "links": [ + [ + "Al Ain International Airport", + "Al Dhafra AB" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Al Dhafra AB", - "size": 2000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Al Ain International Airport", - "size": 2000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Al Maktoum Intl", - "size": 2000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Al Minhad AB", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Sharjah Intl", - "size": 2000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Ras Al Khaimah", - "size": 1000, - "importance": 1 - } + [ + "Al Dhafra AB", + "Al Maktoum Intl" ], - "links": [ - [ - "Al Ain International Airport", - "Al Dhafra AB" - ], - [ - "Al Dhafra AB", - "Al Maktoum Intl" - ], - [ - "Al Ain International Airport", - "Fujairah Intl" - ], - [ - "Al Ain International Airport", - "Al Maktoum Intl" - ], - [ - "Al Maktoum Intl", - "Al Minhad AB" - ], - [ - "Al Minhad AB", - "Sharjah Intl" - ], - [ - "Ras Al Khaimah", - "Sharjah Intl" - ], - [ - "Fujairah Intl", - "Sharjah Intl" - ] + [ + "Al Ain International Airport", + "Fujairah Intl" + ], + [ + "Al Ain International Airport", + "Al Maktoum Intl" + ], + [ + "Al Maktoum Intl", + "Al Minhad AB" + ], + [ + "Al Minhad AB", + "Sharjah Intl" + ], + [ + "Ras Al Khaimah", + "Sharjah Intl" + ], + [ + "Fujairah Intl", + "Sharjah Intl" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/full_caucasus.json b/resources/campaigns/full_caucasus.json index bc88c974..a312a999 100644 --- a/resources/campaigns/full_caucasus.json +++ b/resources/campaigns/full_caucasus.json @@ -2,6 +2,7 @@ "name": "Caucasus - Full Map", "theater": "Caucasus", "authors": "george", + "description": "Full Caucasus Map", "player_points": [ { "type": "airbase", diff --git a/resources/campaigns/full_map.json b/resources/campaigns/full_map.json index 6acfc1ca..935fb0f0 100644 --- a/resources/campaigns/full_map.json +++ b/resources/campaigns/full_map.json @@ -1,184 +1,185 @@ { - "name": "Syria - Full Map", - "theater": "Syria", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Ramat David", - "size": 1000, - "importance": 1.4 - }, - { - "type": "carrier", - "id": 1001, - "x": -151000, - "y": -106000, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": -131000, - "y": -161000, - "captured_invert": true - } + "name": "Syria - Full Map", + "theater": "Syria", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Ramat David", + "size": 1000, + "importance": 1.4 + }, + { + "type": "carrier", + "id": 1001, + "x": -151000, + "y": -106000, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -131000, + "y": -161000, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "King Hussein Air College", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Khalkhalah", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Al-Dumayr", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Al Qusayr", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Rene Mouawad", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Hama", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Bassel Al-Assad", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Palmyra", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Tabqa", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Jirah", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Aleppo", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Minakh", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Hatay", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Incirlik", + "size": 1000, + "importance": 1.4, + "captured_invert": true + } + ], + "links": [ + [ + "King Hussein Air College", + "Ramat David" ], - "enemy_points": [ - { - "type": "airbase", - "id": "King Hussein Air College", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Khalkhalah", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Al-Dumayr", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Al Qusayr", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Rene Mouawad", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Hama", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Bassel Al-Assad", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Palmyra", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Tabqa", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Jirah", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Aleppo", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Minakh", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Hatay", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Incirlik", - "size": 1000, - "importance": 1.4, - "captured_invert": true - } + [ + "Khalkhalah", + "King Hussein Air College" ], - "links": [ - [ - "King Hussein Air College", - "Ramat David" - ], - [ - "Khalkhalah", - "King Hussein Air College" - ], - [ - "Al-Dumayr", - "Khalkhalah" - ], - [ - "Al Qusayr", - "Al-Dumayr" - ], - [ - "Al Qusayr", - "Hama" - ], - [ - "Al Qusayr", - "Palmyra" - ], - [ - "Al Qusayr", - "Rene Mouawad" - ], - [ - "Bassel Al-Assad", - "Rene Mouawad" - ], - [ - "Aleppo", - "Hama" - ], - [ - "Bassel Al-Assad", - "Hama" - ], - [ - "Bassel Al-Assad", - "Hatay" - ], - [ - "Palmyra", - "Tabqa" - ], - [ - "Jirah", - "Tabqa" - ], - [ - "Aleppo", - "Jirah" - ], - [ - "Aleppo", - "Minakh" - ], - [ - "Hatay", - "Minakh" - ], - [ - "Incirlik", - "Minakh" - ] + [ + "Al-Dumayr", + "Khalkhalah" + ], + [ + "Al Qusayr", + "Al-Dumayr" + ], + [ + "Al Qusayr", + "Hama" + ], + [ + "Al Qusayr", + "Palmyra" + ], + [ + "Al Qusayr", + "Rene Mouawad" + ], + [ + "Bassel Al-Assad", + "Rene Mouawad" + ], + [ + "Aleppo", + "Hama" + ], + [ + "Bassel Al-Assad", + "Hama" + ], + [ + "Bassel Al-Assad", + "Hatay" + ], + [ + "Palmyra", + "Tabqa" + ], + [ + "Jirah", + "Tabqa" + ], + [ + "Aleppo", + "Jirah" + ], + [ + "Aleppo", + "Minakh" + ], + [ + "Hatay", + "Minakh" + ], + [ + "Incirlik", + "Minakh" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/golan_heights_battle.json b/resources/campaigns/golan_heights_battle.json index a0c7d044..978e38eb 100644 --- a/resources/campaigns/golan_heights_battle.json +++ b/resources/campaigns/golan_heights_battle.json @@ -1,82 +1,83 @@ { - "name": "Syria - Golan heights battle", - "theater": "Syria", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Ramat David", - "size": 1000, - "importance": 1.4 - }, - { - "type": "carrier", - "id": 1001, - "x": -280000, - "y": -238000, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": -237000, - "y": -89800, - "captured_invert": true - } + "name": "Syria - Golan heights battle", + "theater": "Syria", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Ramat David", + "size": 1000, + "importance": 1.4 + }, + { + "type": "carrier", + "id": 1001, + "x": -280000, + "y": -238000, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -237000, + "y": -89800, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Khalkhalah", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "King Hussein Air College", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Marj Ruhayyil", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Mezzeh", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Al-Dumayr", + "size": 1000, + "importance": 1.2, + "captured_invert": true + } + ], + "links": [ + [ + "Khalkhalah", + "Ramat David" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Khalkhalah", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "King Hussein Air College", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Marj Ruhayyil", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Mezzeh", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Al-Dumayr", - "size": 1000, - "importance": 1.2, - "captured_invert": true - } + [ + "Khalkhalah", + "King Hussein Air College" ], - "links": [ - [ - "Khalkhalah", - "Ramat David" - ], - [ - "Khalkhalah", - "King Hussein Air College" - ], - [ - "Khalkhalah", - "Marj Ruhayyil" - ], - [ - "Marj Ruhayyil", - "Mezzeh" - ], - [ - "Al-Dumayr", - "Marj Ruhayyil" - ] + [ + "Khalkhalah", + "Marj Ruhayyil" + ], + [ + "Marj Ruhayyil", + "Mezzeh" + ], + [ + "Al-Dumayr", + "Marj Ruhayyil" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/inherent_resolve.json b/resources/campaigns/inherent_resolve.json index c8589cff..7c178920 100644 --- a/resources/campaigns/inherent_resolve.json +++ b/resources/campaigns/inherent_resolve.json @@ -1,83 +1,84 @@ { - "name": "Syria - Inherent Resolve", - "theater": "Syria", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "King Hussein Air College", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Incirlik", - "size": 1000, - "importance": 1.4, - "captured_invert": true - }, - { - "type": "carrier", - "id": 1001, - "x": -210000, - "y": -200000, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": -131000, - "y": -161000, - "captured_invert": true - } + "name": "Syria - Inherent Resolve", + "theater": "Syria", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "King Hussein Air College", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Incirlik", + "size": 1000, + "importance": 1.4, + "captured_invert": true + }, + { + "type": "carrier", + "id": 1001, + "x": -210000, + "y": -200000, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -131000, + "y": -161000, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Khalkhalah", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Palmyra", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Tabqa", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Jirah", + "size": 1000, + "importance": 1, + "captured_invert": true + } + ], + "links": [ + [ + "Khalkhalah", + "King Hussein Air College" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Khalkhalah", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Palmyra", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Tabqa", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Jirah", - "size": 1000, - "importance": 1, - "captured_invert": true - } + [ + "Incirlik", + "Incirlik" ], - "links": [ - [ - "Khalkhalah", - "King Hussein Air College" - ], - [ - "Incirlik", - "Incirlik" - ], - [ - "Khalkhalah", - "Palmyra" - ], - [ - "Palmyra", - "Tabqa" - ], - [ - "Jirah", - "Tabqa" - ] + [ + "Khalkhalah", + "Palmyra" + ], + [ + "Palmyra", + "Tabqa" + ], + [ + "Jirah", + "Tabqa" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/invasion_from_turkey.json b/resources/campaigns/invasion_from_turkey.json index bbe9d8eb..7473d5d4 100644 --- a/resources/campaigns/invasion_from_turkey.json +++ b/resources/campaigns/invasion_from_turkey.json @@ -1,86 +1,87 @@ { - "name": "Syria - Invasion from Turkey", - "theater": "Syria", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Incirlik", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Hatay", - "size": 1000, - "importance": 1.4 - }, - { - "type": "carrier", - "id": 1001, - "x": 133000, - "y": -54000 - }, - { - "type": "lha", - "id": 1002, - "x": 155000, - "y": -19000 - } + "name": "Syria - Invasion from Turkey", + "theater": "Syria", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Incirlik", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Hatay", + "size": 1000, + "importance": 1.4 + }, + { + "type": "carrier", + "id": 1001, + "x": 133000, + "y": -54000 + }, + { + "type": "lha", + "id": 1002, + "x": 155000, + "y": -19000 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Minakh", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Aleppo", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Kuweires", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Jirah", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Tabqa", + "size": 1000, + "importance": 1, + "captured_invert": true + } + ], + "links": [ + [ + "Hatay", + "Minakh" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Minakh", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Aleppo", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Kuweires", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Jirah", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Tabqa", - "size": 1000, - "importance": 1, - "captured_invert": true - } + [ + "Aleppo", + "Minakh" ], - "links": [ - [ - "Hatay", - "Minakh" - ], - [ - "Aleppo", - "Minakh" - ], - [ - "Aleppo", - "Kuweires" - ], - [ - "Jirah", - "Kuweires" - ], - [ - "Jirah", - "Tabqa" - ] + [ + "Aleppo", + "Kuweires" + ], + [ + "Jirah", + "Kuweires" + ], + [ + "Jirah", + "Tabqa" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/invasion_of_iran.json b/resources/campaigns/invasion_of_iran.json index 88c81af6..727e2543 100644 --- a/resources/campaigns/invasion_of_iran.json +++ b/resources/campaigns/invasion_of_iran.json @@ -1,142 +1,143 @@ { - "name": "Persian Gulf - Invasion of Iran", - "theater": "Persian Gulf", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Ras Al Khaimah", - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Khasab", - "size": 600, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Qeshm Island", - "radials": [ - 270, - 315, - 0, - 45, - 90, - 135, - 180 - ], - "size": 600, - "importance": 1.1 - }, - { - "type": "airbase", - "id": "Havadarya", - "radials": [ - 225, - 270, - 315, - 0, - 45 - ], - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Bandar Abbas Intl", - "size": 2000, - "importance": 1.4 - }, - { - "type": "carrier", - "id": 1001, - "x": 59514.324335475, - "y": 28165.517980635 - }, - { - "type": "lha", - "id": 1002, - "x": -27500.813952358, - "y": -147000.65947136 - } + "name": "Persian Gulf - Invasion of Iran", + "theater": "Persian Gulf", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Ras Al Khaimah", + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Khasab", + "size": 600, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Qeshm Island", + "radials": [ + 270, + 315, + 0, + 45, + 90, + 135, + 180 + ], + "size": 600, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Havadarya", + "radials": [ + 225, + 270, + 315, + 0, + 45 + ], + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Bandar Abbas Intl", + "size": 2000, + "importance": 1.4 + }, + { + "type": "carrier", + "id": 1001, + "x": 59514.324335475, + "y": 28165.517980635 + }, + { + "type": "lha", + "id": 1002, + "x": -27500.813952358, + "y": -147000.65947136 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Bandar Lengeh", + "radials": [ + 270, + 315, + 0, + 45 + ], + "size": 600, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Shiraz International Airport", + "size": 2000, + "importance": 1.4, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Jiroft Airport", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Kerman Airport", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Lar Airbase", + "size": 1000, + "importance": 1.4 + } + ], + "links": [ + [ + "Khasab", + "Ras Al Khaimah" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Bandar Lengeh", - "radials": [ - 270, - 315, - 0, - 45 - ], - "size": 600, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Shiraz International Airport", - "size": 2000, - "importance": 1.4, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Jiroft Airport", - "size": 2000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Kerman Airport", - "size": 2000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Lar Airbase", - "size": 1000, - "importance": 1.4 - } + [ + "Bandar Lengeh", + "Lar Airbase" ], - "links": [ - [ - "Khasab", - "Ras Al Khaimah" - ], - [ - "Bandar Lengeh", - "Lar Airbase" - ], - [ - "Havadarya", - "Lar Airbase" - ], - [ - "Bandar Abbas Intl", - "Havadarya" - ], - [ - "Bandar Abbas Intl", - "Jiroft Airport" - ], - [ - "Lar Airbase", - "Shiraz International Airport" - ], - [ - "Kerman Airport", - "Shiraz International Airport" - ], - [ - "Jiroft Airport", - "Kerman Airport" - ], - [ - "Kerman Airport", - "Lar Airbase" - ] + [ + "Havadarya", + "Lar Airbase" + ], + [ + "Bandar Abbas Intl", + "Havadarya" + ], + [ + "Bandar Abbas Intl", + "Jiroft Airport" + ], + [ + "Lar Airbase", + "Shiraz International Airport" + ], + [ + "Kerman Airport", + "Shiraz International Airport" + ], + [ + "Jiroft Airport", + "Kerman Airport" + ], + [ + "Kerman Airport", + "Lar Airbase" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/invasion_of_iran_[lite].json b/resources/campaigns/invasion_of_iran_[lite].json index 4230790b..2ac59c3b 100644 --- a/resources/campaigns/invasion_of_iran_[lite].json +++ b/resources/campaigns/invasion_of_iran_[lite].json @@ -1,76 +1,77 @@ { - "name": "Persian Gulf - Invasion of Iran [Lite]", - "theater": "Persian Gulf", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Bandar Lengeh", - "radials": [ - 270, - 315, - 0, - 45 - ], - "size": 600, - "importance": 1.4 - }, - { - "type": "carrier", - "id": 1001, - "x": 72000.324335475, - "y": -376000 - }, - { - "type": "lha", - "id": 1002, - "x": -27500.813952358, - "y": -147000.65947136 - } + "name": "Persian Gulf - Invasion of Iran [Lite]", + "theater": "Persian Gulf", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Bandar Lengeh", + "radials": [ + 270, + 315, + 0, + 45 + ], + "size": 600, + "importance": 1.4 + }, + { + "type": "carrier", + "id": 1001, + "x": 72000.324335475, + "y": -376000 + }, + { + "type": "lha", + "id": 1002, + "x": -27500.813952358, + "y": -147000.65947136 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Shiraz International Airport", + "size": 2000, + "importance": 1.4, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Jiroft Airport", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Kerman Airport", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Lar Airbase", + "size": 1000, + "importance": 1.4 + } + ], + "links": [ + [ + "Bandar Lengeh", + "Lar Airbase" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Shiraz International Airport", - "size": 2000, - "importance": 1.4, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Jiroft Airport", - "size": 2000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Kerman Airport", - "size": 2000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Lar Airbase", - "size": 1000, - "importance": 1.4 - } + [ + "Lar Airbase", + "Shiraz International Airport" ], - "links": [ - [ - "Bandar Lengeh", - "Lar Airbase" - ], - [ - "Lar Airbase", - "Shiraz International Airport" - ], - [ - "Kerman Airport", - "Shiraz International Airport" - ], - [ - "Jiroft Airport", - "Kerman Airport" - ] + [ + "Kerman Airport", + "Shiraz International Airport" + ], + [ + "Jiroft Airport", + "Kerman Airport" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/normandy.json b/resources/campaigns/normandy.json index f5f24559..f74554bc 100644 --- a/resources/campaigns/normandy.json +++ b/resources/campaigns/normandy.json @@ -1,84 +1,85 @@ { - "name": "Normandy - Normandy", - "theater": "Normandy", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Chailey", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Needs Oar Point", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Deux Jumeaux", - "size": 600, - "importance": 1 - } + "name": "Normandy - Normandy", + "theater": "Normandy", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Chailey", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Needs Oar Point", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Deux Jumeaux", + "size": 600, + "importance": 1 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Lignerolles", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Lessay", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Carpiquet", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Maupertus", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Evreux", + "size": 600, + "importance": 1, + "captured_invert": true + } + ], + "links": [ + [ + "Chailey", + "Needs Oar Point" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Lignerolles", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Lessay", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Carpiquet", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Maupertus", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Evreux", - "size": 600, - "importance": 1, - "captured_invert": true - } + [ + "Deux Jumeaux", + "Lignerolles" ], - "links": [ - [ - "Chailey", - "Needs Oar Point" - ], - [ - "Deux Jumeaux", - "Lignerolles" - ], - [ - "Lessay", - "Lignerolles" - ], - [ - "Carpiquet", - "Lignerolles" - ], - [ - "Lessay", - "Maupertus" - ], - [ - "Carpiquet", - "Evreux" - ] + [ + "Lessay", + "Lignerolles" + ], + [ + "Carpiquet", + "Lignerolles" + ], + [ + "Lessay", + "Maupertus" + ], + [ + "Carpiquet", + "Evreux" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/normandy_small.json b/resources/campaigns/normandy_small.json index b2a79346..a38529a5 100644 --- a/resources/campaigns/normandy_small.json +++ b/resources/campaigns/normandy_small.json @@ -1,54 +1,55 @@ { - "name": "Normandy - Normandy Small", - "theater": "Normandy", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Needs Oar Point", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Deux Jumeaux", - "size": 600, - "importance": 1 - } + "name": "Normandy - Normandy Small", + "theater": "Normandy", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Needs Oar Point", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Deux Jumeaux", + "size": 600, + "importance": 1 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Lignerolles", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Carpiquet", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Evreux", + "size": 600, + "importance": 1, + "captured_invert": true + } + ], + "links": [ + [ + "Deux Jumeaux", + "Lignerolles" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Lignerolles", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Carpiquet", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Evreux", - "size": 600, - "importance": 1, - "captured_invert": true - } + [ + "Carpiquet", + "Lignerolles" ], - "links": [ - [ - "Deux Jumeaux", - "Lignerolles" - ], - [ - "Carpiquet", - "Lignerolles" - ], - [ - "Carpiquet", - "Evreux" - ] + [ + "Carpiquet", + "Evreux" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/north_caucasus.json b/resources/campaigns/north_caucasus.json index 163bceb0..bebb5efb 100644 --- a/resources/campaigns/north_caucasus.json +++ b/resources/campaigns/north_caucasus.json @@ -1,100 +1,101 @@ { - "name": "Caucasus - North Caucasus", - "theater": "Caucasus", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Kutaisi", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Vaziani", - "size": 600, - "importance": 1 - }, - { - "type": "carrier", - "id": 1001, - "x": -285810.6875, - "y": 496399.1875, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": -326050.6875, - "y": 519452.1875, - "captured_invert": true - } + "name": "Caucasus - North Caucasus", + "theater": "Caucasus", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Kutaisi", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Vaziani", + "size": 600, + "importance": 1 + }, + { + "type": "carrier", + "id": 1001, + "x": -285810.6875, + "y": 496399.1875, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -326050.6875, + "y": 519452.1875, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Beslan", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Nalchik", + "size": 1000, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Mozdok", + "size": 2000, + "importance": 1.1 + }, + { + "type": "airbase", + "id": "Mineralnye Vody", + "size": 2000, + "importance": 1.3 + }, + { + "type": "airbase", + "id": "Maykop-Khanskaya", + "size": 3000, + "importance": 1.4, + "captured_invert": true + } + ], + "links": [ + [ + "Kutaisi", + "Vaziani" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Beslan", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Nalchik", - "size": 1000, - "importance": 1.1 - }, - { - "type": "airbase", - "id": "Mozdok", - "size": 2000, - "importance": 1.1 - }, - { - "type": "airbase", - "id": "Mineralnye Vody", - "size": 2000, - "importance": 1.3 - }, - { - "type": "airbase", - "id": "Maykop-Khanskaya", - "size": 3000, - "importance": 1.4, - "captured_invert": true - } + [ + "Beslan", + "Vaziani" ], - "links": [ - [ - "Kutaisi", - "Vaziani" - ], - [ - "Beslan", - "Vaziani" - ], - [ - "Beslan", - "Mozdok" - ], - [ - "Beslan", - "Nalchik" - ], - [ - "Mozdok", - "Nalchik" - ], - [ - "Mineralnye Vody", - "Nalchik" - ], - [ - "Mineralnye Vody", - "Mozdok" - ], - [ - "Maykop-Khanskaya", - "Mineralnye Vody" - ] + [ + "Beslan", + "Mozdok" + ], + [ + "Beslan", + "Nalchik" + ], + [ + "Mozdok", + "Nalchik" + ], + [ + "Mineralnye Vody", + "Nalchik" + ], + [ + "Mineralnye Vody", + "Mozdok" + ], + [ + "Maykop-Khanskaya", + "Mineralnye Vody" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/north_nevada.json b/resources/campaigns/north_nevada.json index d7803b50..dc0a2a71 100644 --- a/resources/campaigns/north_nevada.json +++ b/resources/campaigns/north_nevada.json @@ -1,72 +1,73 @@ { - "name": "Nevada - North Nevada", - "theater": "Nevada", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Nellis AFB", - "size": 2000, - "importance": 1.4 - } + "name": "Nevada - North Nevada", + "theater": "Nevada", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Nellis AFB", + "size": 2000, + "importance": 1.4 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Tonopah Test Range Airfield", + "size": 600, + "importance": 1, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Lincoln County", + "size": 600, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Groom Lake AFB", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Creech AFB", + "size": 2000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Mesquite", + "size": 1000, + "importance": 1.3 + } + ], + "links": [ + [ + "Lincoln County", + "Tonopah Test Range Airfield" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Tonopah Test Range Airfield", - "size": 600, - "importance": 1, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Lincoln County", - "size": 600, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Groom Lake AFB", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Creech AFB", - "size": 2000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Mesquite", - "size": 1000, - "importance": 1.3 - } + [ + "Groom Lake AFB", + "Tonopah Test Range Airfield" ], - "links": [ - [ - "Lincoln County", - "Tonopah Test Range Airfield" - ], - [ - "Groom Lake AFB", - "Tonopah Test Range Airfield" - ], - [ - "Lincoln County", - "Mesquite" - ], - [ - "Groom Lake AFB", - "Mesquite" - ], - [ - "Creech AFB", - "Groom Lake AFB" - ], - [ - "Creech AFB", - "Nellis AFB" - ] + [ + "Lincoln County", + "Mesquite" + ], + [ + "Groom Lake AFB", + "Mesquite" + ], + [ + "Creech AFB", + "Groom Lake AFB" + ], + [ + "Creech AFB", + "Nellis AFB" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/russia_small.json b/resources/campaigns/russia_small.json index b5bdafd1..022aa893 100644 --- a/resources/campaigns/russia_small.json +++ b/resources/campaigns/russia_small.json @@ -1,38 +1,39 @@ { - "name": "Caucasus - Russia Small", - "theater": "Caucasus", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Mozdok", - "size": 2000, - "importance": 1.1 - } + "name": "Caucasus - Russia Small", + "theater": "Caucasus", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Mozdok", + "size": 2000, + "importance": 1.1 + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Mineralnye Vody", + "size": 2000, + "importance": 1.3 + }, + { + "type": "airbase", + "id": "Maykop-Khanskaya", + "size": 3000, + "importance": 1.4, + "captured_invert": true + } + ], + "links": [ + [ + "Mineralnye Vody", + "Mozdok" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Mineralnye Vody", - "size": 2000, - "importance": 1.3 - }, - { - "type": "airbase", - "id": "Maykop-Khanskaya", - "size": 3000, - "importance": 1.4, - "captured_invert": true - } - ], - "links": [ - [ - "Mineralnye Vody", - "Mozdok" - ], - [ - "Maykop-Khanskaya", - "Mineralnye Vody" - ] + [ + "Maykop-Khanskaya", + "Mineralnye Vody" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/syrian_civil_war.json b/resources/campaigns/syrian_civil_war.json index 178caede..233e1734 100644 --- a/resources/campaigns/syrian_civil_war.json +++ b/resources/campaigns/syrian_civil_war.json @@ -1,92 +1,93 @@ { - "name": "Syria - Syrian Civil War", - "theater": "Syria", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Bassel Al-Assad", - "size": 1000, - "importance": 1.4 - }, - { - "type": "airbase", - "id": "Marj Ruhayyil", - "size": 1000, - "importance": 1 - }, - { - "type": "carrier", - "id": 1001, - "x": 18537, - "y": -52000, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": 116000, - "y": -30000, - "captured_invert": true - } + "name": "Syria - Syrian Civil War", + "theater": "Syria", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Bassel Al-Assad", + "size": 1000, + "importance": 1.4 + }, + { + "type": "airbase", + "id": "Marj Ruhayyil", + "size": 1000, + "importance": 1 + }, + { + "type": "carrier", + "id": 1001, + "x": 18537, + "y": -52000, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": 116000, + "y": -30000, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Hama", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Aleppo", + "size": 1000, + "importance": 1.2, + "captured_invert": true + }, + { + "type": "airbase", + "id": "Al Qusayr", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Palmyra", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Al-Dumayr", + "size": 1000, + "importance": 1.2 + } + ], + "links": [ + [ + "Bassel Al-Assad", + "Hama" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Hama", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Aleppo", - "size": 1000, - "importance": 1.2, - "captured_invert": true - }, - { - "type": "airbase", - "id": "Al Qusayr", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Palmyra", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Al-Dumayr", - "size": 1000, - "importance": 1.2 - } + [ + "Al-Dumayr", + "Marj Ruhayyil" ], - "links": [ - [ - "Bassel Al-Assad", - "Hama" - ], - [ - "Al-Dumayr", - "Marj Ruhayyil" - ], - [ - "Aleppo", - "Hama" - ], - [ - "Al Qusayr", - "Hama" - ], - [ - "Al Qusayr", - "Al-Dumayr" - ], - [ - "Al Qusayr", - "Palmyra" - ] + [ + "Aleppo", + "Hama" + ], + [ + "Al Qusayr", + "Hama" + ], + [ + "Al Qusayr", + "Al-Dumayr" + ], + [ + "Al Qusayr", + "Palmyra" ] + ] } \ No newline at end of file diff --git a/resources/campaigns/western_georgia.json b/resources/campaigns/western_georgia.json index cc8f877d..e111d236 100644 --- a/resources/campaigns/western_georgia.json +++ b/resources/campaigns/western_georgia.json @@ -1,112 +1,113 @@ { - "name": "Caucasus - Western Georgia", - "theater": "Caucasus", - "authors": "Khopa", - "player_points": [ - { - "type": "airbase", - "id": "Kobuleti", - "radials": [ - 0, - 45, - 90, - 135, - 180, - 225, - 315 - ], - "size": 600, - "importance": 1.1 - }, - { - "type": "carrier", - "id": 1001, - "x": -285810.6875, - "y": 496399.1875, - "captured_invert": true - }, - { - "type": "lha", - "id": 1002, - "x": -326050.6875, - "y": 519452.1875, - "captured_invert": true - } + "name": "Caucasus - Western Georgia", + "theater": "Caucasus", + "authors": "Khopa", + "description": "", + "player_points": [ + { + "type": "airbase", + "id": "Kobuleti", + "radials": [ + 0, + 45, + 90, + 135, + 180, + 225, + 315 + ], + "size": 600, + "importance": 1.1 + }, + { + "type": "carrier", + "id": 1001, + "x": -285810.6875, + "y": 496399.1875, + "captured_invert": true + }, + { + "type": "lha", + "id": 1002, + "x": -326050.6875, + "y": 519452.1875, + "captured_invert": true + } + ], + "enemy_points": [ + { + "type": "airbase", + "id": "Kutaisi", + "size": 600, + "importance": 1 + }, + { + "type": "airbase", + "id": "Senaki-Kolkhi", + "size": 1000, + "importance": 1 + }, + { + "type": "airbase", + "id": "Sukhumi-Babushara", + "radials": [ + 315, + 0, + 45, + 90, + 135 + ], + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Gudauta", + "radials": [ + 315, + 0, + 45, + 90, + 135 + ], + "size": 1000, + "importance": 1.2 + }, + { + "type": "airbase", + "id": "Sochi-Adler", + "radials": [ + 315, + 0, + 45, + 90, + 135 + ], + "size": 2000, + "importance": 1.4, + "captured_invert": true + } + ], + "links": [ + [ + "Kutaisi", + "Senaki-Kolkhi" ], - "enemy_points": [ - { - "type": "airbase", - "id": "Kutaisi", - "size": 600, - "importance": 1 - }, - { - "type": "airbase", - "id": "Senaki-Kolkhi", - "size": 1000, - "importance": 1 - }, - { - "type": "airbase", - "id": "Sukhumi-Babushara", - "radials": [ - 315, - 0, - 45, - 90, - 135 - ], - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Gudauta", - "radials": [ - 315, - 0, - 45, - 90, - 135 - ], - "size": 1000, - "importance": 1.2 - }, - { - "type": "airbase", - "id": "Sochi-Adler", - "radials": [ - 315, - 0, - 45, - 90, - 135 - ], - "size": 2000, - "importance": 1.4, - "captured_invert": true - } + [ + "Kobuleti", + "Senaki-Kolkhi" ], - "links": [ - [ - "Kutaisi", - "Senaki-Kolkhi" - ], - [ - "Kobuleti", - "Senaki-Kolkhi" - ], - [ - "Senaki-Kolkhi", - "Sukhumi-Babushara" - ], - [ - "Gudauta", - "Sukhumi-Babushara" - ], - [ - "Gudauta", - "Sochi-Adler" - ] + [ + "Senaki-Kolkhi", + "Sukhumi-Babushara" + ], + [ + "Gudauta", + "Sukhumi-Babushara" + ], + [ + "Gudauta", + "Sochi-Adler" ] + ] } \ No newline at end of file diff --git a/resources/factions/australia_2005.json b/resources/factions/australia_2005.json index 79282881..5c7b859c 100644 --- a/resources/factions/australia_2005.json +++ b/resources/factions/australia_2005.json @@ -1,6 +1,8 @@ { "country": "Australia", "name": "Australia 2005", + "authors": "Khopa", + "description": "", "aircrafts": [ "FA_18C_hornet", "UH_1H", diff --git a/resources/factions/bluefor_coldwar.json b/resources/factions/bluefor_coldwar.json index 9c10f332..73265ae3 100644 --- a/resources/factions/bluefor_coldwar.json +++ b/resources/factions/bluefor_coldwar.json @@ -1,6 +1,8 @@ { "country": "Combined Joint Task Forces Blue", "name": "Bluefor Coldwar", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_14B", "F_4E", diff --git a/resources/factions/bluefor_coldwar_a4.json b/resources/factions/bluefor_coldwar_a4.json index d3ff3337..7a2fd90d 100644 --- a/resources/factions/bluefor_coldwar_a4.json +++ b/resources/factions/bluefor_coldwar_a4.json @@ -1,6 +1,8 @@ { "country": "Combined Joint Task Forces Blue", "name": "Bluefor Coldwar (With A4)", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_14B", "F_4E", @@ -55,8 +57,8 @@ "Ticonderoga_class" ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/" - }, + "Community A-4E": "https://heclak.github.io/community-a4e-c/" + }, "carrier_names": [ "CVN-71 Theodore Roosevelt", "CVN-72 Abraham Lincoln", diff --git a/resources/factions/bluefor_coldwar_a4_mb339.json b/resources/factions/bluefor_coldwar_a4_mb339.json index bfd3a41f..880f505f 100644 --- a/resources/factions/bluefor_coldwar_a4_mb339.json +++ b/resources/factions/bluefor_coldwar_a4_mb339.json @@ -1,6 +1,8 @@ { "country": "Combined Joint Task Forces Blue", "name": "Bluefor Coldwar (With A4 & MB339)", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_14B", "F_4E", @@ -56,8 +58,8 @@ "Ticonderoga_class" ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/" - }, + "Community A-4E": "https://heclak.github.io/community-a4e-c/" + }, "carrier_names": [ "CVN-71 Theodore Roosevelt", "CVN-72 Abraham Lincoln", diff --git a/resources/factions/bluefor_modern.json b/resources/factions/bluefor_modern.json index 94c18902..fa931951 100644 --- a/resources/factions/bluefor_modern.json +++ b/resources/factions/bluefor_modern.json @@ -1,6 +1,8 @@ { "country": "Combined Joint Task Forces Blue", "name": "Bluefor Modern", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_14B", "F_15C", diff --git a/resources/factions/canada_2005.json b/resources/factions/canada_2005.json index c01a0b3d..9866f107 100644 --- a/resources/factions/canada_2005.json +++ b/resources/factions/canada_2005.json @@ -1,6 +1,8 @@ { "country": "Canada", "name": "Canada 2005", + "authors": "Khopa", + "description": "", "aircrafts": [ "FA_18C_hornet", "UH_1H", diff --git a/resources/factions/china_2010.json b/resources/factions/china_2010.json index 52e886b1..1b3c7a34 100644 --- a/resources/factions/china_2010.json +++ b/resources/factions/china_2010.json @@ -1,6 +1,8 @@ { "country": "China", "name": "China 2010", + "authors": "Khopa", + "description": "", "aircrafts": [ "MiG_21Bis", "Su_30", diff --git a/resources/factions/france_1995.json b/resources/factions/france_1995.json index 2dae2a03..3af4d91c 100644 --- a/resources/factions/france_1995.json +++ b/resources/factions/france_1995.json @@ -1,6 +1,8 @@ { "country": "France", "name": "France 1995", + "authors": "Khopa", + "description": "", "aircrafts": [ "M_2000C", "Mirage_2000_5", @@ -62,7 +64,8 @@ "Jeanne d'Arc" ], "navy_generators": [ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" + "ArleighBurkeGroupGenerator", + "OliverHazardPerryGroupGenerator" ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" diff --git a/resources/factions/france_2005_modded.json b/resources/factions/france_2005_modded.json index f16f9f4a..0ad6d3e1 100644 --- a/resources/factions/france_2005_modded.json +++ b/resources/factions/france_2005_modded.json @@ -1,6 +1,8 @@ { "country": "France", "name": "France 2005 (Modded)", + "authors": "Khopa", + "description": "", "aircrafts": [ "M_2000C", "Mirage_2000_5", diff --git a/resources/factions/germany_1942.json b/resources/factions/germany_1942.json index 9f07a4c4..9a641bc2 100644 --- a/resources/factions/germany_1942.json +++ b/resources/factions/germany_1942.json @@ -1,6 +1,8 @@ { "country": "Third Reich", "name": "Germany 1944", + "authors": "Khopa", + "description": "", "aircrafts": [ "FW_190A8", "FW_190D9", @@ -47,7 +49,8 @@ "helicopter_carrier_names": [ ], "navy_generators": [ - "UBoatGroupGenerator", "SchnellbootGroupGenerator" + "UBoatGroupGenerator", + "SchnellbootGroupGenerator" ], "navy_group_count": 2, "has_jtac": false, diff --git a/resources/factions/germany_1944.json b/resources/factions/germany_1944.json index 5479701e..7ff13b99 100644 --- a/resources/factions/germany_1944.json +++ b/resources/factions/germany_1944.json @@ -1,6 +1,8 @@ { "country": "Third Reich", "name": "Germany 1944", + "authors": "Khopa", + "description": "", "aircrafts": [ "FW_190A8", "FW_190D9", @@ -52,10 +54,13 @@ "helicopter_carrier_names": [ ], "navy_generators": [ - "UBoatGroupGenerator", "SchnellbootGroupGenerator" + "UBoatGroupGenerator", + "SchnellbootGroupGenerator" ], "navy_group_count": 2, - "missiles": ["V1GroupGenerator"], + "missiles": [ + "V1GroupGenerator" + ], "missiles_group_count": 1, "has_jtac": false, "doctrine": "ww2", diff --git a/resources/factions/germany_1990.json b/resources/factions/germany_1990.json index c462aa84..9376387c 100644 --- a/resources/factions/germany_1990.json +++ b/resources/factions/germany_1990.json @@ -1,6 +1,8 @@ { "country": "Germany", "name": "Germany 1990", + "authors": "Khopa", + "description": "", "aircrafts": [ "MiG_29G", "Tornado_IDS", diff --git a/resources/factions/india_2010.json b/resources/factions/india_2010.json index 4a4ba636..9572c669 100644 --- a/resources/factions/india_2010.json +++ b/resources/factions/india_2010.json @@ -1,6 +1,8 @@ { "country": "India", "name": "India 2010", + "authors": "Khopa", + "description": "", "aircrafts": [ "Mirage_2000_5", "M_2000C", @@ -61,7 +63,8 @@ "INS Vikramaditya" ], "navy_generators": [ - "OliverHazardPerryGroupGenerator", "MolniyaGroupGenerator" + "OliverHazardPerryGroupGenerator", + "MolniyaGroupGenerator" ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" diff --git a/resources/factions/insurgents.json b/resources/factions/insurgents.json index 7bbf51f4..a4dd0e24 100644 --- a/resources/factions/insurgents.json +++ b/resources/factions/insurgents.json @@ -1,6 +1,8 @@ { "country": "Insurgents", "name": "Insurgents", + "authors": "Khopa", + "description": "", "aircrafts": [ ], "frontline_units": [ diff --git a/resources/factions/insurgents_modded.json b/resources/factions/insurgents_modded.json index 487e8bfb..9c4603e6 100644 --- a/resources/factions/insurgents_modded.json +++ b/resources/factions/insurgents_modded.json @@ -1,6 +1,8 @@ { "country": "Insurgents", "name": "Insurgents (Modded)", + "authors": "Khopa", + "description": "", "aircrafts": [ ], "frontline_units": [ @@ -30,7 +32,8 @@ "sams": [ "ZU23Generator", "ZSU23Generator" - ],"requirements": { - "frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974" + ], + "requirements": { + "frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974" } } diff --git a/resources/factions/iran_2015.json b/resources/factions/iran_2015.json index dbaab752..5b6d8757 100644 --- a/resources/factions/iran_2015.json +++ b/resources/factions/iran_2015.json @@ -1,6 +1,8 @@ { "country": "Iran", "name": "Iran 2015", + "authors": "Khopa", + "description": "", "aircrafts": [ "MiG_21Bis", "MiG_29A", @@ -67,7 +69,9 @@ "carrier_names": [ ], "navy_generators": [ - "GrishaGroupGenerator", "MolniyaGroupGenerator", "KiloSubGroupGenerator" + "GrishaGroupGenerator", + "MolniyaGroupGenerator", + "KiloSubGroupGenerator" ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" diff --git a/resources/factions/israel_1948.json b/resources/factions/israel_1948.json index ca1d7e40..cd723e9f 100644 --- a/resources/factions/israel_1948.json +++ b/resources/factions/israel_1948.json @@ -1,6 +1,8 @@ { "country": "Israel", "name": "Israel 1948", + "authors": "Khopa", + "description": "", "aircrafts": [ "SpitfireLFMkIXCW", "SpitfireLFMkIX", diff --git a/resources/factions/israel_1973.json b/resources/factions/israel_1973.json index fd5d91fd..071833c3 100644 --- a/resources/factions/israel_1973.json +++ b/resources/factions/israel_1973.json @@ -1,6 +1,8 @@ { "country": "Israel", "name": "Israel 1973", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_4E", "A_4E_C", @@ -44,8 +46,8 @@ "cruisers": [ ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/", - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + "Community A-4E": "https://heclak.github.io/community-a4e-c/", + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" }, "carrier_names": [ ], diff --git a/resources/factions/israel_1982.json b/resources/factions/israel_1982.json index a5f23a9d..fe80cf27 100644 --- a/resources/factions/israel_1982.json +++ b/resources/factions/israel_1982.json @@ -1,6 +1,8 @@ { "country": "Israel", "name": "Israel 1982", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_4E", "A_4E_C", @@ -47,7 +49,7 @@ "cruisers": [ ], "requirements": { - "Community A-4E": "https://heclak.github.io/community-a4e-c/" + "Community A-4E": "https://heclak.github.io/community-a4e-c/" }, "carrier_names": [ ], diff --git a/resources/factions/israel_2000.json b/resources/factions/israel_2000.json index 0210a93d..97aeed68 100644 --- a/resources/factions/israel_2000.json +++ b/resources/factions/israel_2000.json @@ -1,6 +1,8 @@ { "country": "Israel", "name": "Israel 2000", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_4E", "F_15C", diff --git a/resources/factions/italy_1990.json b/resources/factions/italy_1990.json index 3f924868..a1e863da 100644 --- a/resources/factions/italy_1990.json +++ b/resources/factions/italy_1990.json @@ -1,6 +1,8 @@ { "country": "Italy", "name": "Italy 1990", + "authors": "Khopa", + "description": "", "aircrafts": [ "Tornado_IDS", "AV8BNA", diff --git a/resources/factions/italy_1990_mb339.json b/resources/factions/italy_1990_mb339.json index aac954bf..fb8d6eff 100644 --- a/resources/factions/italy_1990_mb339.json +++ b/resources/factions/italy_1990_mb339.json @@ -1,6 +1,8 @@ { "country": "Italy", "name": "Italy 1990 (With MB339)", + "authors": "Khopa", + "description": "", "aircrafts": [ "Tornado_IDS", "AV8BNA", diff --git a/resources/factions/japan_2005.json b/resources/factions/japan_2005.json index 010b8d38..a9a3e6ff 100644 --- a/resources/factions/japan_2005.json +++ b/resources/factions/japan_2005.json @@ -1,6 +1,8 @@ { "country": "Japan", "name": "Japan 2005", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_15C", "F_16C_50", diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index fa0f1966..e10b9060 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -1,64 +1,67 @@ -{ - "country": "Libya", - "name": "Libya 2011", - "aircrafts": [ - "MiG_21Bis", - "MiG_23MLD", - "Su_17M4", - "Su_24M", - "Mi_24V" - ], - "awacs": [ - "A_50" - ], - "tankers": [ - "IL_78M" - ], - "frontline_units": [ - "IFV_BMP_1", - "ARV_BRDM_2", - "MBT_T_72B", - "MBT_T_55" - ], - "artillery_units": [ - "MLRS_BM_21_Grad" - ], - "logistics_units": [ - "Transport_Ural_375", - "Transport_UAZ_469" - ], - "infantry_units": [ - "Infantry_Soldier_Insurgents", - "Paratrooper_RPG_16" - ], - "shorads": [ - "HQ7Generator", - "SA8Generator", - "ZSU23Generator" - ], - "sams": [ - "SA2Generator", - "SA3Generator", - "SA6Generator" - ], - "aircraft_carrier": [ - ], - "helicopter_carrier": [ - ], - "helicopter_carrier_names": [ - ], - "destroyers": [ - "FF_1135M_Rezky" - ], - "cruisers": [ - "FSG_1241_1MP_Molniya" - ], - "requirements": {}, - "carrier_names": [ - ], - "navy_generators": [ - "GrishaGroupGenerator", "MolniyaGroupGenerator" - ], - "has_jtac": true, - "jtac_unit": "MQ_9_Reaper" +"authors": "Khopa", +"description": "", "Libya", +"name": "Libya 2011", +"authors": "Khopa", +"description": "", +"aircrafts": [ +"MiG_21Bis", +"MiG_23MLD", +"Su_17M4", +"Su_24M", +"Mi_24V" +], +"awacs": [ +"A_50" +], +"tankers": [ +"IL_78M" +], +"frontline_units": [ +"IFV_BMP_1", +"ARV_BRDM_2", +"MBT_T_72B", +"MBT_T_55" +], +"artillery_units": [ +"MLRS_BM_21_Grad" +], +"logistics_units": [ +"Transport_Ural_375", +"Transport_UAZ_469" +], +"infantry_units": [ +"Infantry_Soldier_Insurgents", +"Paratrooper_RPG_16" +], +"shorads": [ +"HQ7Generator", +"SA8Generator", +"ZSU23Generator" +], +"sams": [ +"SA2Generator", +"SA3Generator", +"SA6Generator" +], +"aircraft_carrier": [ +], +"helicopter_carrier": [ +], +"helicopter_carrier_names": [ +], +"destroyers": [ +"FF_1135M_Rezky" +], +"cruisers": [ +"FSG_1241_1MP_Molniya" +], +"requirements": { +}, +"carrier_names": [ +], +"navy_generators": [ +"GrishaGroupGenerator", "MolniyaGroupGenerator" +], +"has_jtac": true, +"jtac_unit": "MQ_9_Reaper" } diff --git a/resources/factions/netherlands_1990.json b/resources/factions/netherlands_1990.json new file mode 100644 index 00000000..5373fda8 --- /dev/null +++ b/resources/factions/netherlands_1990.json @@ -0,0 +1,55 @@ +{ + "country": "Netherlands", + "name": "Netherlands 1990", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_16C_50", + "F_5E_3", + "AH_64A" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "APC_M113", + "MBT_Leopard_1A3" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/north_korea_2000.json b/resources/factions/north_korea_2000.json new file mode 100644 index 00000000..db8881f3 --- /dev/null +++ b/resources/factions/north_korea_2000.json @@ -0,0 +1,72 @@ +{ + "country": "North Korea", + "name": "North Korea 2000", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_15bis", + "MiG_19P", + "MiG_21Bis", + "MiG_23MLD", + "MiG_29A", + "Mi_8MT", + "Mi_24V" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "APC_BTR_80", + "IFV_BMP_1", + "MBT_T_55", + "MBT_T_72B", + "MBT_T_80U" + ], + "artillery_units": [ + "MLRS_BM_21_Grad", + "MLRS_9K57_Uragan_BM_27", + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorads": [ + "SA9Generator", + "SA13Generator", + "ZSU23Generator", + "ZU23Generator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator", + "MolniyaGroupGenerator" + ], + "has_jtac": false +} diff --git a/resources/factions/pakistan_2015.json b/resources/factions/pakistan_2015.json new file mode 100644 index 00000000..7020e6be --- /dev/null +++ b/resources/factions/pakistan_2015.json @@ -0,0 +1,69 @@ +{ + "country": "Pakistan", + "name": "Pakistan 2015", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "JF_17", + "F_16C_50", + "MiG_21Bis", + "MiG_19P", + "Mi_8MT", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "KJ_2000" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "MBT_T_80U", + "MBT_T_55", + "ZBD_04A", + "APC_BTR_80", + "APC_M113" + ], + "artillery_units": [ + "MLRS_9A52_Smerch", + "SPH_2S9_Nona" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorads": [ + "HQ7Generator", + "ZU23UralGenerator", + "ZU23Generator" + ], + "sams": [ + "SA10Generator", + "SA2Generator" + ], + "aircraft_carrier": [ + ], + "carrier_names": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruiser": [ + ], + "requirements": {}, + "navy_generators": [ + "Type54GroupGenerator", + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "WingLoong_I" +} diff --git a/resources/factions/russia_1990.json b/resources/factions/russia_1990.json index cf760e22..697167b8 100644 --- a/resources/factions/russia_1990.json +++ b/resources/factions/russia_1990.json @@ -1,6 +1,8 @@ { "country": "Russia", "name": "Russia 1990", + "authors": "Khopa", + "description": "", "aircrafts": [ "MiG_23MLD", "MiG_25PD", diff --git a/resources/factions/russia_2010.json b/resources/factions/russia_2010.json index 7d3eedff..6a4c5a47 100644 --- a/resources/factions/russia_2010.json +++ b/resources/factions/russia_2010.json @@ -1,6 +1,8 @@ { "country": "Russia", "name": "Russia 2010", + "authors": "Khopa", + "description": "", "aircrafts": [ "MiG_29S", "MiG_31", diff --git a/resources/factions/russia_2020.json b/resources/factions/russia_2020.json index 6efe6219..68e95ae7 100644 --- a/resources/factions/russia_2020.json +++ b/resources/factions/russia_2020.json @@ -1,6 +1,8 @@ { "country": "Russia", "name": "Russia 2020 (Modded)", + "authors": "Khopa", + "description": "", "aircrafts": [ "MiG_29S", "MiG_31", diff --git a/resources/factions/usa_1990.json b/resources/factions/usa_1990.json index fd8b4869..4a65bab1 100644 --- a/resources/factions/usa_1990.json +++ b/resources/factions/usa_1990.json @@ -1,8 +1,8 @@ - { - "country": "USA", "name": "USA 2005", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_15C", "F_15E", diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index 58daa5bf..8e7fcaa6 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -1,6 +1,8 @@ { "country": "USA", "name": "USA 1990", + "authors": "Khopa", + "description": "", "aircrafts": [ "F_15C", "F_15E", From 0fd58135fd8d7470296bf7d9cd9d48b98ec7646d Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 18:02:41 +0200 Subject: [PATCH 14/29] Migrated more factions to new faction json format. --- game/factions/private_miltary_companies.py | 109 ------------------ game/factions/russia_1955.py | 53 --------- game/factions/russia_1965.py | 73 ------------ game/factions/russia_1975.py | 99 ---------------- game/factions/russia_1990.py | 113 ------------------- game/factions/russia_2010.py | 119 -------------------- game/factions/russia_2020.py | 124 --------------------- game/factions/spain_1990.py | 70 ------------ game/factions/sweden_1990.py | 45 -------- game/factions/turkey_2005.py | 60 ---------- resources/factions/pmc_russian.json | 36 ++++++ resources/factions/pmc_us.json | 33 ++++++ resources/factions/pmc_us_with_mb339.json | 37 ++++++ resources/factions/russia_1955.json | 60 ++++++++++ resources/factions/russia_1965.json | 64 +++++++++++ resources/factions/russia_1975.json | 70 ++++++++++++ resources/factions/spain_1990.json | 64 +++++++++++ resources/factions/sweden_1990.json | 42 +++++++ resources/factions/turkey_2005.json | 49 ++++++++ 19 files changed, 455 insertions(+), 865 deletions(-) delete mode 100644 game/factions/private_miltary_companies.py delete mode 100644 game/factions/russia_1955.py delete mode 100644 game/factions/russia_1965.py delete mode 100644 game/factions/russia_1975.py delete mode 100644 game/factions/russia_1990.py delete mode 100644 game/factions/russia_2010.py delete mode 100644 game/factions/russia_2020.py delete mode 100644 game/factions/spain_1990.py delete mode 100644 game/factions/sweden_1990.py delete mode 100644 game/factions/turkey_2005.py create mode 100644 resources/factions/pmc_russian.json create mode 100644 resources/factions/pmc_us.json create mode 100644 resources/factions/pmc_us_with_mb339.json create mode 100644 resources/factions/russia_1955.json create mode 100644 resources/factions/russia_1965.json create mode 100644 resources/factions/russia_1975.json create mode 100644 resources/factions/spain_1990.json create mode 100644 resources/factions/sweden_1990.json create mode 100644 resources/factions/turkey_2005.json diff --git a/game/factions/private_miltary_companies.py b/game/factions/private_miltary_companies.py deleted file mode 100644 index 23fbcbdd..00000000 --- a/game/factions/private_miltary_companies.py +++ /dev/null @@ -1,109 +0,0 @@ -from dcs.helicopters import ( - Ka_50, - Mi_24V, - Mi_8MT, - OH_58D, - SA342M, - UH_1H, -) -from dcs.planes import ( - C_101CC, - L_39C, - L_39ZA, -) -from dcs.ships import ( - Armed_speedboat, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from pydcs_extensions.mb339.mb339 import MB_339PAN - -PMC_WESTERN_A = { - "country": "USA", - "side": "blue", - "units": [ - C_101CC, - - UH_1H, - Mi_8MT, - OH_58D, - SA342M, - - Armor.APC_M1043_HMMWV_Armament, - Armor.IFV_MCV_80, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Avenger_M1097, - - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "has_jtac": True -} - -PMC_WESTERN_B = { - "country": "USA", - "side": "blue", - "units": [ - MB_339PAN, - C_101CC, - - UH_1H, - Mi_8MT, - OH_58D, - SA342M, - - Armor.APC_M1043_HMMWV_Armament, - Armor.IFV_MCV_80, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Avenger_M1097, - - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "has_jtac": True, - "requirements": { - "MB-339A": "http://www.freccetricolorivirtuali.net/", - } -} - -PMC_RUSSIAN = { - "country": "Russia", - "side": "blue", - "units": [ - L_39C, - L_39ZA, - - Mi_8MT, - Mi_24V, - Ka_50, - - Armor.APC_Cobra, - Armor.APC_BTR_80, - Armor.ARV_BRDM_2, - - Unarmed.Transport_Ural_375, - Infantry.Paratrooper_AKS, - Infantry.Paratrooper_RPG_16, - - AirDefence.AAA_ZU_23_on_Ural_375, - - Armed_speedboat, - ], "shorad":[ - AirDefence.AAA_ZU_23_on_Ural_375, - AirDefence.AAA_ZU_23_Closed, - ], "has_jtac": True -} - diff --git a/game/factions/russia_1955.py b/game/factions/russia_1955.py deleted file mode 100644 index 98624ad5..00000000 --- a/game/factions/russia_1955.py +++ /dev/null @@ -1,53 +0,0 @@ -from dcs.planes import ( - An_26B, - An_30M, - IL_76MD, - IL_78M, - MiG_15bis, - Tu_95MS, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import AirDefence, Armor, Artillery, Infantry, Unarmed - -Russia_1955 = { - "country": "Russia", - "side": "red", - "units": [ - MiG_15bis, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - Tu_95MS, - - AirDefence.AAA_ZU_23_Closed, - AirDefence.AAA_ZU_23_on_Ural_375, - Armor.ARV_BRDM_2, - Armor.FDDM_Grad, - Armor.APC_MTLB, - Armor.MBT_T_55, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - - # Infantry squad - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - ] -} \ No newline at end of file diff --git a/game/factions/russia_1965.py b/game/factions/russia_1965.py deleted file mode 100644 index cb5d298a..00000000 --- a/game/factions/russia_1965.py +++ /dev/null @@ -1,73 +0,0 @@ -from dcs.helicopters import Mi_8MT -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - MiG_15bis, - MiG_19P, - MiG_21Bis, - Tu_95MS, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import AirDefence, Armor, Artillery, Infantry, Unarmed - -Russia_1965 = { - "country": "Russia", - "side": "red", - "units": [ - MiG_15bis, - MiG_19P, - MiG_21Bis, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - Tu_95MS, - - A_50, - - Mi_8MT, - - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_2_LN_SM_90, - AirDefence.SAM_SA_3_S_125_LN_5P73, - - Armor.ARV_BRDM_2, - Armor.APC_BTR_80, - Armor.ARV_BTR_RD, - Armor.IFV_BMD_1, - Armor.IFV_BMP_1, - Armor.MBT_T_55, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - - # Infantry squad - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - - ], - "shorad":[ - AirDefence.AAA_ZU_23_Closed - ], "boat": [ - "GrishaGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/russia_1975.py b/game/factions/russia_1975.py deleted file mode 100644 index b12d28d4..00000000 --- a/game/factions/russia_1975.py +++ /dev/null @@ -1,99 +0,0 @@ -from dcs.helicopters import ( - Mi_24V, - Mi_8MT, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - MiG_21Bis, - MiG_23MLD, - MiG_25PD, - MiG_29A, - Su_17M4, - Su_24M, - Su_25, - Tu_22M3, - Tu_95MS, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CGN_1144_2_Pyotr_Velikiy, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - FF_1135M_Rezky, - Tanker_Elnya_160, -) -from dcs.vehicles import AirDefence, Armor, Artillery, Infantry, Unarmed - -Russia_1975 = { - "country": "Russia", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_23MLD, - MiG_25PD, - MiG_29A, - - Su_17M4, - Su_24M, - Su_25, - - Tu_22M3, - Tu_95MS, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - A_50, - - Mi_8MT, - Mi_24V, - - AirDefence.AAA_ZU_23_Closed, - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_3_S_125_LN_5P73, - - Armor.ARV_BRDM_2, - Armor.APC_BTR_80, - Armor.IFV_BMD_1, - Armor.IFV_BMP_1, - Armor.MBT_T_55, - - Artillery.SPH_2S9_Nona, - Artillery.SPH_2S1_Gvozdika, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - - # Infantry squad - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - - ], - "shorad": [ - AirDefence.AAA_ZU_23_Emplacement, - AirDefence.SPAAA_ZSU_23_4_Shilka - ], "aircraft_carrier": [ - CV_1143_5_Admiral_Kuznetsov, - ], "destroyer": [ - FF_1135M_Rezky, - ], "cruiser": [ - CGN_1144_2_Pyotr_Velikiy, - ], "boat": [ - "RussianNavyGroupGenerator", "KiloSubGroupGenerator", "MolniyaGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/russia_1990.py b/game/factions/russia_1990.py deleted file mode 100644 index 71e4c494..00000000 --- a/game/factions/russia_1990.py +++ /dev/null @@ -1,113 +0,0 @@ -from dcs.helicopters import ( - Ka_50, - Mi_24V, - Mi_8MT, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - MiG_23MLD, - MiG_25PD, - MiG_29A, - MiG_29S, - MiG_31, - Su_24M, - Su_25, - Su_27, - Tu_160, - Tu_22M3, - Tu_95MS, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - FF_1135M_Rezky, - FSG_1241_1MP_Molniya, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -Russia_1990 = { - "country": "Russia", - "side": "red", - "units": [ - - MiG_23MLD, - MiG_25PD, - MiG_29A, - MiG_29S, - MiG_31, - Su_27, - - Su_24M, - Su_25, - Ka_50, - - Tu_160, - Tu_22M3, - Tu_95MS, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - A_50, - - Mi_8MT, - Mi_24V, - - AirDefence.AAA_ZU_23_Closed, - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_3_S_125_LN_5P73, - - Armor.ARV_BRDM_2, - Armor.APC_BTR_80, - Armor.IFV_BMD_1, - Armor.IFV_BMP_1, - Armor.MBT_T_55, - Artillery.MLRS_9K57_Uragan_BM_27, - Artillery.SPH_2S19_Msta, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - - # Infantry squad - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - ], - "shorad":[ - AirDefence.SAM_SA_9_Strela_1_9P31, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3, - AirDefence.SPAAA_ZSU_23_4_Shilka - ], "carrier_names": [ - "Admiral Kuznetov", - "Admiral Gorshkov" - ], "aircraft_carrier": [ - CV_1143_5_Admiral_Kuznetsov, - ], "destroyer": [ - FF_1135M_Rezky, - ], "cruiser": [ - FSG_1241_1MP_Molniya, - ], "boat":[ - "RussianNavyGroupGenerator", "KiloSubGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/russia_2010.py b/game/factions/russia_2010.py deleted file mode 100644 index 852871f6..00000000 --- a/game/factions/russia_2010.py +++ /dev/null @@ -1,119 +0,0 @@ -from dcs.helicopters import ( - Ka_50, - Mi_24V, - Mi_28N, - Mi_8MT, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - L_39ZA, - MiG_29S, - MiG_31, - Su_24M, - Su_25, - Su_25T, - Su_27, - Su_30, - Su_33, - Su_34, - Tu_160, - Tu_22M3, - Tu_95MS, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - FF_1135M_Rezky, - FSG_1241_1MP_Molniya, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -Russia_2010 = { - "country": "Russia", - "side": "red", - "units": [ - - Su_27, - Su_30, - Su_33, - MiG_29S, - MiG_31, - - Su_25, - Su_25T, - Su_34, - Su_24M, - L_39ZA, - - Tu_160, - Tu_22M3, - Tu_95MS, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - A_50, - - Ka_50, - Mi_8MT, - Mi_24V, - Mi_28N, - - AirDefence.SAM_SA_19_Tunguska_2S6, - AirDefence.SAM_SA_11_Buk_LN_9A310M1, - AirDefence.SAM_SA_10_S_300PS_LN_5P85C, - - Armor.APC_BTR_80, - Armor.MBT_T_90, - Armor.MBT_T_80U, - Armor.MBT_T_72B, - Armor.IFV_BMP_1, - Armor.IFV_BMP_2, - Armor.IFV_BMP_3, - - Artillery.MLRS_9K57_Uragan_BM_27, - Artillery.SPH_2S19_Msta, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - - # Infantry squad - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - ], - "shorad":[ - AirDefence.SAM_SA_19_Tunguska_2S6, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3 - ], "aircraft_carrier": [ - CV_1143_5_Admiral_Kuznetsov, - ], "carrier_names": [ - "Admiral Kuznetov" - ], "destroyer": [ - FF_1135M_Rezky, - ], "cruiser": [ - FSG_1241_1MP_Molniya, - ], "boat": [ - "RussianNavyGroupGenerator", "KiloSubGroupGenerator" - ] -} diff --git a/game/factions/russia_2020.py b/game/factions/russia_2020.py deleted file mode 100644 index 5df17da7..00000000 --- a/game/factions/russia_2020.py +++ /dev/null @@ -1,124 +0,0 @@ -from dcs.helicopters import ( - Ka_50, - Mi_24V, - Mi_28N, - Mi_8MT, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - L_39ZA, - MiG_29S, - MiG_31, - Su_24M, - Su_25, - Su_25T, - Su_27, - Su_30, - Su_33, - Su_34, - Tu_160, - Tu_22M3, - Tu_95MS, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - FF_1135M_Rezky, - FSG_1241_1MP_Molniya, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -from pydcs_extensions.su57.su57 import Su_57 - -Russia_2020 = { - "country": "Russia", - "side": "red", - "units": [ - - Su_27, - Su_30, - Su_33, - MiG_29S, - MiG_31, - Su_57, - - Su_25, - Su_25T, - Su_34, - Su_24M, - L_39ZA, - - Tu_160, - Tu_22M3, - Tu_95MS, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - A_50, - - Ka_50, - Mi_8MT, - Mi_24V, - Mi_28N, - - AirDefence.SAM_SA_19_Tunguska_2S6, - AirDefence.SAM_SA_11_Buk_LN_9A310M1, - AirDefence.SAM_SA_10_S_300PS_LN_5P85C, - - Armor.APC_BTR_80, - Armor.MBT_T_90, - Armor.MBT_T_80U, - Armor.MBT_T_72B, - Armor.IFV_BMP_1, - Armor.IFV_BMP_2, - Armor.IFV_BMP_3, - - Artillery.MLRS_9K57_Uragan_BM_27, - Artillery.SPH_2S19_Msta, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - - # Infantry squad - Infantry.Paratrooper_AKS, - Infantry.Infantry_Soldier_Rus, - Infantry.Paratrooper_RPG_16, - ], - "shorad":[ - AirDefence.SAM_SA_19_Tunguska_2S6, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3 - ], "aircraft_carrier": [ - CV_1143_5_Admiral_Kuznetsov, - ], "carrier_names": [ - "Admiral Kuznetov" - ], "destroyer": [ - FF_1135M_Rezky, - ], "cruiser": [ - FSG_1241_1MP_Molniya, - ], "boat": [ - "RussianNavyGroupGenerator", "KiloSubGroupGenerator" - ], "requirements": { - "SU-57 Felon By CubanAce Simulations": "https://www.digitalcombatsimulator.com/fr/files/2539621/" - } -} diff --git a/game/factions/spain_1990.py b/game/factions/spain_1990.py deleted file mode 100644 index 2dfb6ec3..00000000 --- a/game/factions/spain_1990.py +++ /dev/null @@ -1,70 +0,0 @@ -from dcs.planes import ( - AV8BNA, - C_101CC, - C_130, - E_3A, - FA_18C_hornet, - F_5E_3, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Spain_1990 = { - "country": "Spain", - "side": "blue", - "units": [ - FA_18C_hornet, - AV8BNA, - F_5E_3, - C_101CC, - - KC_135, - KC130, - C_130, - E_3A, - - Armor.MBT_M60A3_Patton, - Armor.MBT_Leopard_2, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Avenger_M1097, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, # Standing as Principe de Asturias - ], "helicopter_carrier": [ - LHA_1_Tarawa, # Standing as Juan Carlos - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "Principe de Asturias", - ], "helicopter_carrier_names": [ - "Juan Carlos I", - ], "boat":[ - "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/sweden_1990.py b/game/factions/sweden_1990.py deleted file mode 100644 index 058f1478..00000000 --- a/game/factions/sweden_1990.py +++ /dev/null @@ -1,45 +0,0 @@ -from dcs.helicopters import ( - UH_1H, -) -from dcs.planes import ( - AJS37, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Sweden_1990 = { - "country": "Sweden", - "side": "blue", - "units": [ - AJS37, - - UH_1H, - - AirDefence.SAM_Hawk_PCP, - - Armor.IFV_MCV_80, # Standing as Strf 90 - Armor.MBT_Leopard_2, - Armor.APC_M1126_Stryker_ICV, # Closest thing available - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - Infantry.Soldier_AK, - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - ], - "shorad": [ - AirDefence.SAM_Avenger_M1097 - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/turkey_2005.py b/game/factions/turkey_2005.py deleted file mode 100644 index be68334c..00000000 --- a/game/factions/turkey_2005.py +++ /dev/null @@ -1,60 +0,0 @@ -from dcs.helicopters import ( - AH_1W, - UH_1H, -) -from dcs.planes import ( - C_130, - E_3A, - F_16C_50, - F_4E, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Turkey_2005 = { - "country": "Turkey", - "side": "blue", - "units":[ - F_16C_50, - F_4E, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - AH_1W, - - Armor.MBT_Leopard_2, - Armor.MBT_Leopard_1A3, - Armor.MBT_M60A3_Patton, - Armor.APC_Cobra, - Armor.APC_BTR_80, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.SAM_Avenger_M1097, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad":[ - AirDefence.AAA_ZU_23_Emplacement, - AirDefence.SPAAA_ZSU_23_4_Shilka - ], "boat":[ - "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/resources/factions/pmc_russian.json b/resources/factions/pmc_russian.json new file mode 100644 index 00000000..560e891a --- /dev/null +++ b/resources/factions/pmc_russian.json @@ -0,0 +1,36 @@ +{ + "country": "Russia", + "name": "Private Military Company - Russian", + "authors": "Khopa", + "description": "A private military company using Russian units.", + "aircrafts": [ + "L_39C", + "L_39ZA", + "Mi_8MT", + "Mi_24V", + "Ka_50" + ], + "frontline_units": [ + "APC_Cobra", + "APC_BTR_80", + "ARV_BRDM_2" + ], + "artillery_units": [ + "SPH_2S19_Msta" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Paratrooper_RPG_16" + ], + "shorads": [ + "SA13Generator", + "SA9Generator" + ], + "sams": [ + "SA13Generator" + ] +} diff --git a/resources/factions/pmc_us.json b/resources/factions/pmc_us.json new file mode 100644 index 00000000..58902aab --- /dev/null +++ b/resources/factions/pmc_us.json @@ -0,0 +1,33 @@ +{ + "country": "USA", + "name": "Private Military Company - USA", + "authors": "Khopa", + "description": "A private military company using western units.", + "aircrafts": [ + "C_101CC", + "UH_1H", + "Mi_8MT", + "SA342M" + ], + "frontline_units": [ + "APC_M1043_HMMWV_Armament", + "IFV_MCV_80" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "AvengerGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/pmc_us_with_mb339.json b/resources/factions/pmc_us_with_mb339.json new file mode 100644 index 00000000..2180b0fe --- /dev/null +++ b/resources/factions/pmc_us_with_mb339.json @@ -0,0 +1,37 @@ +{ + "country": "USA", + "name": "Private Military Company - USA", + "authors": "Khopa", + "description": "A private military company using western units (And using the MB339 mod).", + "aircrafts": [ + "MB_339PAN", + "C_101CC", + "UH_1H", + "Mi_8MT", + "SA342M" + ], + "frontline_units": [ + "APC_M1043_HMMWV_Armament", + "IFV_MCV_80" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "AvengerGenerator" + ], + "requirements": { + "MB-339A": "http://www.freccetricolorivirtuali.net/" + }, + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/russia_1955.json b/resources/factions/russia_1955.json new file mode 100644 index 00000000..f621238f --- /dev/null +++ b/resources/factions/russia_1955.json @@ -0,0 +1,60 @@ +{ + "country": "Russia", + "name": "Russia 1955", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_15bis" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "FDDM_Grad", + "APC_MTLB", + "MBT_T_55", + "AAA_ZU_23_on_Ural_375" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Rus", + "Soldier_RPG" + ], + "shorads": [ + "ZSU23Generator", + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "ZSU23Generator", + "ZU23Generator", + "ZU23UralGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + ], + "has_jtac": false, + "doctrine": "coldwar" +} diff --git a/resources/factions/russia_1965.json b/resources/factions/russia_1965.json new file mode 100644 index 00000000..929e35d1 --- /dev/null +++ b/resources/factions/russia_1965.json @@ -0,0 +1,64 @@ +{ + "country": "Russia", + "name": "Russia 1955", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_15bis", + "MiG_19P", + "MiG_21bis", + "Mi_8MT" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "APC_BTR_80", + "ARV_BTR_RD", + "IFV_BMD_1", + "IFV_BMP_1", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Rus", + "Soldier_RPG" + ], + "shorads": [ + "ZSU23Generator", + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + ], + "has_jtac": false, + "doctrine": "coldwar" +} diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json new file mode 100644 index 00000000..e9f23d9b --- /dev/null +++ b/resources/factions/russia_1975.json @@ -0,0 +1,70 @@ +{ + "country": "Russia", + "name": "Russia 1955", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_21bis", + "MiG_23MLD", + "MiG_25PD", + "MiG_29A", + "Su_17M4", + "Su_24M", + "Su_25", + "Mi_8MT", + "Mi_24V" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "APC_BTR_80", + "IFV_BMD_1", + "IFV_BMP_1", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_BM_21_Grad", + "SPH_2S9_Nona", + "SPH_2S1_Gvozdika" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Rus", + "Soldier_RPG" + ], + "shorads": [ + "ZSU23Generator", + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "KiloSubGroupGenerator", "MolniyaGroupGenerator" + ], + "has_jtac": false, + "doctrine": "coldwar" +} diff --git a/resources/factions/spain_1990.json b/resources/factions/spain_1990.json new file mode 100644 index 00000000..7555c396 --- /dev/null +++ b/resources/factions/spain_1990.json @@ -0,0 +1,64 @@ +{ + "country": "Spain", + "name": "Spain 1990", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "FA_18C_hornet", + "AV8BNA", + "F_5E_3", + "C_101CC", + "UH_1H" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "MBT_Leopard_2", + "APC_M113" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "Principe de Asturias" + ], + "helicopter_carrier_names": [ + "Juan Carlos I" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/sweden_1990.json b/resources/factions/sweden_1990.json new file mode 100644 index 00000000..3d57c5fe --- /dev/null +++ b/resources/factions/sweden_1990.json @@ -0,0 +1,42 @@ +{ + "country": "Sweden", + "name": "Sweden 1990", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "AJS37", + "UH_1H" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "IFV_MCV_80", + "MBT_Leopard_2", + "APC_M1126_Stryker_ICV" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} diff --git a/resources/factions/turkey_2005.json b/resources/factions/turkey_2005.json new file mode 100644 index 00000000..54762875 --- /dev/null +++ b/resources/factions/turkey_2005.json @@ -0,0 +1,49 @@ +{ + "country": "Turkey", + "name": "Turkey 2005", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_16C_50", + "F_4E", + "UH_1H", + "AH_1W" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Leopard_2", + "MBT_Leopard_1A3", + "MBT_M60A3_Patton", + "APC_Cobra", + "APC_BTR_80" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249", + "Paratrooper_AKS" + ], + "shorads": [ + "AvengerGenerator", + "ZSU23Generator" + ], + "sams": [ + "HawkGenerator" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} From dd2b61edf3eddac169e2293e93987284fc167d82 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 24 Oct 2020 12:24:29 -0700 Subject: [PATCH 15/29] Use FrontLine in ConflictTheater.conflicts. --- game/game.py | 17 +++++++++++------ game/operation/operation.py | 4 +++- gen/briefinggen.py | 10 +++------- gen/visualgen.py | 4 +++- theater/conflicttheater.py | 11 +++++++---- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/game/game.py b/game/game.py index bd0f68f7..2b8f7689 100644 --- a/game/game.py +++ b/game/game.py @@ -141,8 +141,10 @@ class Game: self.events.append(event_class(self, player_cp, enemy_cp, enemy_cp.position, self.player_name, self.enemy_name)) def _generate_events(self): - for player_cp, enemy_cp in self.theater.conflicts(True): - self._generate_player_event(FrontlineAttackEvent, player_cp, enemy_cp) + for front_line in self.theater.conflicts(True): + self._generate_player_event(FrontlineAttackEvent, + front_line.control_point_a, + front_line.control_point_b) def commision_unit_types(self, cp: ControlPoint, for_task: Task) -> List[UnitType]: importance_factor = (cp.importance - IMPORTANCE_LOW) / (IMPORTANCE_HIGH - IMPORTANCE_LOW) @@ -388,10 +390,13 @@ class Game: points = [] # By default, use the existing frontline conflict position - for conflict in self.theater.conflicts(): - points.append(Conflict.frontline_position(self.theater, conflict[0], conflict[1])[0]) - points.append(conflict[0].position) - points.append(conflict[1].position) + for front_line in self.theater.conflicts(): + position = Conflict.frontline_position(self.theater, + front_line.control_point_a, + front_line.control_point_b) + points.append(position[0]) + points.append(front_line.control_point_a.position) + points.append(front_line.control_point_b.position) # If there is no conflict take the center point between the two nearest opposing bases if len(points) == 0: diff --git a/game/operation/operation.py b/game/operation/operation.py index 3c32210c..4b738c1f 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -253,7 +253,9 @@ class Operation: # Generate ground units on frontline everywhere jtacs: List[JtacInfo] = [] - for player_cp, enemy_cp in self.game.theater.conflicts(True): + for front_line in self.game.theater.conflicts(True): + player_cp = front_line.control_point_a + enemy_cp = front_line.control_point_b conflict = Conflict.frontline_cas_conflict(self.attacker_name, self.defender_name, self.current_mission.country(self.attacker_country), self.current_mission.country(self.defender_country), diff --git a/gen/briefinggen.py b/gen/briefinggen.py index 63f29396..bd9acf0d 100644 --- a/gen/briefinggen.py +++ b/gen/briefinggen.py @@ -194,14 +194,10 @@ class BriefingGenerator(MissionInfoGenerator): conflict_number = 0 - for c in self.game.theater.conflicts(): + for front_line in self.game.theater.conflicts(from_player=True): conflict_number = conflict_number + 1 - if c[0].captured: - player_base = c[0] - enemy_base = c[1] - else: - player_base = c[1] - enemy_base = c[0] + player_base = front_line.control_point_a + enemy_base = front_line.control_point_b has_numerical_superiority = player_base.base.total_armor > enemy_base.base.total_armor self.description += self.__random_frontline_sentence(player_base.name, enemy_base.name) diff --git a/gen/visualgen.py b/gen/visualgen.py index 5bc315e5..efd0c1f9 100644 --- a/gen/visualgen.py +++ b/gen/visualgen.py @@ -98,7 +98,9 @@ class VisualGenerator: self.game = game def _generate_frontline_smokes(self): - for from_cp, to_cp in self.game.theater.conflicts(): + for front_line in self.game.theater.conflicts(): + from_cp = front_line.control_point_a + to_cp = front_line.control_point_b if from_cp.is_global or to_cp.is_global: continue diff --git a/theater/conflicttheater.py b/theater/conflicttheater.py index 4339236b..4095f2aa 100644 --- a/theater/conflicttheater.py +++ b/theater/conflicttheater.py @@ -1,7 +1,6 @@ from __future__ import annotations -import json -from typing import Any, Dict, Iterator, List, Optional, Tuple +from typing import Any, Dict, Iterator, List, Optional, Tuple, TYPE_CHECKING from dcs.mapping import Point from dcs.terrain import ( @@ -17,6 +16,9 @@ from dcs.terrain.terrain import Terrain from .controlpoint import ControlPoint from .landmap import Landmap, load_landmap, poly_contains +if TYPE_CHECKING: + from . import FrontLine + SIZE_TINY = 150 SIZE_SMALL = 600 SIZE_REGULAR = 1000 @@ -125,10 +127,11 @@ class ConflictTheater: def player_points(self) -> List[ControlPoint]: return [point for point in self.controlpoints if point.captured] - def conflicts(self, from_player=True) -> Iterator[Tuple[ControlPoint, ControlPoint]]: + def conflicts(self, from_player=True) -> Iterator[FrontLine]: + from . import FrontLine # Circular import that needs to be resolved. for cp in [x for x in self.controlpoints if x.captured == from_player]: for connected_point in [x for x in cp.connected_points if x.captured != from_player]: - yield cp, connected_point + yield FrontLine(cp, connected_point) def enemy_points(self) -> List[ControlPoint]: return [point for point in self.controlpoints if not point.captured] From bfc602f22f9fc3cc7b191d91e2a66b90d6e87e05 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 24 Oct 2020 13:06:37 -0700 Subject: [PATCH 16/29] Add cheat option to capture bases. Capturing bases is sometimes really annoying because of the DCS unit AI and our non-optimal ground victory heuristics. Add a cheat option to allow the player to move on without the tedium. --- game/event/event.py | 16 +++----------- game/game.py | 17 ++++++++------- qt_ui/widgets/map/QMapControlPoint.py | 26 +++++++++++++++++++++++ qt_ui/widgets/map/QMapObject.py | 5 +++++ theater/base.py | 3 +++ theater/controlpoint.py | 30 ++++++++++++++++++++++++++- 6 files changed, 76 insertions(+), 21 deletions(-) diff --git a/game/event/event.py b/game/event/event.py index 8f7ac1b8..e6b7d142 100644 --- a/game/event/event.py +++ b/game/event/event.py @@ -195,29 +195,19 @@ class Event: if cp.id == id: if cp.captured and new_owner_coalition != coalition: - cp.captured = False + for_player = False info = Information(cp.name + " lost !", "The ennemy took control of " + cp.name + "\nShame on us !", self.game.turn) self.game.informations.append(info) - pname = self.game.enemy_name captured_cps.append(cp) elif not(cp.captured) and new_owner_coalition == coalition: - cp.captured = True + for_player = True info = Information(cp.name + " captured !", "We took control of " + cp.name + "! Great job !", self.game.turn) self.game.informations.append(info) - pname = self.game.player_name captured_cps.append(cp) else: continue - cp.base.aircraft = {} - cp.base.armor = {} - - airbase_def_id = 0 - for g in cp.ground_objects: - g.groups = [] - if g.airbase_group and pname != "": - generate_airbase_defense_group(airbase_def_id, g, pname, self.game, cp) - airbase_def_id = airbase_def_id + 1 + cp.capture(self.game, for_player) for cp in captured_cps: logging.info("Will run redeploy for " + cp.name) diff --git a/game/game.py b/game/game.py index 2b8f7689..e75808a2 100644 --- a/game/game.py +++ b/game/game.py @@ -237,10 +237,10 @@ class Game: if not hasattr(self, "conditions"): self.conditions = self.generate_conditions() - def pass_turn(self, no_action=False): + def pass_turn(self, no_action: bool = False) -> None: logging.info("Pass turn") self.informations.append(Information("End of turn #" + str(self.turn), "-" * 40, 0)) - self.turn = self.turn + 1 + self.turn += 1 for event in self.events: if self.settings.version == "dev": @@ -261,6 +261,14 @@ class Game: if not cp.is_carrier and not cp.is_lha: cp.base.affect_strength(-PLAYER_BASE_STRENGTH_RECOVERY) + self.conditions = self.generate_conditions() + + self.initialize_turn() + + # Autosave progress + persistency.autosave(self) + + def initialize_turn(self) -> None: self.events = [] self._generate_events() @@ -271,8 +279,6 @@ class Game: for cp in self.theater.controlpoints: self.aircraft_inventory.set_from_control_point(cp) - self.conditions = self.generate_conditions() - # Plan flights & combat for next turn self.__culling_points = self.compute_conflicts_position() self.ground_planners = {} @@ -286,9 +292,6 @@ class Game: gplanner.plan_groundwar() self.ground_planners[cp.id] = gplanner - # Autosave progress - persistency.autosave(self) - def _enemy_reinforcement(self): """ Compute and commision reinforcement for enemy bases diff --git a/qt_ui/widgets/map/QMapControlPoint.py b/qt_ui/widgets/map/QMapControlPoint.py index ef9bf5c9..d90a973d 100644 --- a/qt_ui/widgets/map/QMapControlPoint.py +++ b/qt_ui/widgets/map/QMapControlPoint.py @@ -1,6 +1,7 @@ from typing import Optional from PySide2.QtGui import QColor, QPainter +from PySide2.QtWidgets import QAction, QMenu import qt_ui.uiconstants as const from qt_ui.models import GameModel @@ -8,6 +9,7 @@ from qt_ui.windows.basemenu.QBaseMenu2 import QBaseMenu2 from theater import ControlPoint from .QMapObject import QMapObject from ...displayoptions import DisplayOptions +from ...windows.GameUpdateSignal import GameUpdateSignal class QMapControlPoint(QMapObject): @@ -20,6 +22,9 @@ class QMapControlPoint(QMapObject): self.setZValue(1) self.setToolTip(self.control_point.name) self.base_details_dialog: Optional[QBaseMenu2] = None + self.capture_action = QAction( + f"CHEAT: Capture {self.control_point.name}") + self.capture_action.triggered.connect(self.cheat_capture) def paint(self, painter, option, widget=None) -> None: if DisplayOptions.control_points: @@ -64,3 +69,24 @@ class QMapControlPoint(QMapObject): self.game_model ) self.base_details_dialog.show() + + def add_context_menu_actions(self, menu: QMenu) -> None: + if self.control_point.is_fleet: + return + + if self.control_point.captured: + return + + for connected in self.control_point.connected_points: + if connected.captured: + break + else: + return + + menu.addAction(self.capture_action) + + def cheat_capture(self) -> None: + self.control_point.capture(self.game_model.game, for_player=True) + # Reinitialized ground planners and the like. + self.game_model.game.initialize_turn() + GameUpdateSignal.get_instance().updateGame(self.game_model.game) diff --git a/qt_ui/widgets/map/QMapObject.py b/qt_ui/widgets/map/QMapObject.py index c98cce5e..fa28c333 100644 --- a/qt_ui/widgets/map/QMapObject.py +++ b/qt_ui/widgets/map/QMapObject.py @@ -37,6 +37,9 @@ class QMapObject(QGraphicsRectItem): if event.button() == Qt.LeftButton: self.on_click() + def add_context_menu_actions(self, menu: QMenu) -> None: + pass + def contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent) -> None: menu = QMenu("Menu", self.parent) @@ -48,6 +51,8 @@ class QMapObject(QGraphicsRectItem): new_package_action.triggered.connect(self.open_new_package_dialog) menu.addAction(new_package_action) + self.add_context_menu_actions(menu) + menu.exec_(event.screenPos()) @property diff --git a/theater/base.py b/theater/base.py index 4ca5dec7..47b3580e 100644 --- a/theater/base.py +++ b/theater/base.py @@ -148,6 +148,9 @@ class Base: elif self.strength <= 0: self.strength = BASE_MIN_STRENGTH + def set_strength_to_minimum(self) -> None: + self.strength = BASE_MIN_STRENGTH + def scramble_count(self, multiplier: float, task: Task = None) -> int: if task: count = sum([v for k, v in self.aircraft.items() if db.unit_task(k) == task]) diff --git a/theater/controlpoint.py b/theater/controlpoint.py index 6f520bd1..96f2c060 100644 --- a/theater/controlpoint.py +++ b/theater/controlpoint.py @@ -1,5 +1,7 @@ +from __future__ import annotations + import re -from typing import Dict, List +from typing import Dict, List, TYPE_CHECKING from enum import Enum from dcs.mapping import Point @@ -17,6 +19,9 @@ from .base import Base from .missiontarget import MissionTarget from .theatergroundobject import TheaterGroundObject +if TYPE_CHECKING: + from game import Game + class ControlPointType(Enum): AIRBASE = 0 # An airbase with slots for everything @@ -207,3 +212,26 @@ class ControlPoint(MissionTarget): def is_friendly(self, to_player: bool) -> bool: return self.captured == to_player + + def capture(self, game: Game, for_player: bool) -> None: + if for_player: + self.captured = True + faction_name = game.player_name + else: + self.captured = False + faction_name = game.enemy_name + + self.base.set_strength_to_minimum() + + self.base.aircraft = {} + self.base.armor = {} + + # Handle cyclic dependency. + from .start_generator import generate_airbase_defense_group + airbase_def_id = 0 + for ground_object in self.ground_objects: + ground_object.groups = [] + if ground_object.airbase_group and faction_name != "": + generate_airbase_defense_group(airbase_def_id, ground_object, + faction_name, game, self) + airbase_def_id = airbase_def_id + 1 From 98bb1a9f653854949df997bba87c6451fe0c692b Mon Sep 17 00:00:00 2001 From: Walter Date: Sat, 24 Oct 2020 12:41:53 -0500 Subject: [PATCH 17/29] Explicit message for confirm_no_client_launch --- qt_ui/widgets/QTopPanel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt_ui/widgets/QTopPanel.py b/qt_ui/widgets/QTopPanel.py index dadbee0d..7b7f3ec6 100644 --- a/qt_ui/widgets/QTopPanel.py +++ b/qt_ui/widgets/QTopPanel.py @@ -156,7 +156,9 @@ class QTopPanel(QFrame): "Packages panel on the left of the main window, and then a flight " "from the Flights panel below the Packages panel. The edit button " "below the Flights panel will allow you to edit the number of " - "client slots in the flight. Each client slot allows one player."), + "client slots in the flight. Each client slot allows one player.
    " + "
    Click 'Yes' to continue with an AI only mission" + "
    Click 'No' if you'd like to make more changes."), QMessageBox.No, QMessageBox.Yes ) From 743534bdda3ba64965bf4d0834be7177297b917d Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 23:35:39 +0200 Subject: [PATCH 18/29] Migrated latest factions to new faction json format. --- game/factions/syria.py | 296 ------------------ game/factions/uae_2005.py | 58 ---- game/factions/uk_1944.py | 57 ---- game/factions/uk_1990.py | 74 ----- game/factions/ukraine_2010.py | 79 ----- game/factions/us_aggressors.py | 108 ------- game/factions/usa_1944.py | 100 ------ game/factions/usa_1955.py | 51 --- game/factions/usa_1960.py | 57 ---- game/factions/usa_1965.py | 60 ---- game/factions/usa_1990.py | 99 ------ game/factions/usa_2005.py | 109 ------- resources/factions/allies_1944.json | 65 ++++ resources/factions/syria_1948.json | 49 +++ resources/factions/syria_1967.json | 59 ++++ .../factions/syria_1967_with_ww2_weapons.json | 64 ++++ resources/factions/syria_1973.json | 63 ++++ resources/factions/syria_1982.json | 65 ++++ resources/factions/syria_2011.json | 81 +++++ resources/factions/uae_2005.json | 47 +++ resources/factions/uk_1944.json | 60 ++++ resources/factions/uk_1990.json | 70 +++++ resources/factions/ukraine_2010.json | 59 ++++ resources/factions/us_aggressors.json | 62 ++++ resources/factions/usa_1944.json | 59 ++++ resources/factions/usa_1955.json | 36 +++ resources/factions/usa_1960.json | 33 ++ resources/factions/usa_1965.json | 36 +++ resources/factions/usa_1975.json | 40 +++ 29 files changed, 948 insertions(+), 1148 deletions(-) delete mode 100644 game/factions/syria.py delete mode 100644 game/factions/uae_2005.py delete mode 100644 game/factions/uk_1944.py delete mode 100644 game/factions/uk_1990.py delete mode 100644 game/factions/ukraine_2010.py delete mode 100644 game/factions/us_aggressors.py delete mode 100644 game/factions/usa_1944.py delete mode 100644 game/factions/usa_1955.py delete mode 100644 game/factions/usa_1960.py delete mode 100644 game/factions/usa_1965.py delete mode 100644 game/factions/usa_1990.py delete mode 100644 game/factions/usa_2005.py create mode 100644 resources/factions/allies_1944.json create mode 100644 resources/factions/syria_1948.json create mode 100644 resources/factions/syria_1967.json create mode 100644 resources/factions/syria_1967_with_ww2_weapons.json create mode 100644 resources/factions/syria_1973.json create mode 100644 resources/factions/syria_1982.json create mode 100644 resources/factions/syria_2011.json create mode 100644 resources/factions/uae_2005.json create mode 100644 resources/factions/uk_1944.json create mode 100644 resources/factions/uk_1990.json create mode 100644 resources/factions/ukraine_2010.json create mode 100644 resources/factions/us_aggressors.json create mode 100644 resources/factions/usa_1944.json create mode 100644 resources/factions/usa_1955.json create mode 100644 resources/factions/usa_1960.json create mode 100644 resources/factions/usa_1965.json create mode 100644 resources/factions/usa_1975.json diff --git a/game/factions/syria.py b/game/factions/syria.py deleted file mode 100644 index f7017e86..00000000 --- a/game/factions/syria.py +++ /dev/null @@ -1,296 +0,0 @@ -from dcs.helicopters import ( - Mi_24V, - Mi_8MT, - SA342L, - SA342M, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - L_39ZA, - MiG_15bis, - MiG_19P, - MiG_21Bis, - MiG_23MLD, - MiG_25PD, - MiG_29S, - SpitfireLFMkIX, - SpitfireLFMkIXCW, - Su_17M4, - Su_24M, - Yak_40, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -Syria_2011 = { - "country": "Syria", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_23MLD, - MiG_25PD, - MiG_29S, - - Su_17M4, - Su_24M, - - L_39ZA, - - Mi_24V, - Mi_8MT, - SA342M, - SA342L, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - A_50, - - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_3_S_125_LN_5P73, - AirDefence.SAM_SA_2_LN_SM_90, - AirDefence.SAM_SA_8_Osa_9A33, - AirDefence.SAM_SA_11_Buk_LN_9A310M1, - AirDefence.SAM_SA_10_S_300PS_LN_5P85C, - - Armor.IFV_BMP_1, - Armor.IFV_BMP_2, - Armor.APC_BTR_80, - Armor.ARV_BRDM_2, - Armor.APC_MTLB, - Armor.APC_Cobra, - Armor.MBT_T_55, - Armor.MBT_T_72B, - Armor.MBT_T_90, - Artillery.MLRS_BM_21_Grad, - Artillery.MLRS_9K57_Uragan_BM_27, - Artillery.SPH_2S1_Gvozdika, - Artillery.SPH_2S9_Nona, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Paratrooper_RPG_16, - Infantry.Soldier_AK - - ], - "shorad": [ - AirDefence.SAM_SA_8_Osa_9A33, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3, - AirDefence.SAM_SA_9_Strela_1_9P31, - AirDefence.SAM_SA_19_Tunguska_2S6, - AirDefence.AAA_ZU_23_on_Ural_375, - ], "boat": [ - "GrishaGroupGenerator", "MolniyaGroupGenerator" - ] -} - -Syria_1973 = { - "country": "Syria", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_19P, - MiG_15bis, # Standing as Mig-17 - - Su_17M4, # Standing as Su-7 - Mi_8MT, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_3_S_125_LN_5P73, - AirDefence.SAM_SA_2_LN_SM_90, - - Armor.IFV_BMP_1, - Armor.APC_MTLB, - Armor.MBT_T_55, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Paratrooper_RPG_16, - Infantry.Soldier_AK - - ], - "shorad": [ - AirDefence.AAA_ZU_23_on_Ural_375, - ], "boat": [ - "GrishaGroupGenerator" - ] -} - - -Syria_1982 = { - "country": "Syria", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_23MLD, - MiG_25PD, - MiG_19P, - - Su_17M4, # Standing as Su-7 - Mi_8MT, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - AirDefence.SAM_SA_6_Kub_LN_2P25, - AirDefence.SAM_SA_3_S_125_LN_5P73, - AirDefence.SAM_SA_2_LN_SM_90, - - Armor.IFV_BMP_1, - Armor.APC_MTLB, - Armor.MBT_T_55, - Armor.MBT_T_72B, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Paratrooper_RPG_16, - Infantry.Soldier_AK - - ], - "shorad": [ - AirDefence.AAA_ZU_23_on_Ural_375, - ], "boat": [ - "GrishaGroupGenerator" - ] -} - - -Syria_1967 = { - "country": "Syria", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_19P, - MiG_15bis, # Standing as Mig-17 - - Su_17M4, # Standing as Su-7 - Mi_8MT, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - AirDefence.SAM_SA_2_LN_SM_90, - - Armor.ARV_BRDM_2, - Armor.MBT_T_55, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Paratrooper_RPG_16, - Infantry.Soldier_AK - - ], - "shorad": [ - AirDefence.AAA_ZU_23_on_Ural_375, - ], "boat": [ - "GrishaGroupGenerator" - ] -} - -Syria_1967_WW2_Weapons = { - "country": "Syria", - "side": "red", - "units": [ - - MiG_21Bis, - MiG_19P, - MiG_15bis, # Standing as Mig-17 - - Su_17M4, # Standing as Su-7 - Mi_8MT, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - - AirDefence.SAM_SA_2_LN_SM_90, - - Armor.ARV_BRDM_2, - Armor.MBT_T_55, - Armor.MT_Pz_Kpfw_IV_Ausf_H, - Armor.StuG_III_Ausf__G, - Armor.TD_Jagdpanzer_IV, - Artillery.MLRS_BM_21_Grad, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Soldier_RPG, - Infantry.Soldier_AK - - ], "requirements": { - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "shorad": [ - AirDefence.AAA_ZU_23_on_Ural_375, - ], "boat": [ - "GrishaGroupGenerator" - ] -} - -Arab_Armies_1948 = { - "country": "Syria", - "side": "red", - "units": [ - SpitfireLFMkIX, - SpitfireLFMkIXCW, - - AirDefence.SAM_SA_2_LN_SM_90, - - Armor.MT_M4_Sherman, - Armor.MT_Pz_Kpfw_IV_Ausf_H, - Armor.APC_Sd_Kfz_251, - Armor.IFV_Sd_Kfz_234_2_Puma, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - - Infantry.Infantry_SMLE_No_4_Mk_1, - - AirDefence.AAA_8_8cm_Flak_36, - - ], "requirements": { - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "shorad": [ - AirDefence.AAA_8_8cm_Flak_36, - ], "boat": [ - "GrishaGroupGenerator" - ] -} diff --git a/game/factions/uae_2005.py b/game/factions/uae_2005.py deleted file mode 100644 index d6240332..00000000 --- a/game/factions/uae_2005.py +++ /dev/null @@ -1,58 +0,0 @@ -from dcs.helicopters import ( - AH_64D, -) -from dcs.planes import ( - C_130, - E_3A, - F_16C_50, - KC130, - KC_135, - M_2000C, - Mirage_2000_5, - WingLoong_I, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -UAE_2005 = { - "country": "United Arab Emirates", - "side": "blue", - "units":[ - M_2000C, - Mirage_2000_5, - F_16C_50, - - KC_135, - KC130, - C_130, - E_3A, - - AH_64D, - - Armor.MBT_Leclerc, - Armor.IFV_BMP_3, - Armor.TPz_Fuchs, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.Rapier_FSA_Launcher, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "boat":[ - "OliverHazardPerryGroupGenerator" - ], - "has_jtac": True, - "jtac_unit": WingLoong_I -} \ No newline at end of file diff --git a/game/factions/uk_1944.py b/game/factions/uk_1944.py deleted file mode 100644 index 2620fc86..00000000 --- a/game/factions/uk_1944.py +++ /dev/null @@ -1,57 +0,0 @@ -from dcs.planes import ( - A_20G, - B_17G, - P_47D_30, - P_51D, - P_51D_30_NA, - SpitfireLFMkIX, - SpitfireLFMkIXCW, -) -from dcs.ships import LCVP__Higgins_boat, LST_Mk_II, LS_Samuel_Chase -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -from game.data.building_data import WW2_ALLIES_BUILDINGS -from game.data.doctrine import WWII_DOCTRINE - -UK_1944 = { - "country": "UK", - "side": "blue", - "units": [ - P_51D, - P_51D_30_NA, - P_47D_30, - SpitfireLFMkIX, - SpitfireLFMkIXCW, - A_20G, - B_17G, - - Armor.MT_M4A4_Sherman_Firefly, - Armor.MT_M4_Sherman, - Armor.APC_M2A1, - Armor.CT_Cromwell_IV, - Armor.ST_Centaur_IV, - Armor.HIT_Churchill_VII, - - Infantry.Infantry_SMLE_No_4_Mk_1, - - LS_Samuel_Chase, - LST_Mk_II, - LCVP__Higgins_boat, - - Unarmed.CCKW_353, - AirDefence.AAA_Bofors_40mm, - ], "shorad":[ - AirDefence.AAA_Bofors_40mm, - ],"requirements":{ - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "objects": WW2_ALLIES_BUILDINGS, - "doctrine": WWII_DOCTRINE, - "boat": ["WW2LSTGroupGenerator"], - "boat_count": 1 -} \ No newline at end of file diff --git a/game/factions/uk_1990.py b/game/factions/uk_1990.py deleted file mode 100644 index 242fea63..00000000 --- a/game/factions/uk_1990.py +++ /dev/null @@ -1,74 +0,0 @@ -from dcs.helicopters import ( - AH_64A, - SA342M, -) -from dcs.planes import ( - AV8BNA, - C_130, - E_3A, - F_4E, - KC130, - KC_135, - Tornado_GR4, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -UnitedKingdom_1990 = { - "country": "UK", - "side": "blue", - "units":[ - AV8BNA, # Standing as BAE Harrier 2 - Tornado_GR4, - F_4E, - - KC_135, - KC130, - C_130, - E_3A, - - SA342M, - AH_64A, - - Armor.MBT_Challenger_II, - Armor.IFV_MCV_80, - Armor.APC_M1043_HMMWV_Armament, - Armor.ATGM_M1045_HMMWV_TOW, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.Rapier_FSA_Launcher, - AirDefence.SAM_Avenger_M1097, # Standing as Starstreak - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - ], "cruiser": [ - Ticonderoga_class, - ], "helicopter_carrier_names": [ - "HMS Invincible", - "HMS Illustrious", - "HMS Ark Royal", - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/ukraine_2010.py b/game/factions/ukraine_2010.py deleted file mode 100644 index de030137..00000000 --- a/game/factions/ukraine_2010.py +++ /dev/null @@ -1,79 +0,0 @@ -from dcs.helicopters import ( - Mi_24V, - Mi_8MT, -) -from dcs.planes import ( - A_50, - An_26B, - An_30M, - IL_76MD, - IL_78M, - L_39ZA, - MiG_29S, - Su_24M, - Su_25, - Su_25T, - Su_27, - Yak_40, -) -from dcs.ships import ( - Bulk_cargo_ship_Yakushev, - CV_1143_5_Admiral_Kuznetsov, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -Ukraine_2010 = { - "country": "Ukraine", - "side": "blue", - "units": [ - Su_25, - Su_25T, - Su_24M, - Su_27, - MiG_29S, - L_39ZA, - - IL_76MD, - IL_78M, - An_26B, - An_30M, - Yak_40, - A_50, - - Mi_8MT, - Mi_24V, - - AirDefence.SAM_SA_3_S_125_LN_5P73, - AirDefence.SAM_SA_11_Buk_LN_9A310M1, - AirDefence.SAM_SA_10_S_300PS_LN_5P85C, - - Armor.APC_M1043_HMMWV_Armament, - Armor.IFV_BMP_3, - Armor.IFV_BMP_2, - Armor.APC_BTR_80, - Armor.MBT_T_80U, - Armor.MBT_T_72B, - - Unarmed.Transport_Ural_375, - Unarmed.Transport_UAZ_469, - Infantry.Soldier_AK, - CV_1143_5_Admiral_Kuznetsov, - Bulk_cargo_ship_Yakushev, - Dry_cargo_ship_Ivanov, - Tanker_Elnya_160, - ], - "shorad":[ - AirDefence.SAM_SA_19_Tunguska_2S6, - AirDefence.SAM_SA_13_Strela_10M3_9A35M3, - AirDefence.AAA_ZU_23_on_Ural_375 - ], "boat":[ - "GrishaGroupGenerator" - ] -} \ No newline at end of file diff --git a/game/factions/us_aggressors.py b/game/factions/us_aggressors.py deleted file mode 100644 index bf85653f..00000000 --- a/game/factions/us_aggressors.py +++ /dev/null @@ -1,108 +0,0 @@ -from dcs.helicopters import ( - AH_64D, - Ka_50, - SA342L, - SA342M, - UH_1H, -) -from dcs.planes import ( - B_1B, - B_52H, - C_130, - E_3A, - FA_18C_hornet, - F_15C, - F_15E, - F_16C_50, - F_5E_3, - KC130, - KC_135, - Su_27, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, - USS_Arleigh_Burke_IIa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -US_Aggressors = { - "country": "USAF Aggressors", - "side": "red", - "units": [ - - F_15C, - F_15E, - F_5E_3, - FA_18C_hornet, - F_16C_50, - Su_27, - - B_1B, - B_52H, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - AH_64D, - Ka_50, - SA342M, - SA342L, - - Armor.MBT_M1A2_Abrams, - Armor.MBT_Leopard_2, - Armor.ATGM_M1134_Stryker, - Armor.IFV_M2A2_Bradley, - Armor.APC_M1043_HMMWV_Armament, - - Artillery.MLRS_M270, - Artillery.SPH_M109_Paladin, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Patriot_EPP_III, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.SAM_Avenger_M1097, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "CVN-71 Theodore Roosevelt", - "CVN-72 Abraham Lincoln", - "CVN-73 George Washington", - "CVN-74 John C. Stennis", - ], "helicopter_carrier_names": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ] -} diff --git a/game/factions/usa_1944.py b/game/factions/usa_1944.py deleted file mode 100644 index 7b99bd42..00000000 --- a/game/factions/usa_1944.py +++ /dev/null @@ -1,100 +0,0 @@ -from dcs.planes import ( - A_20G, - B_17G, - P_47D_30, - P_51D, - P_51D_30_NA, - SpitfireLFMkIX, - SpitfireLFMkIXCW, -) -from dcs.ships import LCVP__Higgins_boat, LST_Mk_II, LS_Samuel_Chase -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -from game.data.building_data import WW2_ALLIES_BUILDINGS -from game.data.doctrine import WWII_DOCTRINE - -USA_1944 = { - "country": "USA", - "side": "blue", - "units": [ - P_51D, - P_51D_30_NA, - P_47D_30, - A_20G, - B_17G, - - Armor.MT_M4_Sherman, - Armor.M30_Cargo_Carrier, - Armor.APC_M2A1, - Armor.LAC_M8_Greyhound, - Armor.TD_M10_GMC, - Artillery.M12_GMC, - - Infantry.Infantry_M1_Garand, - - LS_Samuel_Chase, - LST_Mk_II, - LCVP__Higgins_boat, - - Unarmed.CCKW_353, - AirDefence.AAA_Bofors_40mm, - ], "shorad":[ - AirDefence.AAA_Bofors_40mm, - ],"requirements":{ - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "objects": WW2_ALLIES_BUILDINGS, - "doctrine": WWII_DOCTRINE, - "boat": ["WW2LSTGroupGenerator"], - "boat_count": 2 -} - -ALLIES_1944 = { - "country": "USA", - "side": "blue", - "units": [ - P_51D, - P_51D_30_NA, - P_47D_30, - SpitfireLFMkIX, - SpitfireLFMkIXCW, - A_20G, - B_17G, - - Armor.MT_M4_Sherman, - Armor.MT_M4A4_Sherman_Firefly, - Armor.CT_Cromwell_IV, - Armor.M30_Cargo_Carrier, - Armor.APC_M2A1, - Armor.CT_Cromwell_IV, - Armor.ST_Centaur_IV, - Armor.HIT_Churchill_VII, - Armor.LAC_M8_Greyhound, - Armor.TD_M10_GMC, - Artillery.M12_GMC, - - Infantry.Infantry_M1_Garand, - Infantry.Infantry_SMLE_No_4_Mk_1, - - LS_Samuel_Chase, - LST_Mk_II, - LCVP__Higgins_boat, - - Unarmed.CCKW_353, - AirDefence.AAA_Bofors_40mm, - ], "shorad":[ - AirDefence.AAA_Bofors_40mm, - ],"requirements":{ - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", - }, - "objects": WW2_ALLIES_BUILDINGS, - "doctrine": WWII_DOCTRINE, - "boat": ["WW2LSTGroupGenerator"], - "boat_count": 2 -} \ No newline at end of file diff --git a/game/factions/usa_1955.py b/game/factions/usa_1955.py deleted file mode 100644 index bbafc9c4..00000000 --- a/game/factions/usa_1955.py +++ /dev/null @@ -1,51 +0,0 @@ -from dcs.planes import ( - B_52H, - C_130, - E_3A, - F_86F_Sabre, - KC130, - KC_135, - P_51D, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -USA_1955 = { - "country": "USA", - "side": "blue", - "units": [ - F_86F_Sabre, - P_51D, - - B_52H, - - KC_135, - KC130, - C_130, - E_3A, - - Armor.MT_M4A4_Sherman_Firefly, - Armor.MT_M4_Sherman, - Armor.MBT_M60A3_Patton, - Armor.APC_M2A1, - Armor.M30_Cargo_Carrier, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - - AirDefence.AAA_Bofors_40mm, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ] -} \ No newline at end of file diff --git a/game/factions/usa_1960.py b/game/factions/usa_1960.py deleted file mode 100644 index b87ec470..00000000 --- a/game/factions/usa_1960.py +++ /dev/null @@ -1,57 +0,0 @@ -from dcs.helicopters import ( - UH_1H, -) -from dcs.planes import ( - B_52H, - C_130, - E_3A, - F_86F_Sabre, - KC130, - KC_135, - P_51D, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -USA_1960 = { - "country": "USA", - "side": "blue", - "units": [ - F_86F_Sabre, - P_51D, - - B_52H, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.AAA_Vulcan_M163, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], - "shorad":[ - AirDefence.AAA_Vulcan_M163 - ] -} \ No newline at end of file diff --git a/game/factions/usa_1965.py b/game/factions/usa_1965.py deleted file mode 100644 index cba61391..00000000 --- a/game/factions/usa_1965.py +++ /dev/null @@ -1,60 +0,0 @@ -from dcs.helicopters import ( - UH_1H, -) -from dcs.planes import ( - B_52H, - C_130, - E_3A, - F_4E, - F_5E_3, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -USA_1965 = { - "country": "USA", - "side": "blue", - "units": [ - - F_5E_3, - F_4E, - - KC_135, - KC130, - C_130, - E_3A, - - B_52H, - - UH_1H, - - Armor.MBT_M60A3_Patton, - Armor.APC_M113, - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Chaparral_M48, - AirDefence.SAM_Hawk_PCP, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], - "shorad":[ - AirDefence.AAA_Vulcan_M163, - AirDefence.SAM_Chaparral_M48 - ], "boat":[ - ] -} \ No newline at end of file diff --git a/game/factions/usa_1990.py b/game/factions/usa_1990.py deleted file mode 100644 index 18bf576d..00000000 --- a/game/factions/usa_1990.py +++ /dev/null @@ -1,99 +0,0 @@ -from dcs.helicopters import ( - AH_64A, - UH_1H, -) -from dcs.planes import ( - AV8BNA, - A_10A, - B_1B, - B_52H, - C_130, - E_3A, - FA_18C_hornet, - F_117A, - F_14B, - F_15C, - F_15E, - F_16C_50, - KC130, - KC_135, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Oliver_Hazzard_Perry_class, - Ticonderoga_class, - USS_Arleigh_Burke_IIa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Infantry, - Unarmed, -) - -USA_1990 = { - "country": "USA", - "side": "blue", - "units": [ - F_15C, - F_15E, - F_14B, - FA_18C_hornet, - F_16C_50, - - A_10A, - AV8BNA, - - B_1B, - B_52H, - F_117A, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - AH_64A, - - Armor.MBT_M1A2_Abrams, - Armor.IFV_LAV_25, - Armor.APC_M1043_HMMWV_Armament, - Armor.ATGM_M1045_HMMWV_TOW, - Armor.ATGM_M1134_Stryker, - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad":[ - AirDefence.SAM_Avenger_M1097, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - Oliver_Hazzard_Perry_class, - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "CVN-72 Abraham Lincoln", - "CVN-73 Georges Washington", - "CVN-74 John C. Stennis", - ], "helicopter_carrier_names": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat":[ - "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" - ], "has_jtac": True -} \ No newline at end of file diff --git a/game/factions/usa_2005.py b/game/factions/usa_2005.py deleted file mode 100644 index d9c03b54..00000000 --- a/game/factions/usa_2005.py +++ /dev/null @@ -1,109 +0,0 @@ -from dcs.helicopters import ( - AH_64D, - UH_1H, -) -from dcs.planes import ( - AV8BNA, - A_10C, - A_10C_2, - B_1B, - B_52H, - C_130, - E_3A, - FA_18C_hornet, - F_117A, - F_14B, - F_15C, - F_15E, - F_16C_50, - KC130, - KC_135, - MQ_9_Reaper, -) -from dcs.ships import ( - Armed_speedboat, - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Ticonderoga_class, - USS_Arleigh_Burke_IIa, -) -from dcs.vehicles import ( - AirDefence, - Armor, - Artillery, - Infantry, - Unarmed, -) - -USA_2005 = { - "country": "USA", - "side": "blue", - "units": [ - F_15C, - F_15E, - F_14B, - FA_18C_hornet, - F_16C_50, - A_10C, - A_10C_2, - AV8BNA, - MQ_9_Reaper, - - B_1B, - B_52H, - F_117A, - - KC_135, - KC130, - C_130, - E_3A, - - UH_1H, - AH_64D, - - Armor.MBT_M1A2_Abrams, - Armor.ATGM_M1134_Stryker, - Armor.APC_M1126_Stryker_ICV, - Armor.IFV_M2A2_Bradley, - Armor.IFV_LAV_25, - Armor.APC_M1043_HMMWV_Armament, - Armor.ATGM_M1045_HMMWV_TOW, - - Artillery.MLRS_M270, - Artillery.SPH_M109_Paladin, - - Unarmed.Transport_M818, - Infantry.Infantry_M4, - Infantry.Soldier_M249, - - AirDefence.SAM_Hawk_PCP, - AirDefence.SAM_Patriot_EPP_III, - - CVN_74_John_C__Stennis, - LHA_1_Tarawa, - Armed_speedboat, - ], "shorad": [ - AirDefence.SAM_Avenger_M1097, - ], "aircraft_carrier": [ - CVN_74_John_C__Stennis, - ], "helicopter_carrier": [ - LHA_1_Tarawa, - ], "destroyer": [ - USS_Arleigh_Burke_IIa, - ], "cruiser": [ - Ticonderoga_class, - ], "carrier_names": [ - "CVN-71 Theodore Roosevelt", - "CVN-72 Abraham Lincoln", - "CVN-73 George Washington", - "CVN-74 John C. Stennis", - ], "helicopter_carrier_names": [ - "LHA-1 Tarawa", - "LHA-2 Saipan", - "LHA-3 Belleau Wood", - "LHA-4 Nassau", - "LHA-5 Peleliu" - ], "boat":[ - "ArleighBurkeGroupGenerator" - ], "has_jtac": True -} diff --git a/resources/factions/allies_1944.json b/resources/factions/allies_1944.json new file mode 100644 index 00000000..cc93ec03 --- /dev/null +++ b/resources/factions/allies_1944.json @@ -0,0 +1,65 @@ +{ + "country": "USA", + "name": "Allies 1944", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "P_51D", + "P_51D_30_NA", + "P_47D_30", + "SpitfireLFMkIX", + "SpitfireLFMkIXCW", + "A_20G", + "B_17G" + ], + "frontline_units": [ + "MT_M4A4_Sherman_Firefly", + "MT_M4_Sherman", + "APC_M2A1", + "CT_Cromwell_IV", + "ST_Centaur_IV", + "HIT_Churchill_VII", + "M30_Cargo_Carrier", + "LAC_M8_Greyhound", + "TD_M10_GMC" + ], + "artillery_units": [ + "M12_GMC" + ], + "logistics_units": [ + "Bedford_MWD", + "CCKW_353" + ], + "infantry_units": [ + "Infantry_SMLE_No_4_Mk_1", + "Infantry_M1_Garand" + ], + "shorads": [ + "BoforsGenerator" + ], + "sams": [ + "BoforsGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "WW2LSTGroupGenerator" + ], + "navy_group_count": 1, + "has_jtac": false, + "doctrine": "ww2", + "building_set": "ww2ally" +} diff --git a/resources/factions/syria_1948.json b/resources/factions/syria_1948.json new file mode 100644 index 00000000..a551cdcf --- /dev/null +++ b/resources/factions/syria_1948.json @@ -0,0 +1,49 @@ +{ + "country": "Syria", + "name": "Syria 1948", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "SpitfireLFMkIX", + "SpitfireLFMkIXCW" + ], + "frontline_units": [ + "IFV_Sd_Kfz_234_2_Puma", + "APC_Sd_Kfz_251", + "MT_Pz_Kpfw_IV_Ausf_H", + "MT_M4_Sherman" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_SMLE_No_4_Mk_1" + ], + "shorads": [ + "FlakGenerator" + ], + "sams": [ + "FlakGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "carrier_names": [ + ], + "navy_generators": [ + "SchnellbootGroupGenerator" + ], "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", + }, + "doctrine": "ww2" +} diff --git a/resources/factions/syria_1967.json b/resources/factions/syria_1967.json new file mode 100644 index 00000000..0a2eda52 --- /dev/null +++ b/resources/factions/syria_1967.json @@ -0,0 +1,59 @@ +{ + "country": "Syria", + "name": "Syria 1967", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_15bis", + "MiG_19P", + "MiG_21Bis", + "Su_17M4", + "Mi_8MT" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Soldier_RPG" + ], + "shorads": [ + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "SA2Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator" + ], + "doctrine": "coldwar" +} diff --git a/resources/factions/syria_1967_with_ww2_weapons.json b/resources/factions/syria_1967_with_ww2_weapons.json new file mode 100644 index 00000000..711fe859 --- /dev/null +++ b/resources/factions/syria_1967_with_ww2_weapons.json @@ -0,0 +1,64 @@ +{ + "country": "Syria", + "name": "Syria 1967 (With WW2 Weapons)", + "authors": "Khopa", + "description": "(Yes Syria was still using a few Panzer IV and Stug in Yom Kippur War)", + "aircrafts": [ + "MiG_15bis", + "MiG_19P", + "MiG_21Bis", + + "Su_17M4", + "Mi_8MT" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "ARV_BRDM_2", + "MBT_T_55", + "MT_Pz_Kpfw_IV_Ausf_H", + "StuG_III_Ausf__G", + "TD_Jagdpanzer_IV" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Soldier_RPG" + ], + "shorads": [ + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "SA2Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator" + ], "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", + }, + "doctrine": "coldwar" +} diff --git a/resources/factions/syria_1973.json b/resources/factions/syria_1973.json new file mode 100644 index 00000000..7d04ab52 --- /dev/null +++ b/resources/factions/syria_1973.json @@ -0,0 +1,63 @@ +{ + "country": "Syria", + "name": "Syria 1973", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_21Bis", + "MiG_19P", + "MiG_15bis", + "Su_17M4", + "Mi_8MT" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_1", + "APC_MTLB", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Soldier_RPG" + ], + "shorads": [ + "ZSU23Generator", + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator" + ], + "doctrine": "coldwar" +} diff --git a/resources/factions/syria_1982.json b/resources/factions/syria_1982.json new file mode 100644 index 00000000..30f53661 --- /dev/null +++ b/resources/factions/syria_1982.json @@ -0,0 +1,65 @@ +{ + "country": "Syria", + "name": "Syria 1982", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_19P", + "MiG_21Bis", + "MiG_23MLD", + "MiG_25PD", + "Su_17M4", + "Mi_8MT" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_1", + "APC_MTLB", + "MBT_T_55", + "MBT_T_72B" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorads": [ + "ZSU23Generator", + "ZU23Generator", + "ZU23Generator", + "ZU23UralGenerator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator" + ] +} diff --git a/resources/factions/syria_2011.json b/resources/factions/syria_2011.json new file mode 100644 index 00000000..a96f843c --- /dev/null +++ b/resources/factions/syria_2011.json @@ -0,0 +1,81 @@ +{ + "country": "Syria", + "name": "Syria 2011", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_21Bis", + "MiG_23MLD", + "MiG_25PD", + "MiG_29S", + "Su_17M4", + "Su_24M", + "L_39ZA", + "Mi_24V", + "Mi_8MT", + "SA342M", + "SA342L" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_1", + "IFV_BMP_2", + "APC_BTR_80", + "ARV_BRDM_2", + "APC_MTLB", + "APC_Cobra", + "MBT_T_55", + "MBT_T_72B", + "MBT_T_90" + ], + "artillery_units": [ + "MLRS_9K57_Uragan_BM_27", + "SPH_2S9_Nona", + "MLRS_BM_21_Grad", + "SPH_2S1_Gvozdika" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorads": [ + "SA8Generator", + "SA9Generator", + "SA13Generator", + "SA19Generator", + "ZSU23Generator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator", + "SA10Generator", + "SA11Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator", "MolniyaGroupGenerator" + ] +} diff --git a/resources/factions/uae_2005.json b/resources/factions/uae_2005.json new file mode 100644 index 00000000..125bbce7 --- /dev/null +++ b/resources/factions/uae_2005.json @@ -0,0 +1,47 @@ +{ + "country": "United Arab Emirates", + "name": "United Arab Emirates 2005", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "M_2000C", + "Mirage_2000_5", + "F_16C_50", + "AH_64D" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Leclerc", + "TPz_Fuchs", + "IFV_BMP_3" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "RapierGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "WingLoong_I" +} diff --git a/resources/factions/uk_1944.json b/resources/factions/uk_1944.json new file mode 100644 index 00000000..92c32f8c --- /dev/null +++ b/resources/factions/uk_1944.json @@ -0,0 +1,60 @@ +{ + "country": "UK", + "name": "United Kingdom 1944", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "P_51D", + "P_51D_30_NA", + "P_47D_30", + "SpitfireLFMkIX", + "SpitfireLFMkIXCW", + "A_20G", + "B_17G" + ], + "frontline_units": [ + "MT_M4A4_Sherman_Firefly", + "MT_M4_Sherman", + "APC_M2A1", + "CT_Cromwell_IV", + "ST_Centaur_IV", + "HIT_Churchill_VII" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Bedford_MWD", + "CCKW_353" + ], + "infantry_units": [ + "Infantry_SMLE_No_4_Mk_1" + ], + "shorads": [ + "BoforsGenerator" + ], + "sams": [ + "BoforsGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "WW2LSTGroupGenerator" + ], + "navy_group_count": 1, + "has_jtac": false, + "doctrine": "ww2", + "building_set": "ww2ally" +} diff --git a/resources/factions/uk_1990.json b/resources/factions/uk_1990.json new file mode 100644 index 00000000..9b274eeb --- /dev/null +++ b/resources/factions/uk_1990.json @@ -0,0 +1,70 @@ +{ + "country": "UK", + "name": "United Kingdom 1990", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "Tornado_GR4", + "AV8BNA", + "F_4E", + "SA342M", + "AH_64A" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_Challenger_II", + "IFV_MCV_80", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator", + "RapierGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + "HMS Invincible", + "HMS Illustrious", + "HMS Ark Royal" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator", + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} \ No newline at end of file diff --git a/resources/factions/ukraine_2010.json b/resources/factions/ukraine_2010.json new file mode 100644 index 00000000..872d3a7e --- /dev/null +++ b/resources/factions/ukraine_2010.json @@ -0,0 +1,59 @@ +{ + "country": "Ukraine", + "name": "Ukraine 2010", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "Su_25", + "Su_25T", + "Su_24M", + "Su_27", + "MiG_29S", + "L_39ZA", + "Mi_8MT", + "Mi_24V" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "APC_M1043_HMMWV_Armament", + "IFV_BMP_3", + "IFV_BMP_2", + "APC_BTR_80", + "MBT_T_80U", + "MBT_T_72B" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Paratrooper_AKS", + "Infantry_Soldier_Rus", + "Paratrooper_RPG_16" + ], + "shorads": [ + "SA9Generator", + "SA13Generator", + "SA19Generator" + ], + "sams": [ + "SA3Generator", + "SA10Generator", + "SA11Generator" + ], + "requirements": {}, + "carrier_names": [ + "Admiral Kuznetov", + "Admiral Gorshkov" + ], + "navy_generators": [ + "GrishaGroupGenerator" + ] +} diff --git a/resources/factions/us_aggressors.json b/resources/factions/us_aggressors.json new file mode 100644 index 00000000..340d6b19 --- /dev/null +++ b/resources/factions/us_aggressors.json @@ -0,0 +1,62 @@ +{ + "country": "USAF Aggressors", + "name": "USAF Aggressors", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_15C", + "F_15E", + "F_14B", + "FA_18C_hornet", + "F_16C_50", + "A_10A", + "A_10C", + "AV8BNA", + "UH_1H", + "AH_64D", + "Ka_50", + "B_52H", + "B_1B", + "F_117A", + "Su_27" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "MBT_Leopard_2", + "ATGM_M1134_Stryker", + "IFV_M2A2_Bradley", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator", + "PatriotGenerator" + ], + "requirements": {}, + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} \ No newline at end of file diff --git a/resources/factions/usa_1944.json b/resources/factions/usa_1944.json new file mode 100644 index 00000000..02bfdefa --- /dev/null +++ b/resources/factions/usa_1944.json @@ -0,0 +1,59 @@ +{ + "country": "USA", + "name": "USA 1944", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "P_51D", + "P_51D_30_NA", + "P_47D_30", + "SpitfireLFMkIX", + "A_20G", + "B_17G" + ], + "frontline_units": [ + "MT_M4A4_Sherman_Firefly", + "MT_M4_Sherman", + "APC_M2A1", + "M30_Cargo_Carrier", + "LAC_M8_Greyhound", + "TD_M10_GMC" + ], + "artillery_units": [ + "M12_GMC" + ], + "logistics_units": [ + "CCKW_353" + ], + "infantry_units": [ + "Infantry_M1_Garand" + ], + "shorads": [ + "BoforsGenerator" + ], + "sams": [ + "BoforsGenerator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "destroyers": [ + ], + "cruisers": [ + ], + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + }, + "carrier_names": [ + ], + "helicopter_carrier_names": [ + ], + "navy_generators": [ + "WW2LSTGroupGenerator" + ], + "navy_group_count": 1, + "has_jtac": false, + "doctrine": "ww2", + "building_set": "ww2ally" +} diff --git a/resources/factions/usa_1955.json b/resources/factions/usa_1955.json new file mode 100644 index 00000000..27749fe4 --- /dev/null +++ b/resources/factions/usa_1955.json @@ -0,0 +1,36 @@ +{ + "country": "USA", + "name": "USA 1955", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_86F_Sabre", + "P_51D", + "P_51D_30_NA", + "B_52H" + ], + "frontline_units": [ + "MT_M4A4_Sherman_Firefly", + "MT_M4_Sherman", + "MBT_M60A3_Patton", + "APC_M2A1" + ], + "artillery_units": [ + "M12_GMC" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M1_Garand" + ], + "shorads": [ + "BoforsGenerator" + ], + "sams": [ + "BoforsGenerator" + ], + "requirements": {}, + "doctrine": "ww2", + "building_set": "ww2ally" +} \ No newline at end of file diff --git a/resources/factions/usa_1960.json b/resources/factions/usa_1960.json new file mode 100644 index 00000000..7c2d762d --- /dev/null +++ b/resources/factions/usa_1960.json @@ -0,0 +1,33 @@ +{ + "country": "USA", + "name": "USA 1960", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_86F_Sabre", + "P_51D", + "P_51D_30_NA", + "B_52H", + "UH_1H" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4" + ], + "shorads": [ + "VulcanGenerator" + ], + "sams": [ + "VulcanGenerator" + ], + "requirements": {}, + "doctrine": "coldwar" +} \ No newline at end of file diff --git a/resources/factions/usa_1965.json b/resources/factions/usa_1965.json new file mode 100644 index 00000000..74171172 --- /dev/null +++ b/resources/factions/usa_1965.json @@ -0,0 +1,36 @@ +{ + "country": "USA", + "name": "USA 1965", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_5E_3", + "F_4E", + "B_52H", + "UH_1H" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "VulcanGenerator", + "ChaparralGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "requirements": {}, + "doctrine": "coldwar" +} \ No newline at end of file diff --git a/resources/factions/usa_1975.json b/resources/factions/usa_1975.json new file mode 100644 index 00000000..5c999a9e --- /dev/null +++ b/resources/factions/usa_1975.json @@ -0,0 +1,40 @@ +{ + "country": "USA", + "name": "USA 1975", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "F_5E_3", + "F_4E", + "F_14B", + "B_52H", + "UH_1H" + ], + "frontline_units": [ + "MBT_M60A3_Patton", + "APC_M113" + ], + "artillery_units": [ + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "VulcanGenerator", + "ChaparralGenerator" + ], + "sams": [ + "HawkGenerator", + "ChaparralGenerator" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "requirements": {}, + "doctrine": "coldwar" +} \ No newline at end of file From 901c89371cef75cacf904b4b5a28f36c815d7202 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 23:40:05 +0200 Subject: [PATCH 19/29] Fixed syntax errors in json files --- resources/factions/libya_2011.json | 129 +++++++++--------- resources/factions/syria_1948.json | 2 +- .../factions/syria_1967_with_ww2_weapons.json | 2 +- resources/factions/usa_1955.json | 6 +- 4 files changed, 69 insertions(+), 70 deletions(-) diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index e10b9060..6758167d 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -1,67 +1,64 @@ -"authors": "Khopa", -"description": "", "Libya", -"name": "Libya 2011", -"authors": "Khopa", -"description": "", -"aircrafts": [ -"MiG_21Bis", -"MiG_23MLD", -"Su_17M4", -"Su_24M", -"Mi_24V" -], -"awacs": [ -"A_50" -], -"tankers": [ -"IL_78M" -], -"frontline_units": [ -"IFV_BMP_1", -"ARV_BRDM_2", -"MBT_T_72B", -"MBT_T_55" -], -"artillery_units": [ -"MLRS_BM_21_Grad" -], -"logistics_units": [ -"Transport_Ural_375", -"Transport_UAZ_469" -], -"infantry_units": [ -"Infantry_Soldier_Insurgents", -"Paratrooper_RPG_16" -], -"shorads": [ -"HQ7Generator", -"SA8Generator", -"ZSU23Generator" -], -"sams": [ -"SA2Generator", -"SA3Generator", -"SA6Generator" -], -"aircraft_carrier": [ -], -"helicopter_carrier": [ -], -"helicopter_carrier_names": [ -], -"destroyers": [ -"FF_1135M_Rezky" -], -"cruisers": [ -"FSG_1241_1MP_Molniya" -], -"requirements": { -}, -"carrier_names": [ -], -"navy_generators": [ -"GrishaGroupGenerator", "MolniyaGroupGenerator" -], -"has_jtac": true, -"jtac_unit": "MQ_9_Reaper" +{ + "country": "Libya", + "name": "Libya 2011", + "authors": "Khopa", + "description": "", + "aircrafts": [ + "MiG_21Bis", + "MiG_23MLD", + "Su_17M4", + "Su_24M", + "Mi_24V" + ], + "awacs": [ + "A_50" + ], + "tankers": [ + "IL_78M" + ], + "frontline_units": [ + "IFV_BMP_1", + "ARV_BRDM_2", + "MBT_T_72B", + "MBT_T_55" + ], + "artillery_units": [ + "MLRS_BM_21_Grad" + ], + "logistics_units": [ + "Transport_Ural_375", + "Transport_UAZ_469" + ], + "infantry_units": [ + "Infantry_Soldier_Insurgents", + "Paratrooper_RPG_16" + ], + "shorads": [ + "HQ7Generator", + "SA8Generator", + "ZSU23Generator" + ], + "sams": [ + "SA2Generator", + "SA3Generator", + "SA6Generator" + ], + "aircraft_carrier": [ + ], + "helicopter_carrier": [ + ], + "helicopter_carrier_names": [ + ], + "destroyers": [ + "FF_1135M_Rezky" + ], + "cruisers": [ + "FSG_1241_1MP_Molniya" + ], + "requirements": {}, + "carrier_names": [ + ], + "navy_generators": [ + "GrishaGroupGenerator", "MolniyaGroupGenerator" + ] } diff --git a/resources/factions/syria_1948.json b/resources/factions/syria_1948.json index a551cdcf..d9693bf1 100644 --- a/resources/factions/syria_1948.json +++ b/resources/factions/syria_1948.json @@ -43,7 +43,7 @@ "navy_generators": [ "SchnellbootGroupGenerator" ], "requirements": { - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" }, "doctrine": "ww2" } diff --git a/resources/factions/syria_1967_with_ww2_weapons.json b/resources/factions/syria_1967_with_ww2_weapons.json index 711fe859..1a37b8c0 100644 --- a/resources/factions/syria_1967_with_ww2_weapons.json +++ b/resources/factions/syria_1967_with_ww2_weapons.json @@ -58,7 +58,7 @@ "navy_generators": [ "GrishaGroupGenerator" ], "requirements": { - "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/", + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" }, "doctrine": "coldwar" } diff --git a/resources/factions/usa_1955.json b/resources/factions/usa_1955.json index 27749fe4..3c5de408 100644 --- a/resources/factions/usa_1955.json +++ b/resources/factions/usa_1955.json @@ -30,7 +30,9 @@ "sams": [ "BoforsGenerator" ], - "requirements": {}, "doctrine": "ww2", - "building_set": "ww2ally" + "building_set": "ww2ally", + "requirements": { + "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" + } } \ No newline at end of file From 910af12fb9580c4ba053f838c275d62f1b72df3b Mon Sep 17 00:00:00 2001 From: Khopa Date: Sun, 25 Oct 2020 12:18:55 +0100 Subject: [PATCH 20/29] Default faction for bluefor is USA 2005. --- qt_ui/windows/newgame/QNewGameWizard.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index 04535aae..5fa06451 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -150,11 +150,15 @@ class FactionSelection(QtWidgets.QWizardPage): redFaction = QtWidgets.QLabel("Enemy Faction :") self.redFactionSelect = QtWidgets.QComboBox() + redFaction.setBuddy(self.redFactionSelect) + + # Setup default selected factions for i, r in enumerate(db.FACTIONS): self.redFactionSelect.addItem(r) - if r == "Russia 1990": # Default ennemy + if r == "Russia 1990": self.redFactionSelect.setCurrentIndex(i) - redFaction.setBuddy(self.redFactionSelect) + if r == "USA 2005": + self.blueFactionSelect.setCurrentIndex(i) self.blueSideRecap = QtWidgets.QLabel("") self.blueSideRecap.setFont(CONST.FONT_PRIMARY_I) From e1572c09ff611a38b6bc9484ead7f39ba8084810 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sun, 25 Oct 2020 14:08:11 +0100 Subject: [PATCH 21/29] Improved faction & faction loader typing. Fixed error with netherlands faction. --- game/db.py | 7 +- game/factions/faction.py | 105 ++++++++++------------- game/factions/faction_loader.py | 39 +++++---- resources/factions/netherlands_1990.json | 2 +- 4 files changed, 68 insertions(+), 85 deletions(-) diff --git a/game/db.py b/game/db.py index 23575771..e88f7b89 100644 --- a/game/db.py +++ b/game/db.py @@ -1,6 +1,6 @@ from datetime import datetime from enum import Enum -from typing import Any, Dict, List, Optional, Tuple, Type, Union +from typing import Dict, List, Optional, Tuple, Type, Union from dcs.countries import country_dict from dcs.helicopters import ( @@ -153,10 +153,9 @@ from dcs.vehicles import ( ) import pydcs_extensions.frenchpack.frenchpack as frenchpack -from game.factions import faction_loader from game.factions.faction import Faction - # PATCH pydcs data with MODS +from game.factions.faction_loader import FactionLoader from pydcs_extensions.a4ec.a4ec import A_4E_C from pydcs_extensions.mb339.mb339 import MB_339PAN from pydcs_extensions.rafale.rafale import Rafale_A_S, Rafale_M @@ -912,7 +911,7 @@ CARRIER_TAKEOFF_BAN: List[Type[FlyingType]] = [ Units separated by country. country : DCS Country name """ -FACTIONS: [Faction] = faction_loader.load_factions() +FACTIONS: [Faction] = FactionLoader.load_factions() CARRIER_TYPE_BY_PLANE = { FA_18C_hornet: CVN_74_John_C__Stennis, diff --git a/game/factions/faction.py b/game/factions/faction.py index 9bb5f8a0..e189bf77 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -1,11 +1,14 @@ +from __future__ import annotations + import logging -from dataclasses import dataclass -from typing import Optional +from dataclasses import dataclass, field +from typing import Optional, Dict, Type, List, Any import dcs +from dcs.countries import country_dict from dcs.planes import PlaneType, plane_map from dcs.unittype import VehicleType, UnitType -from dcs.vehicles import vehicle_map, Armor, Unarmed, Infantry, Fortification, Artillery, AirDefence +from dcs.vehicles import Armor, Unarmed, Infantry, Artillery, AirDefence from game.data.building_data import WW2_ALLIES_BUILDINGS, DEFAULT_AVAILABLE_BUILDINGS, WW2_GERMANY_BUILDINGS from game.data.doctrine import Doctrine, MODERN_DOCTRINE, COLDWAR_DOCTRINE, WWII_DOCTRINE @@ -16,117 +19,96 @@ from pydcs_extensions.mod_units import MODDED_VEHICLES, MODDED_AIRPLANES class Faction: # Country used by this faction - country: str + country: str = field(default="") # Nice name of the faction - name: str + name: str = field(default="") # Available aircraft - aircrafts: [UnitType] + aircrafts: List[UnitType] = field(default_factory=list) # Available awacs aircraft - awacs: [UnitType] + awacs: List[UnitType] = field(default_factory=list) # Available tanker aircraft - tankers: [UnitType] + tankers: List[UnitType] = field(default_factory=list) # Available frontline units - frontline_units: [VehicleType] + frontline_units: List[VehicleType] = field(default_factory=list) # Available artillery units - artillery_units: [VehicleType] + artillery_units: List[VehicleType] = field(default_factory=list) # Infantry units used - infantry_units: [VehicleType] + infantry_units: List[VehicleType] = field(default_factory=list) # Logistics units used - logistics_units: [VehicleType] + logistics_units: List[VehicleType] = field(default_factory=list) # List of units that can be deployed as SHORAD - shorads: [str] + shorads: List[str] = field(default_factory=list) # Possible SAMS site generators for this faction - sams: [str] + sams: List[str] = field(default_factory=list) # Possible Missile site generators for this faction - missiles: [str] + missiles: List[str] = field(default_factory=list) # Required mods or asset packs - requirements: {str: str} + requirements: {str: str} = field(default_factory=dict) # possible aircraft carrier units - aircraft_carrier: [UnitType] + aircraft_carrier: List[UnitType] = field(default_factory=list) # possible helicopter carrier units - helicopter_carrier: [UnitType] + helicopter_carrier: List[UnitType] = field(default_factory=list) # Possible carrier names - carrier_names: [str] + carrier_names: List[str] = field(default_factory=list) # Possible helicopter carrier names - helicopter_carrier_names: [str] + helicopter_carrier_names: List[str] = field(default_factory=list) # Navy group generators - navy_generators: [str] + navy_generators: List[str] = field(default_factory=list) # Available destroyers - destroyers: [str] + destroyers: List[str] = field(default_factory=list) # Available cruisers - cruisers: [str] + cruisers: List[str] = field(default_factory=list) # How many navy group should we try to generate per CP on startup for this faction - navy_group_count: int + navy_group_count: int = field(default=1) # How many missiles group should we try to generate per CP on startup for this faction - missiles_group_count: int + missiles_group_count: int = field(default=1) # Whether this faction has JTAC access - has_jtac: bool + has_jtac: bool = field(default=False) # Unit to use as JTAC for this faction - jtac_unit: str + jtac_unit: str = field(default="") # doctrine - doctrine: Doctrine + doctrine: Doctrine = field(default=MODERN_DOCTRINE) # List of available buildings for this faction - building_set: [str] + building_set: List[str] = field(default_factory=list) - def __init__(self): - self.country = "" - self.name = "" - self.aircrafts = [] - self.awacs = [] - self.tankers = [] - self.frontline_units = [] - self.artillery_units = [] - self.infantry_units = [] - self.logistics_units = [] - self.shorads = [] - self.sams = [] - self.missiles = [] - self.requirements = {} - self.aircraft_carrier = [] - self.helicopter_carrier = [] - self.carrier_names = [] - self.helicopter_carrier_names = [] - self.navy_generators = [] - self.destroyers = [] - self.cruisers = [] - self.navy_group_count = 0 - self.missiles_group_count = 0 - self.has_jtac = False - self.jtac_unit = "" - self.doctrine = None @classmethod - def from_json(cls, json): + def from_json(cls: Type[Faction], json: Dict[str, any]) -> Faction: faction = Faction() - faction.country = json.get("country", "USA") - faction.name = json.get("name", "???") + faction.country = json.get("country", "/") + if faction.country not in [c.name for c in country_dict.values()]: + raise AssertionError("Faction's country (\"{}\") is not a valid DCS country ID".format(faction.country)) + + faction.name = json.get("name", "") + if not faction.name: + raise AssertionError("Faction has no valid name") faction.aircrafts = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("aircrafts", [])] if f is not None] faction.awacs = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("awacs", [])] if f is not None] @@ -179,14 +161,15 @@ class Faction: return faction @property - def units(self): + def units(self) -> List[UnitType]: return self.infantry_units + self.aircrafts + self.awacs + self.artillery_units + self.frontline_units + self.tankers + self.logistics_units -def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: +def unit_loader(unit: str, class_repository: List[Any]) -> Optional[PlaneType]: """ Find unit by name :param unit: Unit name as string + :param class_repository: Repository of classes (Either a module, a class, or a list of classes) :return: The unit as a PyDCS type """ if unit is None: @@ -202,9 +185,9 @@ def unit_loader(unit: str, class_repository:[]) -> Optional[PlaneType]: if m.__name__ == unit: return m logging.info("FACTION ERROR : Unable to find " + unit + " in pydcs") - print("FACTION ERROR : Unable to find " + unit + " in pydcs") return None + aircraft_loader = lambda x: unit_loader(x, [dcs.planes, dcs.helicopters, MODDED_AIRPLANES]) vehicle_loader = lambda x: unit_loader(x, [Infantry, Unarmed, Armor, AirDefence, Artillery, MODDED_VEHICLES]) ship_loader = lambda x: unit_loader(x, [dcs.ships]) diff --git a/game/factions/faction_loader.py b/game/factions/faction_loader.py index 36b0c532..d182ea73 100644 --- a/game/factions/faction_loader.py +++ b/game/factions/faction_loader.py @@ -1,30 +1,31 @@ +from __future__ import annotations import json -import os import logging +from pathlib import Path +from typing import Type from game.factions.faction import Faction FACTION_DIRECTORY = "./resources/factions/" -def load_factions() -> {str, Faction}: - files = os.listdir(FACTION_DIRECTORY) - files = [f for f in files if f.endswith(".json")] +class FactionLoader: - factions = {} + @classmethod + def load_factions(cls: Type[FactionLoader]) -> {str, Faction}: - for f in files: - print(f) - path = os.path.join(FACTION_DIRECTORY, f) - logging.info("Loading faction" + path) - #try: - with open(path, "r", encoding="utf-8") as fdata: - data = json.load(fdata, encoding="utf-8") - factions[data["name"]] = Faction.from_json(data) - logging.info("Loaded faction : " + path) - #except Exception as e: - # print(e) - # logging.error("Unable to load faction : " + path) + path = Path(FACTION_DIRECTORY) + files = [f for f in path.glob("*.json") if f.is_file()] + factions = {} - print(factions) - return factions \ No newline at end of file + for f in files: + logging.info("Loading faction" + str(f)) + try: + with open(f, "r", encoding="utf-8") as fdata: + data = json.load(fdata, encoding="utf-8") + factions[data["name"]] = Faction.from_json(data) + logging.info("Loaded faction : " + str(f)) + except Exception as e: + logging.error("Unable to load faction : " + path, e) + + return factions diff --git a/resources/factions/netherlands_1990.json b/resources/factions/netherlands_1990.json index 5373fda8..3b915643 100644 --- a/resources/factions/netherlands_1990.json +++ b/resources/factions/netherlands_1990.json @@ -1,5 +1,5 @@ { - "country": "Netherlands", + "country": "The Netherlands", "name": "Netherlands 1990", "authors": "Khopa", "description": "", From 3d8c2d689e596ac8f54cbf721bb18083de505ed8 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sun, 25 Oct 2020 14:20:43 +0100 Subject: [PATCH 22/29] Added unit tests for faction. (To be completed) --- .gitignore | 1 - tests/resources/invalid_faction.json | 0 tests/resources/valid_faction.json | 86 ++++++++++++++++++++++++++++ tests/test_factions.py | 35 +++++++++++ 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 tests/resources/invalid_faction.json create mode 100644 tests/resources/valid_faction.json create mode 100644 tests/test_factions.py diff --git a/.gitignore b/.gitignore index 26831339..e53921ce 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ logs.txt dist/** a.py resources/tools/a.miz -tests/** # User-specific stuff .idea/ diff --git a/tests/resources/invalid_faction.json b/tests/resources/invalid_faction.json new file mode 100644 index 00000000..e69de29b diff --git a/tests/resources/valid_faction.json b/tests/resources/valid_faction.json new file mode 100644 index 00000000..b33297bf --- /dev/null +++ b/tests/resources/valid_faction.json @@ -0,0 +1,86 @@ +{ + "country": "USA", + "name": "USA 2005", + "authors": "Khopa", + "description": "This is a test description", + "aircrafts": [ + "F_15C", + "F_15E", + "F_14B", + "FA_18C_hornet", + "F_16C_50", + "A_10A", + "AV8BNA", + "UH_1H", + "AH_64A", + "B_52H", + "B_1B", + "F_117A" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "ATGM_M1134_Stryker", + "APC_M1126_Stryker_ICV", + "IFV_M2A2_Bradley", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class", + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator", + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} \ No newline at end of file diff --git a/tests/test_factions.py b/tests/test_factions.py new file mode 100644 index 00000000..fd141181 --- /dev/null +++ b/tests/test_factions.py @@ -0,0 +1,35 @@ +import json +import unittest + +from dcs.helicopters import UH_1H, AH_64A +from dcs.planes import F_15C, F_15E, F_14B, FA_18C_hornet, F_16C_50, A_10A, AV8BNA, B_52H, B_1B, F_117A + +from game.factions.faction import Faction + + +class TestFactionLoader(unittest.TestCase): + + def setUp(self): + pass + + def test_load_valid_faction(self): + with open("./resources/valid_faction.json", 'r') as data: + faction = Faction.from_json(json.load(data)) + + self.assertEqual(faction.country, "USA") + self.assertEqual(faction.name, "USA 2005") + self.assertEqual(faction.authors, "Khopa") + self.assertEqual(faction.description, "This is a test description") + + self.assertIn(F_15C, faction.aircrafts) + self.assertIn(F_15E, faction.aircrafts) + self.assertIn(F_14B, faction.aircrafts) + self.assertIn(FA_18C_hornet, faction.aircrafts) + self.assertIn(F_16C_50, faction.aircrafts) + self.assertIn(A_10A, faction.aircrafts) + self.assertIn(AV8BNA, faction.aircrafts) + self.assertIn(UH_1H, faction.aircrafts) + self.assertIn(AH_64A, faction.aircrafts) + self.assertIn(B_52H, faction.aircrafts) + self.assertIn(B_1B, faction.aircrafts) + self.assertIn(F_117A, faction.aircrafts) From 93f0627c5e6bf4809ef7467b5a39180237dca16f Mon Sep 17 00:00:00 2001 From: Khopa Date: Sun, 25 Oct 2020 14:21:25 +0100 Subject: [PATCH 23/29] Fixed errors in faction code --- game/factions/faction.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/game/factions/faction.py b/game/factions/faction.py index e189bf77..28192d6a 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -24,6 +24,12 @@ class Faction: # Nice name of the faction name: str = field(default="") + # List of faction file authors + authors: str = field(default="") + + # A description of the faction + description: str = field(default="") + # Available aircraft aircrafts: List[UnitType] = field(default_factory=list) @@ -110,6 +116,9 @@ class Faction: if not faction.name: raise AssertionError("Faction has no valid name") + faction.authors = json.get("authors", "") + faction.description = json.get("description", "") + faction.aircrafts = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("aircrafts", [])] if f is not None] faction.awacs = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("awacs", [])] if f is not None] faction.tankers = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("tankers", [])] if f is not None] @@ -122,7 +131,7 @@ class Faction: faction.sams = json.get("sams", []) faction.shorads = json.get("shorads", []) faction.missiles = json.get("missiles", []) - faction.name = json.get("requirements", {}) + faction.requirements = json.get("requirements", {}) faction.carrier_names = json.get("carrier_names", []) faction.helicopter_carrier_names = json.get("helicopter_carrier_names", []) From ec7f8f57101b3902ff8afc91ce3e3f68109bd59a Mon Sep 17 00:00:00 2001 From: Khopa Date: Sun, 25 Oct 2020 14:38:10 +0100 Subject: [PATCH 24/29] Completed basic faction parameters loading test. --- tests/resources/invalid_faction.json | 0 tests/resources/invalid_faction_country.json | 86 ++++++++++++++++++++ tests/resources/valid_faction.json | 2 +- tests/test_factions.py | 60 +++++++++++++- 4 files changed, 146 insertions(+), 2 deletions(-) delete mode 100644 tests/resources/invalid_faction.json create mode 100644 tests/resources/invalid_faction_country.json diff --git a/tests/resources/invalid_faction.json b/tests/resources/invalid_faction.json deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/resources/invalid_faction_country.json b/tests/resources/invalid_faction_country.json new file mode 100644 index 00000000..84579ab0 --- /dev/null +++ b/tests/resources/invalid_faction_country.json @@ -0,0 +1,86 @@ +{ + "country": "C", + "name": "USA 2005", + "authors": "Khopa", + "description": "This is a test description", + "aircrafts": [ + "F_15C", + "F_15E", + "F_14B", + "FA_18C_hornet", + "F_16C_50", + "A_10A", + "AV8BNA", + "UH_1H", + "AH_64A", + "B_52H", + "B_1B", + "F_117A" + ], + "awacs": [ + "E_3A" + ], + "tankers": [ + "KC_135", + "KC130" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "ATGM_M1134_Stryker", + "APC_M1126_Stryker_ICV", + "IFV_M2A2_Bradley", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator" + ], + "sams": [ + "HawkGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "Oliver_Hazzard_Perry_class", + "USS_Arleigh_Burke_IIa" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {"mod": "Some mod is required"}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + "CVN-72 Abraham Lincoln", + "CVN-73 George Washington", + "CVN-74 John C. Stennis" + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-2 Saipan", + "LHA-3 Belleau Wood", + "LHA-4 Nassau", + "LHA-5 Peleliu" + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator", + "ArleighBurkeGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} \ No newline at end of file diff --git a/tests/resources/valid_faction.json b/tests/resources/valid_faction.json index b33297bf..7ed6eca6 100644 --- a/tests/resources/valid_faction.json +++ b/tests/resources/valid_faction.json @@ -63,7 +63,7 @@ "cruisers": [ "Ticonderoga_class" ], - "requirements": {}, + "requirements": {"mod": "Some mod is required"}, "carrier_names": [ "CVN-71 Theodore Roosevelt", "CVN-72 Abraham Lincoln", diff --git a/tests/test_factions.py b/tests/test_factions.py index fd141181..faeb2385 100644 --- a/tests/test_factions.py +++ b/tests/test_factions.py @@ -2,7 +2,11 @@ import json import unittest from dcs.helicopters import UH_1H, AH_64A -from dcs.planes import F_15C, F_15E, F_14B, FA_18C_hornet, F_16C_50, A_10A, AV8BNA, B_52H, B_1B, F_117A +from dcs.planes import F_15C, F_15E, F_14B, FA_18C_hornet, F_16C_50, A_10A, AV8BNA, B_52H, B_1B, F_117A, MQ_9_Reaper, \ + E_3A, KC130, KC_135 +from dcs.ships import CVN_74_John_C__Stennis, LHA_1_Tarawa, Oliver_Hazzard_Perry_class, USS_Arleigh_Burke_IIa, \ + Ticonderoga_class +from dcs.vehicles import Armor, Unarmed, Infantry, Artillery, AirDefence from game.factions.faction import Faction @@ -33,3 +37,57 @@ class TestFactionLoader(unittest.TestCase): self.assertIn(B_52H, faction.aircrafts) self.assertIn(B_1B, faction.aircrafts) self.assertIn(F_117A, faction.aircrafts) + + self.assertEqual(len(faction.awacs), 1) + self.assertIn(E_3A, faction.awacs) + + self.assertEqual(len(faction.tankers), 2) + self.assertIn(KC_135, faction.tankers) + self.assertIn(KC130, faction.tankers) + + self.assertTrue(faction.has_jtac) + self.assertEqual(faction.jtac_unit, MQ_9_Reaper) + + self.assertIn(Armor.MBT_M1A2_Abrams, faction.frontline_units) + self.assertIn(Armor.ATGM_M1134_Stryker, faction.frontline_units) + self.assertIn(Armor.APC_M1126_Stryker_ICV, faction.frontline_units) + self.assertIn(Armor.IFV_M2A2_Bradley, faction.frontline_units) + self.assertIn(Armor.IFV_LAV_25, faction.frontline_units) + self.assertIn(Armor.APC_M1043_HMMWV_Armament, faction.frontline_units) + self.assertIn(Armor.ATGM_M1045_HMMWV_TOW, faction.frontline_units) + + self.assertIn(Artillery.MLRS_M270, faction.artillery_units) + self.assertIn(Artillery.SPH_M109_Paladin, faction.artillery_units) + + self.assertIn(Unarmed.Transport_M818, faction.logistics_units) + + self.assertIn(Infantry.Infantry_M4, faction.infantry_units) + self.assertIn(Infantry.Soldier_M249, faction.infantry_units) + + self.assertIn("AvengerGenerator", faction.shorads) + + self.assertIn("HawkGenerator", faction.sams) + + self.assertIn(CVN_74_John_C__Stennis, faction.aircraft_carrier) + self.assertIn(LHA_1_Tarawa, faction.helicopter_carrier) + self.assertIn(Oliver_Hazzard_Perry_class, faction.destroyers) + self.assertIn(USS_Arleigh_Burke_IIa, faction.destroyers) + self.assertIn(Ticonderoga_class, faction.cruisers) + + self.assertIn("mod", faction.requirements.keys()) + self.assertIn("Some mod is required", faction.requirements.values()) + + self.assertEqual(4, len(faction.carrier_names)) + self.assertEqual(5, len(faction.helicopter_carrier_names)) + + self.assertIn("OliverHazardPerryGroupGenerator", faction.navy_generators) + self.assertIn("ArleighBurkeGroupGenerator", faction.navy_generators) + + def test_load_valid_faction_with_invalid_country(self): + + with open("./resources/invalid_faction_country.json", 'r') as data: + try: + Faction.from_json(json.load(data)) + self.fail("Should have thrown assertion error") + except AssertionError as e: + pass From 3cabb1e02de89ea3cf01b15442bfa0ca66074261 Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 26 Oct 2020 00:16:37 +0100 Subject: [PATCH 25/29] Inverted usa 1990 and 2005 factions names --- resources/factions/usa_1990.json | 2 +- resources/factions/usa_2005.json | 2 +- tests/resources/valid_faction.json | 4 +++- tests/test_factions.py | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/factions/usa_1990.json b/resources/factions/usa_1990.json index 4a65bab1..c2ff5f98 100644 --- a/resources/factions/usa_1990.json +++ b/resources/factions/usa_1990.json @@ -1,6 +1,6 @@ { "country": "USA", - "name": "USA 2005", + "name": "USA 1990", "authors": "Khopa", "description": "", "aircrafts": [ diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index 8e7fcaa6..8f8f4a60 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -1,6 +1,6 @@ { "country": "USA", - "name": "USA 1990", + "name": "USA 2005", "authors": "Khopa", "description": "", "aircrafts": [ diff --git a/tests/resources/valid_faction.json b/tests/resources/valid_faction.json index 7ed6eca6..b540cc55 100644 --- a/tests/resources/valid_faction.json +++ b/tests/resources/valid_faction.json @@ -15,7 +15,9 @@ "AH_64A", "B_52H", "B_1B", - "F_117A" + "F_117A", + "A_10C", + "A_10C_2" ], "awacs": [ "E_3A" diff --git a/tests/test_factions.py b/tests/test_factions.py index faeb2385..ecd32533 100644 --- a/tests/test_factions.py +++ b/tests/test_factions.py @@ -3,10 +3,10 @@ import unittest from dcs.helicopters import UH_1H, AH_64A from dcs.planes import F_15C, F_15E, F_14B, FA_18C_hornet, F_16C_50, A_10A, AV8BNA, B_52H, B_1B, F_117A, MQ_9_Reaper, \ - E_3A, KC130, KC_135 + E_3A, KC130, KC_135, A_10C, A_10C_2 from dcs.ships import CVN_74_John_C__Stennis, LHA_1_Tarawa, Oliver_Hazzard_Perry_class, USS_Arleigh_Burke_IIa, \ Ticonderoga_class -from dcs.vehicles import Armor, Unarmed, Infantry, Artillery, AirDefence +from dcs.vehicles import Armor, Unarmed, Infantry, Artillery from game.factions.faction import Faction @@ -37,6 +37,8 @@ class TestFactionLoader(unittest.TestCase): self.assertIn(B_52H, faction.aircrafts) self.assertIn(B_1B, faction.aircrafts) self.assertIn(F_117A, faction.aircrafts) + self.assertIn(A_10C, faction.aircrafts) + self.assertIn(A_10C_2, faction.aircrafts) self.assertEqual(len(faction.awacs), 1) self.assertIn(E_3A, faction.awacs) From b405c3ab328fbc1a8d7d5e0d863e49b32f333768 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 25 Oct 2020 16:18:03 -0700 Subject: [PATCH 26/29] Fix mypy issues in faction code. --- game/db.py | 2 +- game/factions/faction.py | 96 ++++++++++++++++++++++++--------- game/factions/faction_loader.py | 17 +++--- 3 files changed, 78 insertions(+), 37 deletions(-) diff --git a/game/db.py b/game/db.py index e88f7b89..948a37ac 100644 --- a/game/db.py +++ b/game/db.py @@ -911,7 +911,7 @@ CARRIER_TAKEOFF_BAN: List[Type[FlyingType]] = [ Units separated by country. country : DCS Country name """ -FACTIONS: [Faction] = FactionLoader.load_factions() +FACTIONS: Dict[str, Faction] = FactionLoader.load_factions() CARRIER_TYPE_BY_PLANE = { FA_18C_hornet: CVN_74_John_C__Stennis, diff --git a/game/factions/faction.py b/game/factions/faction.py index 28192d6a..1ecb20fd 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -2,12 +2,12 @@ from __future__ import annotations import logging from dataclasses import dataclass, field -from typing import Optional, Dict, Type, List, Any +from typing import Optional, Dict, Type, List, Any, cast import dcs from dcs.countries import country_dict -from dcs.planes import PlaneType, plane_map -from dcs.unittype import VehicleType, UnitType +from dcs.planes import plane_map +from dcs.unittype import FlyingType, ShipType, VehicleType, UnitType from dcs.vehicles import Armor, Unarmed, Infantry, Artillery, AirDefence from game.data.building_data import WW2_ALLIES_BUILDINGS, DEFAULT_AVAILABLE_BUILDINGS, WW2_GERMANY_BUILDINGS @@ -61,7 +61,7 @@ class Faction: missiles: List[str] = field(default_factory=list) # Required mods or asset packs - requirements: {str: str} = field(default_factory=dict) + requirements: Dict[str, str] = field(default_factory=dict) # possible aircraft carrier units aircraft_carrier: List[UnitType] = field(default_factory=list) @@ -94,7 +94,7 @@ class Faction: has_jtac: bool = field(default=False) # Unit to use as JTAC for this faction - jtac_unit: str = field(default="") + jtac_unit: Optional[FlyingType] = field(default=None) # doctrine doctrine: Doctrine = field(default=MODERN_DOCTRINE) @@ -102,9 +102,8 @@ class Faction: # List of available buildings for this faction building_set: List[str] = field(default_factory=list) - @classmethod - def from_json(cls: Type[Faction], json: Dict[str, any]) -> Faction: + def from_json(cls: Type[Faction], json: Dict[str, Any]) -> Faction: faction = Faction() @@ -119,14 +118,18 @@ class Faction: faction.authors = json.get("authors", "") faction.description = json.get("description", "") - faction.aircrafts = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("aircrafts", [])] if f is not None] - faction.awacs = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("awacs", [])] if f is not None] - faction.tankers = [f for f in [aircraft_loader(aircraft) for aircraft in json.get("tankers", [])] if f is not None] + faction.aircrafts = load_all_aircraft(json.get("aircrafts", [])) + faction.awacs = load_all_aircraft(json.get("awacs", [])) + faction.tankers = load_all_aircraft(json.get("tankers", [])) - faction.frontline_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("frontline_units", [])] if f is not None] - faction.artillery_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("artillery_units", [])] if f is not None] - faction.infantry_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("infantry_units", [])] if f is not None] - faction.logistics_units = [f for f in [vehicle_loader(vehicle) for vehicle in json.get("logistics_units", [])] if f is not None] + faction.frontline_units = load_all_vehicles( + json.get("frontline_units", [])) + faction.artillery_units = load_all_vehicles( + json.get("artillery_units", [])) + faction.infantry_units = load_all_vehicles( + json.get("infantry_units", [])) + faction.logistics_units = load_all_vehicles( + json.get("logistics_units", [])) faction.sams = json.get("sams", []) faction.shorads = json.get("shorads", []) @@ -134,14 +137,21 @@ class Faction: faction.requirements = json.get("requirements", {}) faction.carrier_names = json.get("carrier_names", []) - faction.helicopter_carrier_names = json.get("helicopter_carrier_names", []) + faction.helicopter_carrier_names = json.get( + "helicopter_carrier_names", []) faction.navy_generators = json.get("navy_generators", []) - faction.aircraft_carrier = [f for f in [ship_loader(vehicle) for vehicle in json.get("aircraft_carrier", [])] if f is not None] - faction.helicopter_carrier = [f for f in [ship_loader(vehicle) for vehicle in json.get("helicopter_carrier", [])] if f is not None] - faction.destroyers = [f for f in [ship_loader(vehicle) for vehicle in json.get("destroyers", [])] if f is not None] - faction.cruisers = [f for f in [ship_loader(vehicle) for vehicle in json.get("cruisers", [])] if f is not None] + faction.aircraft_carrier = load_all_ships( + json.get("aircraft_carrier", [])) + faction.helicopter_carrier = load_all_ships( + json.get("helicopter_carrier", [])) + faction.destroyers = load_all_ships(json.get("destroyers", [])) + faction.cruisers = load_all_ships(json.get("cruisers", [])) faction.has_jtac = json.get("has_jtac", False) - faction.jtac_unit = aircraft_loader(json.get("jtac_unit", None)) + jtac_name = json.get("jtac_unit", None) + if jtac_name is not None: + faction.jtac_unit = load_aircraft(jtac_name) + else: + faction.jtac_unit = None faction.navy_group_count = int(json.get("navy_group_count", 1)) faction.missiles_group_count = int(json.get("missiles_group_count", 0)) @@ -171,10 +181,12 @@ class Faction: @property def units(self) -> List[UnitType]: - return self.infantry_units + self.aircrafts + self.awacs + self.artillery_units + self.frontline_units + self.tankers + self.logistics_units + return (self.infantry_units + self.aircrafts + self.awacs + + self.artillery_units + self.frontline_units + + self.tankers + self.logistics_units) -def unit_loader(unit: str, class_repository: List[Any]) -> Optional[PlaneType]: +def unit_loader(unit: str, class_repository: List[Any]) -> Optional[UnitType]: """ Find unit by name :param unit: Unit name as string @@ -193,16 +205,48 @@ def unit_loader(unit: str, class_repository: List[Any]) -> Optional[PlaneType]: for m in mother_class: if m.__name__ == unit: return m - logging.info("FACTION ERROR : Unable to find " + unit + " in pydcs") + logging.error(f"FACTION ERROR : Unable to find {unit} in pydcs") return None -aircraft_loader = lambda x: unit_loader(x, [dcs.planes, dcs.helicopters, MODDED_AIRPLANES]) -vehicle_loader = lambda x: unit_loader(x, [Infantry, Unarmed, Armor, AirDefence, Artillery, MODDED_VEHICLES]) -ship_loader = lambda x: unit_loader(x, [dcs.ships]) +def load_aircraft(name: str) -> Optional[FlyingType]: + return cast(Optional[FlyingType], unit_loader( + name, [dcs.planes, dcs.helicopters, MODDED_AIRPLANES] + )) +def load_all_aircraft(data) -> List[FlyingType]: + items = [] + for name in data: + item = load_aircraft(name) + if item is not None: + items.append(item) + return items +def load_vehicle(name: str) -> Optional[VehicleType]: + return cast(Optional[FlyingType], unit_loader( + name, [Infantry, Unarmed, Armor, AirDefence, Artillery, MODDED_VEHICLES] + )) +def load_all_vehicles(data) -> List[VehicleType]: + items = [] + for name in data: + item = load_vehicle(name) + if item is not None: + items.append(item) + return items + + +def load_ship(name: str) -> Optional[ShipType]: + return cast(Optional[FlyingType], unit_loader(name, [dcs.ships])) + + +def load_all_ships(data) -> List[ShipType]: + items = [] + for name in data: + item = load_ship(name) + if item is not None: + items.append(item) + return items diff --git a/game/factions/faction_loader.py b/game/factions/faction_loader.py index d182ea73..f20f5a68 100644 --- a/game/factions/faction_loader.py +++ b/game/factions/faction_loader.py @@ -2,30 +2,27 @@ from __future__ import annotations import json import logging from pathlib import Path -from typing import Type +from typing import Dict, Type from game.factions.faction import Faction -FACTION_DIRECTORY = "./resources/factions/" +FACTION_DIRECTORY = Path("./resources/factions/") class FactionLoader: @classmethod - def load_factions(cls: Type[FactionLoader]) -> {str, Faction}: - - path = Path(FACTION_DIRECTORY) - files = [f for f in path.glob("*.json") if f.is_file()] + def load_factions(cls: Type[FactionLoader]) -> Dict[str, Faction]: + files = [f for f in FACTION_DIRECTORY.glob("*.json") if f.is_file()] factions = {} for f in files: - logging.info("Loading faction" + str(f)) try: - with open(f, "r", encoding="utf-8") as fdata: + with f.open("r", encoding="utf-8") as fdata: data = json.load(fdata, encoding="utf-8") factions[data["name"]] = Faction.from_json(data) logging.info("Loaded faction : " + str(f)) - except Exception as e: - logging.error("Unable to load faction : " + path, e) + except Exception: + logging.exception(f"Unable to load faction : {f}") return factions From 334d21897bcbaed1895fc1d4bed582971171bef1 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 25 Oct 2020 15:33:59 -0700 Subject: [PATCH 27/29] Fix mypy actions. GitHub actions fail based on the exit code of the *last* command in the step, so we were failing mypy but passing the action. --- .github/workflows/build.yml | 14 +++++++++++++- .github/workflows/release.yml | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48e79b89..8e04aa8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,12 +27,24 @@ jobs: # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force - - name: Build binaries + - name: mypy game run: | ./venv/scripts/activate mypy game + + - name: mypy gen + run: | + ./venv/scripts/activate mypy gen + + - name: mypy theater + run: | + ./venv/scripts/activate mypy theater + + - name: Build binaries + run: | + ./venv/scripts/activate $env:PYTHONPATH=".;./pydcs" pyinstaller pyinstaller.spec diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33d78ae3..559d19a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,12 +29,24 @@ jobs: # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force - - name: Build binaries + - name: mypy game run: | ./venv/scripts/activate mypy game + + - name: mypy gen + run: | + ./venv/scripts/activate mypy gen + + - name: mypy theater + run: | + ./venv/scripts/activate mypy theater + + - name: Build binaries + run: | + ./venv/scripts/activate $env:PYTHONPATH=".;./pydcs" pyinstaller pyinstaller.spec From bdcf7c1828525f95ee97ce442b215127b0893b06 Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 26 Oct 2020 00:24:03 +0100 Subject: [PATCH 28/29] Fixed mig 21 wrong identifier in some files. --- resources/factions/russia_1965.json | 2 +- resources/factions/russia_1975.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/factions/russia_1965.json b/resources/factions/russia_1965.json index 929e35d1..7f5a9811 100644 --- a/resources/factions/russia_1965.json +++ b/resources/factions/russia_1965.json @@ -6,7 +6,7 @@ "aircrafts": [ "MiG_15bis", "MiG_19P", - "MiG_21bis", + "MiG_21Bis", "Mi_8MT" ], "awacs": [ diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json index e9f23d9b..d3c99900 100644 --- a/resources/factions/russia_1975.json +++ b/resources/factions/russia_1975.json @@ -4,7 +4,7 @@ "authors": "Khopa", "description": "", "aircrafts": [ - "MiG_21bis", + "MiG_21Bis", "MiG_23MLD", "MiG_25PD", "MiG_29A", From 839f163ac5cd77f6b180e0a11ebd66f4358d4714 Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 26 Oct 2020 00:32:05 +0100 Subject: [PATCH 29/29] Fixed issue with base defense that could not be repaired --- gen/sam/sam_group_generator.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gen/sam/sam_group_generator.py b/gen/sam/sam_group_generator.py index ba8583b0..25472ea1 100644 --- a/gen/sam/sam_group_generator.py +++ b/gen/sam/sam_group_generator.py @@ -1,5 +1,5 @@ import random -from typing import List +from typing import List, Type from dcs.unittype import UnitType from dcs.vehicles import AirDefence @@ -8,6 +8,7 @@ from game import db from gen.sam.aaa_bofors import BoforsGenerator from gen.sam.aaa_flak import FlakGenerator from gen.sam.aaa_zu23_insurgent import ZU23InsurgentGenerator +from gen.sam.group_generator import GroupGenerator from gen.sam.sam_avenger import AvengerGenerator from gen.sam.sam_chaparral import ChaparralGenerator from gen.sam.sam_gepard import GepardGenerator @@ -98,12 +99,12 @@ SAM_PRICES = { } -def get_faction_possible_sams_generator(faction: str) -> List[UnitType]: +def get_faction_possible_sams_generator(faction: str) -> List[Type[GroupGenerator]]: """ Return the list of possible SAM generator for the given faction :param faction: Faction name to search units for """ - return db.FACTIONS[faction].sams + return [SAM_MAP[s] for s in db.FACTIONS[faction].sams if s in SAM_MAP.keys()] def generate_anti_air_group(game, parent_cp, ground_object, faction:str): @@ -116,8 +117,8 @@ def generate_anti_air_group(game, parent_cp, ground_object, faction:str): """ possible_sams_generators = get_faction_possible_sams_generator(faction) if len(possible_sams_generators) > 0: - sam = random.choice(possible_sams_generators) - generator = SAM_MAP[sam](game, ground_object) + sam_generator_class = random.choice(possible_sams_generators) + generator = sam_generator_class(game, ground_object) generator.generate() return generator.get_generated_group() return None