From b8afb01c46123f64c5f201d430363acf91f339fb Mon Sep 17 00:00:00 2001 From: Pedro Magueija Date: Tue, 15 Sep 2020 14:58:17 +0200 Subject: [PATCH 01/40] Fix typo in CombatStance enumeration --- gen/ground_forces/combat_stance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/ground_forces/combat_stance.py b/gen/ground_forces/combat_stance.py index d2247f73..604ec508 100644 --- a/gen/ground_forces/combat_stance.py +++ b/gen/ground_forces/combat_stance.py @@ -3,7 +3,7 @@ from enum import Enum class CombatStance(Enum): DEFENSIVE = 0 # Unit will adopt defensive stance with medium group of units - AGGRESIVE = 1 # Unit will attempt to make progress with medium sized group of units + AGGRESSIVE = 1 # Unit will attempt to make progress with medium sized group of units RETREAT = 2 # Unit will retreat BREAKTHROUGH = 3 # Unit will attempt a breakthrough, rushing forward very aggresively with big group of armored units, and even less armored units will move aggresively ELIMINATION = 4 # Unit will progress aggresively toward anemy units, attempting to eliminate the ennemy force From 93b2e91c10036a6fad1b69a4f6b7116ba570b911 Mon Sep 17 00:00:00 2001 From: Pedro Magueija Date: Tue, 15 Sep 2020 15:03:41 +0200 Subject: [PATCH 02/40] Fix usage of CombatStance typo --- game/event/event.py | 2 +- gen/armor.py | 6 +++--- gen/briefinggen.py | 2 +- gen/ground_forces/ai_ground_planner.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/game/event/event.py b/game/event/event.py index e064ad94..8146deb3 100644 --- a/game/event/event.py +++ b/game/event/event.py @@ -267,7 +267,7 @@ class Event: ratio = (1.0 + enemy_casualties) / (1.0 + ally_casualties) - player_aggresive = cp.stances[enemy_cp.id] in [CombatStance.AGGRESIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH] + player_aggresive = cp.stances[enemy_cp.id] in [CombatStance.AGGRESSIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH] if ally_units_alive == 0: player_won = False diff --git a/gen/armor.py b/gen/armor.py index 5d9a8b29..07fafa67 100644 --- a/gen/armor.py +++ b/gen/armor.py @@ -30,7 +30,7 @@ class GroundConflictGenerator: self.enemy_planned_combat_groups = enemy_planned_combat_groups self.player_planned_combat_groups = player_planned_combat_groups self.player_stance = CombatStance(player_stance) - self.enemy_stance = random.choice([CombatStance.AGGRESIVE, CombatStance.AGGRESIVE, CombatStance.AGGRESIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH]) if len(enemy_planned_combat_groups) > len(player_planned_combat_groups) else random.choice([CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.AMBUSH, CombatStance.AGGRESIVE]) + self.enemy_stance = random.choice([CombatStance.AGGRESSIVE, CombatStance.AGGRESSIVE, CombatStance.AGGRESSIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH]) if len(enemy_planned_combat_groups) > len(player_planned_combat_groups) else random.choice([CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.AMBUSH, CombatStance.AGGRESSIVE]) self.game = game def _group_point(self, point) -> Point: @@ -222,7 +222,7 @@ class GroundConflictGenerator: u.heading = forward_heading + random.randint(-5,5) elif group.role in [CombatGroupRole.TANK, CombatGroupRole.IFV]: - if stance == CombatStance.AGGRESIVE: + if stance == CombatStance.AGGRESSIVE: # Attack nearest enemy if any # Then move forward OR Attack enemy base if it is not too far away target = self.find_nearest_enemy_group(dcs_group, enemy_groups) @@ -263,7 +263,7 @@ class GroundConflictGenerator: elif group.role in [CombatGroupRole.APC, CombatGroupRole.ATGM]: - if stance in [CombatStance.AGGRESIVE, CombatStance.BREAKTHROUGH, CombatStance.ELIMINATION]: + if stance in [CombatStance.AGGRESSIVE, CombatStance.BREAKTHROUGH, CombatStance.ELIMINATION]: # APC & ATGM will never move too much forward, but will follow along any offensive if to_cp.position.distance_to_point(dcs_group.points[0].position) <= AGGRESIVE_MOVE_DISTANCE: attack_point = to_cp.position.random_point_within(500, 0) diff --git a/gen/briefinggen.py b/gen/briefinggen.py index c3e10931..47e43ce6 100644 --- a/gen/briefinggen.py +++ b/gen/briefinggen.py @@ -148,7 +148,7 @@ class BriefingGenerator: self.description += "We do not have a single vehicle available to hold our position, the situation is critical, and we will lose ground inevitably.\n" elif enemy_base.base.total_armor == 0: self.description += "The enemy forces have been crushed, we will be able to make significant progress toward " + enemy_base.name + ". \n" - if stance == CombatStance.AGGRESIVE: + if stance == CombatStance.AGGRESSIVE: if has_numerical_superiority: self.description += "On this location, our ground forces will try to make progress against the enemy" self.description += ". As the enemy is outnumbered, our forces should have no issue making progress.\n" diff --git a/gen/ground_forces/ai_ground_planner.py b/gen/ground_forces/ai_ground_planner.py index bdc3a18d..877c9831 100644 --- a/gen/ground_forces/ai_ground_planner.py +++ b/gen/ground_forces/ai_ground_planner.py @@ -197,7 +197,7 @@ DISTANCE_FROM_FRONTLINE = { GROUP_SIZES_BY_COMBAT_STANCE = { CombatStance.DEFENSIVE: [2, 4, 6], - CombatStance.AGGRESIVE: [2, 4, 6], + CombatStance.AGGRESSIVE: [2, 4, 6], CombatStance.RETREAT: [2, 4, 6, 8], CombatStance.BREAKTHROUGH: [4, 6, 6, 8], CombatStance.ELIMINATION: [2, 4, 4, 4, 6], From 266927aa9a3d315c80fb49ffdfb6adad3e4b4dd3 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 24 Sep 2020 18:01:20 +0200 Subject: [PATCH 03/40] Added new payloads for F-16C for SEAD and CAS, added defaults payload for new P-47 variants. --- resources/customized_payloads/F-16C_50.lua | 132 +++++++++--------- resources/customized_payloads/P-47D-30.lua | 63 ++++++--- resources/customized_payloads/P-47D-30bl1.lua | 96 +++++++++++++ resources/customized_payloads/P-47D-40.lua | 88 ++++++++++++ 4 files changed, 289 insertions(+), 90 deletions(-) create mode 100644 resources/customized_payloads/P-47D-30bl1.lua create mode 100644 resources/customized_payloads/P-47D-40.lua diff --git a/resources/customized_payloads/F-16C_50.lua b/resources/customized_payloads/F-16C_50.lua index d48ad19e..285bccf3 100644 --- a/resources/customized_payloads/F-16C_50.lua +++ b/resources/customized_payloads/F-16C_50.lua @@ -2,41 +2,84 @@ local unitPayloads = { ["name"] = "F-16C_50", ["payloads"] = { [1] = { - ["name"] = "ANTISHIP", + ["name"] = "CAS", ["pylons"] = { [1] = { - ["CLSID"] = "LAU3_HE5", - ["num"] = 6, + ["CLSID"] = "{8A0BE8AE-58D4-4572-9263-3144C0D06364}", + ["num"] = 5, }, [2] = { - ["CLSID"] = "LAU3_HE5", + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", ["num"] = 7, }, [3] = { - ["CLSID"] = "LAU3_HE5", - ["num"] = 4, - }, - [4] = { - ["CLSID"] = "LAU3_HE5", + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", ["num"] = 3, }, - [5] = { + [4] = { ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", ["num"] = 2, }, - [6] = { + [5] = { ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", ["num"] = 1, }, - [7] = { + [6] = { ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", ["num"] = 8, }, - [8] = { + [7] = { ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", ["num"] = 9, }, + [8] = { + ["CLSID"] = "{5335D97A-35A5-4643-9D9B-026C75961E52}", + ["num"] = 4, + }, [9] = { + ["CLSID"] = "{5335D97A-35A5-4643-9D9B-026C75961E52}", + ["num"] = 6, + }, + [10] = { + ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", + ["num"] = 11, + }, + }, + ["tasks"] = { + }, + }, + [2] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", + ["num"] = 7, + }, + [2] = { + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", + ["num"] = 3, + }, + [3] = { + ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", + ["num"] = 2, + }, + [4] = { + ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", + ["num"] = 1, + }, + [5] = { + ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", + ["num"] = 8, + }, + [6] = { + ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", + ["num"] = 9, + }, + [7] = { + ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", + ["num"] = 11, + }, + [8] = { ["CLSID"] = "{8A0BE8AE-58D4-4572-9263-3144C0D06364}", ["num"] = 5, }, @@ -44,7 +87,7 @@ local unitPayloads = { ["tasks"] = { }, }, - [2] = { + [3] = { ["name"] = "CAP", ["pylons"] = { [1] = { @@ -87,53 +130,6 @@ local unitPayloads = { ["tasks"] = { }, }, - [3] = { - ["name"] = "CAS", - ["pylons"] = { - [1] = { - ["CLSID"] = "{8A0BE8AE-58D4-4572-9263-3144C0D06364}", - ["num"] = 5, - }, - [2] = { - ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}", - ["num"] = 7, - }, - [3] = { - ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}", - ["num"] = 3, - }, - [4] = { - ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", - ["num"] = 2, - }, - [5] = { - ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", - ["num"] = 1, - }, - [6] = { - ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", - ["num"] = 8, - }, - [7] = { - ["CLSID"] = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}", - ["num"] = 9, - }, - [8] = { - ["CLSID"] = "{5335D97A-35A5-4643-9D9B-026C75961E52}", - ["num"] = 4, - }, - [9] = { - ["CLSID"] = "{5335D97A-35A5-4643-9D9B-026C75961E52}", - ["num"] = 6, - }, - [11] = { - ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", - ["num"] = 11, - }, - }, - ["tasks"] = { - }, - }, [4] = { ["name"] = "STRIKE", ["pylons"] = { @@ -142,11 +138,11 @@ local unitPayloads = { ["num"] = 7, }, [2] = { - ["CLSID"] = "{TER_9A_2L*MK-82}", + ["CLSID"] = "{AB8B8299-F1CC-4359-89B5-2172E0CF4A5A}", ["num"] = 4, }, [3] = { - ["CLSID"] = "{TER_9A_2R*MK-82}", + ["CLSID"] = "{AB8B8299-F1CC-4359-89B5-2172E0CF4A5A}", ["num"] = 6, }, [4] = { @@ -173,7 +169,7 @@ local unitPayloads = { ["CLSID"] = "{8A0BE8AE-58D4-4572-9263-3144C0D06364}", ["num"] = 5, }, - [11] = { + [10] = { ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", ["num"] = 11, }, @@ -185,19 +181,19 @@ local unitPayloads = { ["name"] = "SEAD", ["pylons"] = { [1] = { - ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}", + ["CLSID"] = "{F376DBEE-4CAE-41BA-ADD9-B2910AC95DEC}", ["num"] = 6, }, [2] = { - ["CLSID"] = "{5335D97A-35A5-4643-9D9B-026C75961E52}", + ["CLSID"] = "{B06DD79A-F21E-4EB9-BD9D-AB3844618C93}", ["num"] = 7, }, [3] = { - ["CLSID"] = "{DB769D48-67D7-42ED-A2BE-108D566C8B1E}", + ["CLSID"] = "{F376DBEE-4CAE-41BA-ADD9-B2910AC95DEC}", ["num"] = 4, }, [4] = { - ["CLSID"] = "{5335D97A-35A5-4643-9D9B-026C75961E52}", + ["CLSID"] = "{B06DD79A-F21E-4EB9-BD9D-AB3844618C93}", ["num"] = 3, }, [5] = { diff --git a/resources/customized_payloads/P-47D-30.lua b/resources/customized_payloads/P-47D-30.lua index df5f21cd..71dc4891 100644 --- a/resources/customized_payloads/P-47D-30.lua +++ b/resources/customized_payloads/P-47D-30.lua @@ -2,26 +2,6 @@ local unitPayloads = { ["name"] = "P-47D-30", ["payloads"] = { [1] = { - ["name"] = "CAS", - ["pylons"] = { - [1] = { - ["CLSID"] = "{AN-M64}", - ["num"] = 3, - }, - [2] = { - ["CLSID"] = "{AN-M64}", - ["num"] = 2, - }, - [3] = { - ["CLSID"] = "{AN-M64}", - ["num"] = 1, - }, - }, - ["tasks"] = { - [1] = 11, - }, - }, - [2] = { ["name"] = "STRIKE", ["pylons"] = { [1] = { @@ -41,14 +21,34 @@ local unitPayloads = { [1] = 11, }, }, - [3] = { - ["name"] = "ANTISHIP", + [2] = { + ["name"] = "ANTISTRIKE", ["pylons"] = { }, ["tasks"] = { [1] = 11, }, }, + [3] = { + ["name"] = "CAS", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 3, + }, + [2] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, [4] = { ["name"] = "CAP", ["pylons"] = { @@ -77,6 +77,25 @@ local unitPayloads = { [1] = 11, }, }, + [6] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 3, + }, + [2] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + }, + }, }, ["tasks"] = { }, diff --git a/resources/customized_payloads/P-47D-30bl1.lua b/resources/customized_payloads/P-47D-30bl1.lua new file mode 100644 index 00000000..50c84308 --- /dev/null +++ b/resources/customized_payloads/P-47D-30bl1.lua @@ -0,0 +1,96 @@ +local unitPayloads = { + ["name"] = "P-47D-30bl1", + ["payloads"] = { + [1] = { + ["name"] = "CAP", + ["pylons"] = { + }, + ["tasks"] = { + [1] = 11, + }, + }, + [2] = { + ["name"] = "CAS", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN_M57}", + ["num"] = 1, + }, + [2] = { + ["CLSID"] = "{AN_M57}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN_M57}", + ["num"] = 3, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [3] = { + ["name"] = "STRIKE", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 3, + }, + [2] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [4] = { + ["name"] = "SEAD", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 3, + }, + [2] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [5] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 3, + }, + [2] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + }, + }, + }, + ["tasks"] = { + }, + ["unitType"] = "P-47D-30bl1", +} +return unitPayloads diff --git a/resources/customized_payloads/P-47D-40.lua b/resources/customized_payloads/P-47D-40.lua new file mode 100644 index 00000000..fea43280 --- /dev/null +++ b/resources/customized_payloads/P-47D-40.lua @@ -0,0 +1,88 @@ +local unitPayloads = { + ["name"] = "P-47D-40", + ["payloads"] = { + [1] = { + ["name"] = "CAP", + ["pylons"] = { + }, + ["tasks"] = { + [1] = 11, + }, + }, + [2] = { + ["name"] = "CAS", + ["pylons"] = { + [1] = { + ["CLSID"] = "{P47_5_HVARS_ON_LEFT_WING_RAILS}", + ["num"] = 4, + }, + [2] = { + ["CLSID"] = "{P47_5_HVARS_ON_RIGHT_WING_RAILS}", + ["num"] = 5, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [3] = { + ["name"] = "SEAD", + ["pylons"] = { + [1] = { + ["CLSID"] = "{P47_5_HVARS_ON_LEFT_WING_RAILS}", + ["num"] = 4, + }, + [2] = { + ["CLSID"] = "{P47_5_HVARS_ON_RIGHT_WING_RAILS}", + ["num"] = 5, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [4] = { + ["name"] = "STRIKE", + ["pylons"] = { + [1] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 3, + }, + [2] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 2, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + [1] = 11, + }, + }, + [5] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{P47_5_HVARS_ON_RIGHT_WING_RAILS}", + ["num"] = 5, + }, + [2] = { + ["CLSID"] = "{P47_5_HVARS_ON_LEFT_WING_RAILS}", + ["num"] = 4, + }, + [3] = { + ["CLSID"] = "{AN-M64}", + ["num"] = 1, + }, + }, + ["tasks"] = { + }, + }, + }, + ["tasks"] = { + }, + ["unitType"] = "P-47D-40", +} +return unitPayloads From b7dff59542790da14cb033aaa45956eb92723fd5 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 24 Sep 2020 18:03:10 +0200 Subject: [PATCH 04/40] P_47 variants added to db --- changelog.md | 5 ++++- game/db.py | 11 +++++++++-- gen/flights/ai_flight_planner_db.py | 6 ++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 69a72793..6569b827 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,10 @@ ## Features/Improvements : * **[Other]** Added an installer option (thanks to contributor parithon) -* **[Cheat Menu]** Added possibility to replace destroyed SAM and base defenses units for the player (Click on a SAM site to fix it) +* **[Kneeboards]** Added custom kneeboards (thanks to contributor danalbert) +* **[Kneeboards]** Custom kneeboards contains ATC/ILS informations (thanks to contributor danalbert) +* **[Comms/Radio]** Relevant frequencies are assigned to comms channel (thanks to contributor danalbert) +* **[Base Menu]** Added possibility to replace destroyed SAM and base defenses units for the player (Click on a SAM site to fix it) * **[Cheat Menu]** Added recon images for buildings on strike targets, click on a Strike target to get detailled informations * **[Units/Factions]** Added F-16C to USA 1990 * **[Units/Factions]** Added MQ-9 Reaper as CAS unit for USA 2005 diff --git a/game/db.py b/game/db.py index 15024422..02120a45 100644 --- a/game/db.py +++ b/game/db.py @@ -223,13 +223,16 @@ PRICES = { KC130: 25, A_50: 50, + KJ_2000: 50, E_3A: 50, C_130: 25, # WW2 P_51D_30_NA: 18, P_51D: 16, - P_47D_30: 18, + P_47D_30: 17, + P_47D_30bl1: 16, + P_47D_40: 18, B_17G: 30, # Drones @@ -519,6 +522,8 @@ UNIT_BY_TASK = { MiG_27K, A_20G, P_47D_30, + P_47D_30bl1, + P_47D_40, Ju_88A4, B_17G, MB_339PAN, @@ -542,7 +547,7 @@ UNIT_BY_TASK = { KC130, S_3B_Tanker, ], - AWACS: [E_3A, A_50, ], + AWACS: [E_3A, A_50, KJ_2000], PinpointStrike: [ Armor.APC_MTLB, Armor.APC_MTLB, @@ -993,6 +998,8 @@ PLANE_PAYLOAD_OVERRIDES = { Su_17M4: COMMON_OVERRIDE, F_4E: COMMON_OVERRIDE, P_47D_30:COMMON_OVERRIDE, + P_47D_30bl1:COMMON_OVERRIDE, + P_47D_40:COMMON_OVERRIDE, B_17G: COMMON_OVERRIDE, P_51D: COMMON_OVERRIDE, P_51D_30_NA: COMMON_OVERRIDE, diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index dd924f64..c2824ef8 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -62,6 +62,8 @@ CAP_CAPABLE = [ P_51D_30_NA, P_51D, P_47D_30, + P_47D_30bl1, + P_47D_40, SpitfireLFMkIXCW, SpitfireLFMkIX, @@ -130,6 +132,8 @@ CAS_CAPABLE = [ P_51D_30_NA, P_51D, P_47D_30, + P_47D_30bl1, + P_47D_40, A_20G, SpitfireLFMkIXCW, @@ -204,6 +208,8 @@ STRIKE_CAPABLE = [ P_51D_30_NA, P_51D, P_47D_30, + P_47D_30bl1, + P_47D_40, A_20G, B_17G, From 42c9af102bc04c232536fe6deb1659150b4de5a1 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 24 Sep 2020 19:56:56 +0200 Subject: [PATCH 05/40] Added KJ 2000 to China as AWACS --- game/factions/china_2010.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/factions/china_2010.py b/game/factions/china_2010.py index 148fdbd0..0d98d1b9 100644 --- a/game/factions/china_2010.py +++ b/game/factions/china_2010.py @@ -20,7 +20,7 @@ China_2010 = { An_30M, Yak_40, - A_50, + KJ_2000, Mi_8MT, Mi_28N, From fb40e9273dff8153a98e5dd163bf3588368a6946 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 24 Sep 2020 20:00:57 +0200 Subject: [PATCH 06/40] Added newest contributors to about dialog. --- qt_ui/windows/QLiberationWindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_ui/windows/QLiberationWindow.py b/qt_ui/windows/QLiberationWindow.py index da50e03f..c51547e6 100644 --- a/qt_ui/windows/QLiberationWindow.py +++ b/qt_ui/windows/QLiberationWindow.py @@ -221,7 +221,7 @@ class QLiberationWindow(QMainWindow): "

Authors

" + \ "

DCS Liberation was originally developed by shdwp, DCS Liberation 2.0 is a partial rewrite based on this work by Khopa." \ "

Contributors

" + \ - "shdwp, Khopa, Wrycu, calvinmorrow, JohanAberg, Deus, root0fall, Captain Cody" + \ + "shdwp, Khopa, ColonelPanic, Wrycu, calvinmorrow, JohanAberg, Deus, root0fall, Captain Cody, steveveepee, pedromagueija, parithon, bwRavencl" + \ "

Special Thanks :

" \ "rp- for the pydcs framework
"\ "Grimes (mrSkortch) & Speed for the MIST framework
"\ From c96b5cf4d7add73112202c0e7c462c6f8e218209 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 00:25:20 +0200 Subject: [PATCH 07/40] Fixed bug when buying armor at base --- gen/defenses/armor_group_generator.py | 30 ++++++++++++++----- gen/defenses/armored_group_generator.py | 17 +++++++++++ .../base_defenses/QBaseDefenseGroupInfo.py | 2 -- .../windows/groundobject/QGroundObjectMenu.py | 8 +++-- 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/gen/defenses/armor_group_generator.py b/gen/defenses/armor_group_generator.py index 3824f7da..7b772e31 100644 --- a/gen/defenses/armor_group_generator.py +++ b/gen/defenses/armor_group_generator.py @@ -3,22 +3,38 @@ import random from dcs.vehicles import Armor from game import db -from gen.defenses.armored_group_generator import ArmoredGroupGenerator +from gen.defenses.armored_group_generator import ArmoredGroupGenerator, FixedSizeArmorGroupGenerator def generate_armor_group(faction:str, game, ground_object): """ This generate a group of ground units - :param parentCp: The parent control point - :param ground_object: The ground object which will own the group - :param country: Owner country :return: Generated group """ possible_unit = [u for u in db.FACTIONS[faction]["units"] if u in Armor.__dict__.values()] if len(possible_unit) > 0: unit_type = random.choice(possible_unit) - generator = ArmoredGroupGenerator(game, ground_object, unit_type) - generator.generate() - return generator.get_generated_group() + return generate_armor_group_of_type(game, ground_object, unit_type) return None + + +def generate_armor_group_of_type(game, ground_object, unit_type): + """ + This generate a group of ground units of given type + :return: Generated group + """ + generator = ArmoredGroupGenerator(game, ground_object, unit_type) + generator.generate() + return generator.get_generated_group() + + +def generate_armor_group_of_type_and_size(game, ground_object, unit_type, size: int): + """ + This generate a group of ground units of given type and size + :return: Generated group + """ + generator = FixedSizeArmorGroupGenerator(game, ground_object, unit_type, size) + generator.generate() + return generator.get_generated_group() + diff --git a/gen/defenses/armored_group_generator.py b/gen/defenses/armored_group_generator.py index f678af81..3b81a1dd 100644 --- a/gen/defenses/armored_group_generator.py +++ b/gen/defenses/armored_group_generator.py @@ -25,3 +25,20 @@ class ArmoredGroupGenerator(GroupGenerator): self.position.y + spacing * j, self.heading) +class FixedSizeArmorGroupGenerator(GroupGenerator): + + def __init__(self, game, ground_object, unit_type, size): + super(FixedSizeArmorGroupGenerator, self).__init__(game, ground_object) + self.unit_type = unit_type + self.size = size + + def generate(self): + spacing = random.randint(20, 70) + + index = 0 + for i in range(self.size): + index = index + 1 + self.add_unit(self.unit_type, "Armor#" + str(index), + self.position.x + spacing * i, + self.position.y, self.heading) + diff --git a/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py b/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py index bafd70ee..94da80e5 100644 --- a/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py +++ b/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py @@ -39,8 +39,6 @@ class QBaseDefenseGroupInfo(QGroupBox): item = self.unit_layout.itemAt(i) if item is not None and item.widget() is not None: self.unit_layout.removeItem(item) - item.widget().setParent(None) - item.widget().deleteLater() for g in self.ground_object.groups: for u in g.units: diff --git a/qt_ui/windows/groundobject/QGroundObjectMenu.py b/qt_ui/windows/groundobject/QGroundObjectMenu.py index 6d28c357..dcfed0a3 100644 --- a/qt_ui/windows/groundobject/QGroundObjectMenu.py +++ b/qt_ui/windows/groundobject/QGroundObjectMenu.py @@ -1,7 +1,7 @@ import logging from PySide2 import QtCore -from PySide2.QtGui import QCloseEvent, Qt +from PySide2.QtGui import Qt from PySide2.QtWidgets import QHBoxLayout, QDialog, QGridLayout, QLabel, QGroupBox, QVBoxLayout, QPushButton, \ QComboBox, QSpinBox, QMessageBox from dcs import Point @@ -9,7 +9,7 @@ from dcs import Point from game import Game, db from game.data.building_data import FORTIFICATION_BUILDINGS from game.db import PRICES, unit_type_of, PinpointStrike -from gen.defenses.armor_group_generator import generate_armor_group +from gen.defenses.armor_group_generator import generate_armor_group_of_type_and_size from gen.sam.sam_group_generator import get_faction_possible_sams_generator from qt_ui.uiconstants import EVENT_ICONS from qt_ui.widgets.QBudgetBox import QBudgetBox @@ -288,7 +288,9 @@ class QBuyGroupForGroundObjectDialog(QDialog): self.buyArmorButton.setText("Buy [$" + str(db.PRICES[self.buyArmorCombo.itemData(self.buyArmorCombo.currentIndex())] * self.amount.value()) + "M][-$" + str(self.current_group_value) + "M]") def buyArmor(self): + print("Buy Armor ") utype = self.buyArmorCombo.itemData(self.buyArmorCombo.currentIndex()) + print(utype) price = db.PRICES[utype] * self.amount.value() - self.current_group_value if price > self.game.budget: self.error_money() @@ -298,7 +300,7 @@ class QBuyGroupForGroundObjectDialog(QDialog): self.game.budget -= price # Generate Armor - group = generate_armor_group(self.game.player_name, self.game, self.ground_object) + group = generate_armor_group_of_type_and_size(self.game, self.ground_object, utype, int(self.amount.value())) self.ground_object.groups = [group] GameUpdateSignal.get_instance().updateBudget(self.game) From ce257a31bb34362304e4ebdbdf177e253ebea500 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 00:36:13 +0200 Subject: [PATCH 08/40] Fixed UI bugs when buying new units in base defense menu. --- .../base_defenses/QBaseDefenseGroupInfo.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py b/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py index 94da80e5..370cf65a 100644 --- a/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py +++ b/qt_ui/windows/basemenu/base_defenses/QBaseDefenseGroupInfo.py @@ -35,10 +35,12 @@ class QBaseDefenseGroupInfo(QGroupBox): def buildLayout(self): unit_dict = {} - for i in range(self.unit_layout.count()): - item = self.unit_layout.itemAt(i) - if item is not None and item.widget() is not None: - self.unit_layout.removeItem(item) + for i in range(self.unit_layout.rowCount()): + for j in range(self.unit_layout.columnCount()): + item = self.unit_layout.itemAtPosition(i, j) + if item is not None and item.widget() is not None: + item.widget().setParent(None) + print("Remove " + str(i) + ", " + str(j)) for g in self.ground_object.groups: for u in g.units: @@ -58,6 +60,11 @@ class QBaseDefenseGroupInfo(QGroupBox): self.unit_layout.addWidget(QLabel(str(v) + " x " + "" + k + ""), i, 1) i = i + 1 + if len(unit_dict.items()) == 0: + self.unit_layout.addWidget(QLabel("/"), 0, 0) + + + self.setLayout(self.main_layout) def onManage(self): From e9bad2c7eb861ec82fcac97fd6be81875858975a Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 00:56:12 +0200 Subject: [PATCH 09/40] Version number update and changelog update --- changelog.md | 23 ++++++++++++++++++----- qt_ui/uiconstants.py | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 6569b827..aa1f7abc 100644 --- a/changelog.md +++ b/changelog.md @@ -2,11 +2,23 @@ ## Features/Improvements : * **[Other]** Added an installer option (thanks to contributor parithon) -* **[Kneeboards]** Added custom kneeboards (thanks to contributor danalbert) -* **[Kneeboards]** Custom kneeboards contains ATC/ILS informations (thanks to contributor danalbert) -* **[Comms/Radio]** Relevant frequencies are assigned to comms channel (thanks to contributor danalbert) -* **[Base Menu]** Added possibility to replace destroyed SAM and base defenses units for the player (Click on a SAM site to fix it) -* **[Cheat Menu]** Added recon images for buildings on strike targets, click on a Strike target to get detailled informations +* **[Kneeboards]** Generate mission kneeboards for player flights. Kneeboards include + airfield/carrier information (ATC frequencies, ILS, TACAN, and runway + assignments), assigned radio channels, waypoint lists, and AWACS/JTAC/tanker + information. +* **[Radios]** Allocate separate intra-flight channels for most aircraft to reduce global + chatter. +* **[Radios]** Configure radio channel presets for most aircraft. Currently supported are: + * AJS37 + * AV-8B + * F-14B + * F-16C + * F/A-18C + * JF-17 + * M-2000C +* **[Base Menu]** Added possibility to repair destroyed SAM and base defenses units for the player (Click on a SAM site to fix it) +* **[Base Menu]** Added possibility to buy/sell/replace SAM units +* **[Map]** Added recon images for buildings on strike targets, click on a Strike target to get detailled informations * **[Units/Factions]** Added F-16C to USA 1990 * **[Units/Factions]** Added MQ-9 Reaper as CAS unit for USA 2005 * **[Units/Factions]** Added Mig-21, Mig-23, SA-342L to Syria 2011 @@ -20,6 +32,7 @@ * **[Mission Generator]** AH-1W was not used by AI to generate CAS mission by default * **[Mission Generator]** Fixed F-16C targeting pod not being added to payload * **[Mission Generator]** AH-64A and AH-64D payloads fix. +* **[Units/Factions]** China will use KJ-2000 as awacs instead of A-50 # 2.1.0 diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index c0d52631..5920fa85 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -8,7 +8,7 @@ from game.event import UnitsDeliveryEvent, FrontlineAttackEvent from theater.theatergroundobject import CATEGORY_MAP from userdata.liberation_theme import get_theme_icons -VERSION_STRING = "2.1.0" +VERSION_STRING = "2.1.1 RC1" URLS : Dict[str, str] = { "Manual": "https://github.com/khopa/dcs_liberation/wiki", From aa9dcec0ad6b4a58a90e17877129bf6b37043f90 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 00:58:11 +0200 Subject: [PATCH 10/40] Version number --- qt_ui/uiconstants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index 5920fa85..02b9d14a 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -8,7 +8,7 @@ from game.event import UnitsDeliveryEvent, FrontlineAttackEvent from theater.theatergroundobject import CATEGORY_MAP from userdata.liberation_theme import get_theme_icons -VERSION_STRING = "2.1.1 RC1" +VERSION_STRING = "2.1.1" URLS : Dict[str, str] = { "Manual": "https://github.com/khopa/dcs_liberation/wiki", From e86a10e9baf94a32f4624f5aa3183ecd191ab300 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 01:13:59 +0200 Subject: [PATCH 11/40] JF-17 radio frequency fix. --- gen/radios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/radios.py b/gen/radios.py index bf4f1447..c0adb20c 100644 --- a/gen/radios.py +++ b/gen/radios.py @@ -124,7 +124,7 @@ RADIOS: List[Radio] = [ # 4 preset channels (A/B/C/D) Radio("SCR522", MHz(100), MHz(156), step=kHz(25)), - Radio("R&S M3AR VHF", MHz(108), MHz(174), step=MHz(1)), + Radio("R&S M3AR VHF", MHz(120), MHz(174), step=MHz(1)), Radio("R&S M3AR UHF", MHz(225), MHz(400), step=MHz(1)), ] From 83f221c5e3351717437ec7eb04b306a9b8acc267 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 01:23:05 +0200 Subject: [PATCH 12/40] Use latest data-export --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d8db9cf5..d1f0105e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "pydcs"] path = pydcs - url = https://github.com/pydcs/dcs - branch = master + url = https://github.com/khopa/dcs + branch = dataexport From 5e35efcaef5a1e526a142768b65712773f2c9090 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 10:36:18 +0200 Subject: [PATCH 13/40] UHF Intraflight Frequency for Player and Clients A-10C In the mission editor, using a VHF frequency for a Player or Client A-10C results in an error. Changed the radio definitions to use AN/ARC-164 for intraflight comms. --- gen/aircraft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 4911c916..25c48aa0 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -374,7 +374,7 @@ class AircraftData: AIRCRAFT_DATA: Dict[str, AircraftData] = { "A-10C": AircraftData( inter_flight_radio=get_radio("AN/ARC-164"), - intra_flight_radio=get_radio("AN/ARC-186(V) AM"), + intra_flight_radio=get_radio("AN/ARC-164"), channel_allocator=WarthogRadioChannelAllocator() ), From 84da44a27bd20c5b378caaa0d1be075b8442795f Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 11:06:25 +0200 Subject: [PATCH 14/40] Introduced LUA scripts plugins In order to be able to customize the scripts that can be injected in the mission, a __plugin.lst file is read and the scripts mentionned in this file are injected (through DoScriptFile and not DoScript). A mechanism checks if a standard script (Mist, JTACAutolase) has already been loaded, to avoid loading them twice. --- game/operation/operation.py | 62 ++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/game/operation/operation.py b/game/operation/operation.py index f66eb124..2449746e 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -234,30 +234,29 @@ class Operation: if self.game.settings.perf_smoke_gen: self.visualgen.generate() - # Inject Lua Scripts - load_mist = TriggerStart(comment="Load Mist Lua Framework") - with open("./resources/scripts/mist_4_3_74.lua") as f: - load_mist.add_action(DoScript(String(f.read()))) - self.current_mission.triggerrules.triggers.append(load_mist) + # Inject Plugins Lua Scripts + listOfPluginsScripts = [] + try: + with open("./resources/scripts/plugins/__plugins.lst", "r") as a_file: + for line in a_file: + name = line.strip() + if not name.startswith( '#' ): + trigger = TriggerStart(comment="Load " + name) + listOfPluginsScripts.append(name) + fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/plugins/" + name) + trigger.add_action(DoScriptFile(fileref)) + self.current_mission.triggerrules.triggers.append(trigger) + except Exception as e: + print(e) - # Load Ciribob's JTACAutoLase script - load_autolase = TriggerStart(comment="Load JTAC script") - with open("./resources/scripts/JTACAutoLase.lua") as f: - - script = f.read() - script = script + "\n" - - smoke = "true" - if hasattr(self.game.settings, "jtac_smoke_on"): - if not self.game.settings.jtac_smoke_on: - smoke = "false" - - for jtac in jtacs: - script += f"\nJTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle')\n" - - load_autolase.add_action(DoScript(String(script))) - self.current_mission.triggerrules.triggers.append(load_autolase) + # Inject Mist Script if not done already in the plugins + if not "mist.lua" in listOfPluginsScripts and not "mist_4_3_74.lua" in listOfPluginsScripts: # don't load mist twice + trigger = TriggerStart(comment="Load Mist Lua Framework") + fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/mist_4_3_74.lua") + trigger.add_action(DoScriptFile(fileref)) + self.current_mission.triggerrules.triggers.append(trigger) + # Inject Liberation script load_dcs_libe = TriggerStart(comment="Load DCS Liberation Script") with open("./resources/scripts/dcs_liberation.lua") as f: script = f.read() @@ -268,6 +267,25 @@ class Operation: load_dcs_libe.add_action(DoScript(String(script))) self.current_mission.triggerrules.triggers.append(load_dcs_libe) + # Load Ciribob's JTACAutoLase script if not done already in the plugins + if not "JTACAutoLase.lua" in listOfPluginsScripts: # don't load JTACAutoLase twice + load_autolase = TriggerStart(comment="Load JTAC script") + with open("./resources/scripts/JTACAutoLase.lua") as f: + + script = f.read() + script = script + "\n" + + smoke = "true" + if hasattr(self.game.settings, "jtac_smoke_on"): + if not self.game.settings.jtac_smoke_on: + smoke = "false" + + for jtac in jtacs: + script += f"\nJTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle')\n" + + load_autolase.add_action(DoScript(String(script))) + self.current_mission.triggerrules.triggers.append(load_autolase) + self.assign_channels_to_flights() kneeboard_generator = KneeboardGenerator(self.current_mission) From 1a125c62e7d7b7354669c2421f5e38e570f104eb Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 11:21:23 +0200 Subject: [PATCH 15/40] added sample __plugins.lst file --- .gitignore | 1 + .../scripts/plugins/__plugins.lst.sample | 29 +++++++++++++++++++ resources/scripts/plugins/link.cmd.sample | 29 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 resources/scripts/plugins/__plugins.lst.sample create mode 100644 resources/scripts/plugins/link.cmd.sample diff --git a/.gitignore b/.gitignore index 68c604e4..8c7d79f3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ logs/liberation.log qt_ui/logs/liberation.log *.psd +resources/scripts/plugins/* diff --git a/resources/scripts/plugins/__plugins.lst.sample b/resources/scripts/plugins/__plugins.lst.sample new file mode 100644 index 00000000..27cbf0c0 --- /dev/null +++ b/resources/scripts/plugins/__plugins.lst.sample @@ -0,0 +1,29 @@ +# this is a list of lua scripts that will be injected in the mission, in the same order +mist.lua +Moose.lua +CTLD.lua +NIOD.lua +WeatherMark.lua +veaf.lua +dcsUnits.lua +# JTACAutoLase is an empty file, only there to disable loading the official script (already included in CTLD) +JTACAutoLase.lua +veafAssets.lua +veafCarrierOperations.lua +veafCarrierOperations2.lua +veafCasMission.lua +veafCombatMission.lua +veafCombatZone.lua +veafGrass.lua +veafInterpreter.lua +veafMarkers.lua +veafMove.lua +veafNamedPoints.lua +veafRadio.lua +veafRemote.lua +veafSecurity.lua +veafShortcuts.lua +veafSpawn.lua +veafTransportMission.lua +veafUnits.lua +missionConfig.lua diff --git a/resources/scripts/plugins/link.cmd.sample b/resources/scripts/plugins/link.cmd.sample new file mode 100644 index 00000000..e9c69ce7 --- /dev/null +++ b/resources/scripts/plugins/link.cmd.sample @@ -0,0 +1,29 @@ +rem this can be used to easily create hardlinks from your plugin development folder + +mklink mist.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\mist.lua +mklink Moose.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\Moose.lua +mklink CTLD.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\CTLD.lua +mklink NIOD.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\NIOD.lua +mklink WeatherMark.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\WeatherMark.lua +mklink veaf.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veaf.lua +mklink dcsUnits.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\dcsUnits.lua +mklink JTACAutoLase.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\JTACAutoLase.lua +mklink veafAssets.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafAssets.lua +mklink veafCarrierOperations.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCarrierOperations.lua +mklink veafCarrierOperations2.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCarrierOperations2.lua +mklink veafCasMission.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCasMission.lua +mklink veafCombatMission.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCombatMission.lua +mklink veafCombatZone.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCombatZone.lua +mklink veafGrass.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafGrass.lua +mklink veafInterpreter.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafInterpreter.lua +mklink veafMarkers.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafMarkers.lua +mklink veafMove.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafMove.lua +mklink veafNamedPoints.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafNamedPoints.lua +mklink veafRadio.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafRadio.lua +mklink veafRemote.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafRemote.lua +mklink veafSecurity.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafSecurity.lua +mklink veafShortcuts.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafShortcuts.lua +mklink veafSpawn.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafSpawn.lua +mklink veafTransportMission.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafTransportMission.lua +mklink veafUnits.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafUnits.lua +mklink missionConfig.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\missionConfig.lua From 66f607b5e6a9cf790f6107b5f67a815a24c937e7 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 11:33:07 +0200 Subject: [PATCH 16/40] added a comment that links to my forum post --- gen/aircraft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 25c48aa0..81a6202e 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -374,7 +374,7 @@ class AircraftData: AIRCRAFT_DATA: Dict[str, AircraftData] = { "A-10C": AircraftData( inter_flight_radio=get_radio("AN/ARC-164"), - intra_flight_radio=get_radio("AN/ARC-164"), + intra_flight_radio=get_radio("AN/ARC-164"), # VHF for intraflight is not accepted anymore by DCS (see https://forums.eagle.ru/showthread.php?p=4499738) channel_allocator=WarthogRadioChannelAllocator() ), From 4d510f643a988a8ed83003e42d07d853b8277201 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 17:11:17 +0200 Subject: [PATCH 17/40] add tanker type to tanker name --- gen/airsupportgen.py | 2 +- gen/naming.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gen/airsupportgen.py b/gen/airsupportgen.py index da0689e9..791c80b6 100644 --- a/gen/airsupportgen.py +++ b/gen/airsupportgen.py @@ -65,7 +65,7 @@ class AirSupportConflictGenerator: tanker_position = player_cp.position.point_from_heading(tanker_heading, TANKER_DISTANCE) tanker_group = self.mission.refuel_flight( country=self.mission.country(self.game.player_country), - name=namegen.next_tanker_name(self.mission.country(self.game.player_country)), + name=namegen.next_tanker_name(self.mission.country(self.game.player_country), tanker_unit_type), airport=None, plane_type=tanker_unit_type, position=tanker_position, diff --git a/gen/naming.py b/gen/naming.py index 0b543e0c..40da3a6b 100644 --- a/gen/naming.py +++ b/gen/naming.py @@ -61,9 +61,9 @@ class NameGenerator: self.number += 1 return "awacs|{}|{}|0|".format(country.id, self.number) - def next_tanker_name(self, country): + def next_tanker_name(self, country, unit_type): self.number += 1 - return "tanker|{}|{}|0|".format(country.id, self.number) + return "tanker|{}|{}|0|{}".format(country.id, self.number, db.unit_type_name(unit_type)) def next_carrier_name(self, country): self.number += 1 From 72e6ae418646a53f35b9c8433eb031032372ade0 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 26 Sep 2020 16:32:02 -0700 Subject: [PATCH 18/40] Fix None dereference. --- gen/airfields.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen/airfields.py b/gen/airfields.py index 36f126b3..b7e08712 100644 --- a/gen/airfields.py +++ b/gen/airfields.py @@ -1527,7 +1527,10 @@ class RunwayData: ils: Optional[RadioFrequency] = None try: airfield = AIRFIELD_DATA[airport.name] - atc = airfield.atc.uhf + if airfield.atc is not None: + atc = airfield.atc.uhf + else: + atc = None tacan = airfield.tacan tacan_callsign = airfield.tacan_callsign ils = airfield.ils_freq(runway) From aa2e9b123cd01c1e17c328a88756a106947d2dce Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 28 Sep 2020 00:03:01 +0200 Subject: [PATCH 19/40] Fix : AI is not planning flights for Tornado. --- gen/flights/ai_flight_planner_db.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index c2824ef8..3b11b8ee 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -27,6 +27,7 @@ INTERCEPT_CAPABLE = [ # Used for CAP, Escort, and intercept if there is not a specialised aircraft available CAP_CAPABLE = [ + MiG_15bis, MiG_19P, MiG_21Bis, @@ -108,6 +109,9 @@ CAS_CAPABLE = [ F_16C_50, FA_18C_hornet, + Tornado_IDS, + Tornado_GR4, + C_101CC, MB_339PAN, L_39ZA, @@ -121,7 +125,6 @@ CAS_CAPABLE = [ AH_64D, AH_1W, - UH_1H, Mi_8MT, @@ -168,6 +171,9 @@ SEAD_CAPABLE = [ Su_34, MiG_27K, + Tornado_IDS, + Tornado_GR4, + A_4E_C, Rafale_A_S ] @@ -201,6 +207,9 @@ STRIKE_CAPABLE = [ F_16C_50, FA_18C_hornet, + Tornado_IDS, + Tornado_GR4, + C_101CC, L_39ZA, AJS37, @@ -237,6 +246,9 @@ ANTISHIP_CAPABLE = [ A_10C, A_10A, + Tornado_IDS, + Tornado_GR4, + Ju_88A4, Rafale_A_S ] From 7236c104033403b1aecdc57fedbe4323cc314774 Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 28 Sep 2020 00:21:12 +0200 Subject: [PATCH 20/40] Changelog update --- changelog.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index aa1f7abc..865636e7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +# 2.1.2 + +## Fixes : +* **[Mission Generator]** Fix mission generation issues with radio frequencies (Thanks to contributors davidp57 and danalbert) +* **[Mission Generator]** AI should now properly plan flights for Tornados + # 2.1.1 ## Features/Improvements : @@ -5,9 +11,9 @@ * **[Kneeboards]** Generate mission kneeboards for player flights. Kneeboards include airfield/carrier information (ATC frequencies, ILS, TACAN, and runway assignments), assigned radio channels, waypoint lists, and AWACS/JTAC/tanker - information. + information. (Thanks to contributor danalbert) * **[Radios]** Allocate separate intra-flight channels for most aircraft to reduce global - chatter. + chatter. (Thanks to contributor danalbert) * **[Radios]** Configure radio channel presets for most aircraft. Currently supported are: * AJS37 * AV-8B @@ -15,7 +21,7 @@ * F-16C * F/A-18C * JF-17 - * M-2000C + * M-2000C (Thanks to contributor danalbert) * **[Base Menu]** Added possibility to repair destroyed SAM and base defenses units for the player (Click on a SAM site to fix it) * **[Base Menu]** Added possibility to buy/sell/replace SAM units * **[Map]** Added recon images for buildings on strike targets, click on a Strike target to get detailled informations @@ -25,7 +31,7 @@ * **[Cheat Menu]** Added buttons to remove money ## Fixed issues : -* **[UI/UX]** Spelling issues (Thanks to Github contributor steveveepee) +* **[UI/UX]** Spelling issues (Thanks to contributor steveveepee) * **[Campaign Generator]** LHA was placed on land in Syrian Civil War campaign * **[Campaign Generator]** Fixed inverted configuration for Syria full map * **[Campaign Generator]** Syria "Inherent Resolve" campaign, added Incirlik Air Base From 8b0f8770415afe1810d1a755bc62de13e7b44a52 Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 28 Sep 2020 00:42:27 +0200 Subject: [PATCH 21/40] Verrsion string updated to 2.1.2 --- qt_ui/uiconstants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index 02b9d14a..98026f3a 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -8,7 +8,7 @@ from game.event import UnitsDeliveryEvent, FrontlineAttackEvent from theater.theatergroundobject import CATEGORY_MAP from userdata.liberation_theme import get_theme_icons -VERSION_STRING = "2.1.1" +VERSION_STRING = "2.1.2" URLS : Dict[str, str] = { "Manual": "https://github.com/khopa/dcs_liberation/wiki", From a2a70213a779ddcbf847f9ae9739d827d21825bd Mon Sep 17 00:00:00 2001 From: Khopa Date: Mon, 28 Sep 2020 00:55:02 +0200 Subject: [PATCH 22/40] Update pydcs location --- pydcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydcs b/pydcs index f46781b8..7b7c0322 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit f46781b854102a9f06948c8fb81a40331b78459e +Subproject commit 7b7c0322856c43ed8d1c7d29b2e30121129af048 From afbd4a471689ad6736c9d9128812dc0b7ae08a93 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Tue, 29 Sep 2020 17:27:35 +0200 Subject: [PATCH 23/40] Make mission portable use inline json.lua and write to %LIBERATION_EXPORT_DIR%, %TEMP% or the DCS working directory --- changelog.md | 3 +++ game/operation/operation.py | 27 +++++++++++---------- resources/scripts/dcs_liberation.lua | 35 ++++++++++++++++++++++++---- resources/scripts/json.lua | 2 +- 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/changelog.md b/changelog.md index 865636e7..30da09d0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# 2.x.x +* **[Mission Generator]** Use inline loading of the JSON.lua library, and save to either %LIBERATION_EXPORT_DIR%, to %TEMP%, or to DCS working directory + # 2.1.2 ## Fixes : diff --git a/game/operation/operation.py b/game/operation/operation.py index 2449746e..0e39bf1e 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -250,22 +250,25 @@ class Operation: print(e) # Inject Mist Script if not done already in the plugins - if not "mist.lua" in listOfPluginsScripts and not "mist_4_3_74.lua" in listOfPluginsScripts: # don't load mist twice - trigger = TriggerStart(comment="Load Mist Lua Framework") + if not "mist.lua" in listOfPluginsScripts and not "mist_4_3_74.lua" in listOfPluginsScripts: # don't load the script twice + trigger = TriggerStart(comment="Load Mist Lua framework") fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/mist_4_3_74.lua") trigger.add_action(DoScriptFile(fileref)) self.current_mission.triggerrules.triggers.append(trigger) - # Inject Liberation script - load_dcs_libe = TriggerStart(comment="Load DCS Liberation Script") - with open("./resources/scripts/dcs_liberation.lua") as f: - script = f.read() - json_location = "[["+os.path.abspath("resources\\scripts\\json.lua")+"]]" - state_location = "[[" + os.path.abspath("state.json") + "]]" - script = script.replace("{{json_file_abs_location}}", json_location) - script = script.replace("{{debriefing_file_location}}", state_location) - load_dcs_libe.add_action(DoScript(String(script))) - self.current_mission.triggerrules.triggers.append(load_dcs_libe) + # Inject JSON library if not done already in the plugins + if not "json.lua" in listOfPluginsScripts : # don't load the script twice + trigger = TriggerStart(comment="Load JSON Lua library") + fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/json.lua") + trigger.add_action(DoScriptFile(fileref)) + self.current_mission.triggerrules.triggers.append(trigger) + + # Inject DCS-Liberation script if not done already in the plugins + if not "json.lua" in listOfPluginsScripts : # don't load the script twice + trigger = TriggerStart(comment="Load DCS Liberation script") + fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/dcs_liberation.lua") + trigger.add_action(DoScriptFile(fileref)) + self.current_mission.triggerrules.triggers.append(trigger) # Load Ciribob's JTACAutoLase script if not done already in the plugins if not "JTACAutoLase.lua" in listOfPluginsScripts: # don't load JTACAutoLase twice diff --git a/resources/scripts/dcs_liberation.lua b/resources/scripts/dcs_liberation.lua index 5c594d35..bb0939b7 100644 --- a/resources/scripts/dcs_liberation.lua +++ b/resources/scripts/dcs_liberation.lua @@ -1,9 +1,5 @@ -local jsonlib = {{json_file_abs_location}} -json = loadfile(jsonlib)() - logger = mist.Logger:new("DCSLiberation", "info") - -debriefing_file_location = {{debriefing_file_location}} +logger:info("Check that json.lua is loaded : json = "..tostring(json)) killed_aircrafts = {} killed_ground_units = {} @@ -32,6 +28,11 @@ write_state = function() ["mission_ended"] = mission_ended, ["destroyed_objects_positions"] = destroyed_objects_positions, } + if not json then + local message = string.format("Unable to save DCS Liberation state to %s, JSON library is not loaded !",debriefing_file_location) + logger:error(message) + messageAll(message) + end fp:write(json:encode(game_state)) fp:close() -- logger.info("Done writing DCS Liberation state") @@ -39,6 +40,30 @@ write_state = function() end +debriefing_file_location = nil +if not debriefing_file_location then + if os then + debriefing_file_location = os.getenv("LIBERATION_EXPORT_DIR") + if debriefing_file_location then debriefing_file_location = debriefing_file_location .. "\\" end + end +end +if not debriefing_file_location then + if os then + debriefing_file_location = os.getenv("TEMP") + if debriefing_file_location then debriefing_file_location = debriefing_file_location .. "\\" end + end +end +if not debriefing_file_location then + if lfs then + debriefing_file_location = lfs.writedir() + end +end +if debriefing_file_location then + debriefing_file_location = debriefing_file_location .. "state.json" +end + +logger:info(string.format("DCS Liberation state will be written as json to [[%s]]",debriefing_file_location)) + write_state_error_handling = function() if pcall(write_state) then -- messageAll("Written DCS Liberation state to "..debriefing_file_location) diff --git a/resources/scripts/json.lua b/resources/scripts/json.lua index 8b3ddb1f..632c6840 100644 --- a/resources/scripts/json.lua +++ b/resources/scripts/json.lua @@ -968,7 +968,7 @@ function OBJDEF:new(args) return setmetatable(new, OBJDEF) end -return OBJDEF:new() +json = OBJDEF:new() -- -- Version history: From 18a1f0af94e9bc66eb66d19db71d3acbfe4bf1c0 Mon Sep 17 00:00:00 2001 From: Khopa Date: Tue, 29 Sep 2020 20:03:07 +0200 Subject: [PATCH 24/40] Added credits to new contributor to about dialog. --- qt_ui/windows/QLiberationWindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_ui/windows/QLiberationWindow.py b/qt_ui/windows/QLiberationWindow.py index c51547e6..bf086c5d 100644 --- a/qt_ui/windows/QLiberationWindow.py +++ b/qt_ui/windows/QLiberationWindow.py @@ -221,7 +221,7 @@ class QLiberationWindow(QMainWindow): "

Authors

" + \ "

DCS Liberation was originally developed by shdwp, DCS Liberation 2.0 is a partial rewrite based on this work by Khopa." \ "

Contributors

" + \ - "shdwp, Khopa, ColonelPanic, Wrycu, calvinmorrow, JohanAberg, Deus, root0fall, Captain Cody, steveveepee, pedromagueija, parithon, bwRavencl" + \ + "shdwp, Khopa, ColonelPanic, Wrycu, calvinmorrow, JohanAberg, Deus, root0fall, Captain Cody, steveveepee, pedromagueija, parithon, bwRavencl, davidp57" + \ "

Special Thanks :

" \ "rp- for the pydcs framework
"\ "Grimes (mrSkortch) & Speed for the MIST framework
"\ From 3bae591c048f28b147e510bee31023cc047c7ea7 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Tue, 29 Sep 2020 20:46:22 +0200 Subject: [PATCH 25/40] corrected and enhanced mission portability --- game/operation/operation.py | 68 +++++++++++++++++++++------- resources/scripts/dcs_liberation.lua | 45 ++++++++++++------ 2 files changed, 82 insertions(+), 31 deletions(-) diff --git a/game/operation/operation.py b/game/operation/operation.py index 0e39bf1e..57ff5c32 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -263,31 +263,67 @@ class Operation: trigger.add_action(DoScriptFile(fileref)) self.current_mission.triggerrules.triggers.append(trigger) + # set a LUA table with data from Liberation that we want to set + # at the moment it contains Liberation's install path, and an overridable definition for the JTACAutoLase function + # later, we'll add data about the units and points having been generated, in order to facilitate the configuration of the plugin lua scripts + state_location = "[[" + os.path.abspath("state.json") + "]]" + lua = """ +-- setting configuration table +env.info("DCSLiberation|: setting configuration table") + +-- all data in this table is overridable. +dcsLiberation = {} + +-- the base location for state.json; if non-existent, it'll be replaced with LIBERATION_EXPORT_DIR, TEMP, or DCS working directory +dcsLiberation.installPath=""" + state_location + """ + +-- you can override dcsLiberation.JTACAutoLase to make it use your own function ; it will be called with these parameters : ({jtac.unit_name}, {jtac.code}, {smoke}, 'vehicle') for all JTACs +if ctld then + dcsLiberation.JTACAutoLase=ctld.JTACAutoLase +elseif JTACAutoLase then + dcsLiberation.JTACAutoLase=JTACAutoLase +end + +-- later, we'll add more data to the table +--dcsLiberation.POIs = {} +--dcsLiberation.BASEs = {} +--dcsLiberation.JTACs = {} + """ + + trigger = TriggerStart(comment="Set DCS Liberation data") + trigger.add_action(DoScript(String(lua))) + self.current_mission.triggerrules.triggers.append(trigger) + # Inject DCS-Liberation script if not done already in the plugins - if not "json.lua" in listOfPluginsScripts : # don't load the script twice + if not "dcs_liberation.lua" in listOfPluginsScripts : # don't load the script twice trigger = TriggerStart(comment="Load DCS Liberation script") fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/dcs_liberation.lua") trigger.add_action(DoScriptFile(fileref)) self.current_mission.triggerrules.triggers.append(trigger) - # Load Ciribob's JTACAutoLase script if not done already in the plugins - if not "JTACAutoLase.lua" in listOfPluginsScripts: # don't load JTACAutoLase twice - load_autolase = TriggerStart(comment="Load JTAC script") - with open("./resources/scripts/JTACAutoLase.lua") as f: + # Inject Ciribob's JTACAutoLase if not done already in the plugins + if not "JTACAutoLase.lua" in listOfPluginsScripts : # don't load the script twice + trigger = TriggerStart(comment="Load JTACAutoLase.lua script") + fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/JTACAutoLase.lua") + trigger.add_action(DoScriptFile(fileref)) + self.current_mission.triggerrules.triggers.append(trigger) - script = f.read() - script = script + "\n" + # add a configuration for JTACAutoLase and start lasing for all JTACs + smoke = "true" + if hasattr(self.game.settings, "jtac_smoke_on"): + if not self.game.settings.jtac_smoke_on: + smoke = "false" - smoke = "true" - if hasattr(self.game.settings, "jtac_smoke_on"): - if not self.game.settings.jtac_smoke_on: - smoke = "false" + lua = """ +-- setting and starting JTACs +env.info("DCSLiberation|: setting and starting JTACs") +""" + for jtac in jtacs: + lua += f"if dcsLiberation.JTACAutoLase then dcsLiberation.JTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle') end\n" - for jtac in jtacs: - script += f"\nJTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle')\n" - - load_autolase.add_action(DoScript(String(script))) - self.current_mission.triggerrules.triggers.append(load_autolase) + trigger = TriggerStart(comment="Start JTACs") + trigger.add_action(DoScript(String(lua))) + self.current_mission.triggerrules.triggers.append(trigger) self.assign_channels_to_flights() diff --git a/resources/scripts/dcs_liberation.lua b/resources/scripts/dcs_liberation.lua index bb0939b7..70a5c239 100644 --- a/resources/scripts/dcs_liberation.lua +++ b/resources/scripts/dcs_liberation.lua @@ -39,31 +39,46 @@ write_state = function() -- messageAll("Done writing DCS Liberation state.") end - debriefing_file_location = nil -if not debriefing_file_location then +if dcsLiberation then + debriefing_file_location = dcsLiberation.installPath +end +if debriefing_file_location then + logger:info("Using DCS Liberation install folder for state.json") +else if os then debriefing_file_location = os.getenv("LIBERATION_EXPORT_DIR") if debriefing_file_location then debriefing_file_location = debriefing_file_location .. "\\" end end -end -if not debriefing_file_location then - if os then - debriefing_file_location = os.getenv("TEMP") - if debriefing_file_location then debriefing_file_location = debriefing_file_location .. "\\" end - end -end -if not debriefing_file_location then - if lfs then - debriefing_file_location = lfs.writedir() + if debriefing_file_location then + logger:info("Using LIBERATION_EXPORT_DIR environment variable for state.json") + else + if os then + debriefing_file_location = os.getenv("TEMP") + if debriefing_file_location then debriefing_file_location = debriefing_file_location .. "\\" end + end + if debriefing_file_location then + logger:info("Using TEMP environment variable for state.json") + else + if lfs then + debriefing_file_location = lfs.writedir() + end + if debriefing_file_location then + logger:info("Using DCS working directory for state.json") + end + end end end if debriefing_file_location then - debriefing_file_location = debriefing_file_location .. "state.json" + local filename = "state.json" + if not debriefing_file_location:sub(-#filename) == filename then + debriefing_file_location = debriefing_file_location .. filename + end + logger:info(string.format("DCS Liberation state will be written as json to [[%s]]",debriefing_file_location)) +else + logger:error("No usable storage path for state.json") end -logger:info(string.format("DCS Liberation state will be written as json to [[%s]]",debriefing_file_location)) - write_state_error_handling = function() if pcall(write_state) then -- messageAll("Written DCS Liberation state to "..debriefing_file_location) From f032001bee4bd7583fd2726a078a9c5a61487946 Mon Sep 17 00:00:00 2001 From: Khopa Date: Tue, 29 Sep 2020 23:47:57 +0200 Subject: [PATCH 26/40] Limit number of aircraft that can be bought at a Control Point. --- qt_ui/uiconstants.py | 1 + qt_ui/windows/basemenu/QRecruitBehaviour.py | 46 +++++++++++++++++- .../airfield/QAircraftRecruitmentMenu.py | 46 +++++++++++++++--- resources/ui/misc/hangar.png | Bin 0 -> 661 bytes theater/controlpoint.py | 23 +++++++++ 5 files changed, 109 insertions(+), 7 deletions(-) create mode 100644 resources/ui/misc/hangar.png diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index 98026f3a..1a15c811 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -82,6 +82,7 @@ def load_icons(): ICONS["New"] = QPixmap("./resources/ui/misc/"+get_theme_icons()+"/new.png") ICONS["Open"] = QPixmap("./resources/ui/misc/"+get_theme_icons()+"/open.png") ICONS["Save"] = QPixmap("./resources/ui/misc/"+get_theme_icons()+"/save.png") + ICONS["Hangar"] = QPixmap("./resources/ui/misc/hangar.png") ICONS["Terrain_Caucasus"] = QPixmap("./resources/ui/terrain_caucasus.gif") ICONS["Terrain_Persian_Gulf"] = QPixmap("./resources/ui/terrain_pg.gif") diff --git a/qt_ui/windows/basemenu/QRecruitBehaviour.py b/qt_ui/windows/basemenu/QRecruitBehaviour.py index a42b00d5..f180dd58 100644 --- a/qt_ui/windows/basemenu/QRecruitBehaviour.py +++ b/qt_ui/windows/basemenu/QRecruitBehaviour.py @@ -1,3 +1,5 @@ +import logging + from PySide2.QtWidgets import QLabel, QPushButton, \ QSizePolicy, QSpacerItem, QGroupBox, QHBoxLayout from dcs.unittype import UnitType @@ -11,11 +13,14 @@ class QRecruitBehaviour: deliveryEvent = None existing_units_labels = None bought_amount_labels = None + maximum_units = -1 + recruitable_types = [] BUDGET_FORMAT = "Available Budget: ${}M" def __init__(self): self.bought_amount_labels = {} self.existing_units_labels = {} + self.recruitable_types = [] self.update_available_budget() def add_purchase_row(self, unit_type, layout, row): @@ -66,7 +71,6 @@ class QRecruitBehaviour: sell.setSizePolicy(QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)) sell.clicked.connect(lambda: self.sell(unit_type)) - existLayout.addWidget(unitName) existLayout.addItem(QSpacerItem(20, 0, QSizePolicy.Minimum, QSizePolicy.Minimum)) existLayout.addWidget(existing_units) @@ -102,10 +106,19 @@ class QRecruitBehaviour: def buy(self, unit_type): + if self.maximum_units > 0: + if self.total_units + 1 > self.maximum_units: + logging.info("Not enough space left !") + # TODO : display modal warning + return + price = db.PRICES[unit_type] if self.game.budget >= price: self.deliveryEvent.deliver({unit_type: 1}) self.game.budget -= price + else: + # TODO : display modal warning + logging.info("Not enough money !") self._update_count_label(unit_type) self.update_available_budget() @@ -123,3 +136,34 @@ class QRecruitBehaviour: self._update_count_label(unit_type) self.update_available_budget() + + @property + def total_units(self): + + total = 0 + for unit_type in self.recruitables_types: + total += self.cp.base.total_units(unit_type) + print(unit_type, total, self.cp.base.total_units(unit_type)) + print("--------------------------------") + + if self.deliveryEvent: + for unit_bought in self.deliveryEvent.units: + if db.unit_task(unit_bought) in self.recruitables_types: + total += self.deliveryEvent.units[unit_bought] + print(unit_bought, total, self.deliveryEvent.units[unit_bought]) + + print("=============================") + + return total + + def set_maximum_units(self, maximum_units): + """ + Set the maximum number of units that can be bought + """ + self.maximum_units = maximum_units + + def set_recruitable_types(self, recruitables_types): + """ + Set the maximum number of units that can be bought + """ + self.recruitables_types = recruitables_types \ No newline at end of file diff --git a/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py b/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py index 2d4621d6..a4abf404 100644 --- a/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py +++ b/qt_ui/windows/basemenu/airfield/QAircraftRecruitmentMenu.py @@ -1,28 +1,35 @@ from PySide2.QtCore import Qt -from PySide2.QtWidgets import QVBoxLayout, QGridLayout, QGroupBox, QScrollArea, QFrame, QWidget +from PySide2.QtWidgets import QVBoxLayout, QGridLayout, QGroupBox, QScrollArea, QFrame, QWidget, QHBoxLayout, QLabel from game.event import UnitsDeliveryEvent +from qt_ui.uiconstants import ICONS from qt_ui.windows.basemenu.QRecruitBehaviour import QRecruitBehaviour -from theater import ControlPoint, CAP, CAS, db +from theater import ControlPoint, CAP, CAS, db, ControlPointType from game import Game class QAircraftRecruitmentMenu(QFrame, QRecruitBehaviour): - def __init__(self, cp:ControlPoint, game:Game): + def __init__(self, cp: ControlPoint, game: Game): QFrame.__init__(self) self.cp = cp self.game = game - self.bought_amount_labels = {} - self.existing_units_labels = {} - for event in self.game.events: if event.__class__ == UnitsDeliveryEvent and event.from_cp == self.cp: self.deliveryEvent = event if not self.deliveryEvent: self.deliveryEvent = self.game.units_delivery_event(self.cp) + # Determine maximum number of aircrafts that can be bought + self.set_maximum_units(self.cp.available_aircraft_slots) + self.set_recruitable_types([CAP, CAS]) + + self.bought_amount_labels = {} + self.existing_units_labels = {} + + self.hangar_status = QHangarStatus(self.total_units, self.cp.available_aircraft_slots) + self.init_ui() def init_ui(self): @@ -57,5 +64,32 @@ class QAircraftRecruitmentMenu(QFrame, QRecruitBehaviour): scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) scroll.setWidgetResizable(True) scroll.setWidget(scroll_content) + main_layout.addLayout(self.hangar_status) main_layout.addWidget(scroll) self.setLayout(main_layout) + + def buy(self, unit_type): + super().buy(unit_type) + self.hangar_status.update_label(self.total_units, self.cp.available_aircraft_slots) + + def sell(self, unit_type): + super().sell(unit_type) + self.hangar_status.update_label(self.total_units, self.cp.available_aircraft_slots) + + +class QHangarStatus(QHBoxLayout): + + def __init__(self, current_amount: int, max_amount: int): + super(QHangarStatus, self).__init__() + self.icon = QLabel() + self.icon.setPixmap(ICONS["Hangar"]) + self.text = QLabel("") + + self.update_label(current_amount, max_amount) + self.addWidget(self.icon, Qt.AlignLeft) + self.addWidget(self.text, Qt.AlignLeft) + self.addStretch(50) + self.setAlignment(Qt.AlignLeft) + + def update_label(self, current_amount: int, max_amount: int): + self.text.setText("{}/{}".format(current_amount, max_amount)) diff --git a/resources/ui/misc/hangar.png b/resources/ui/misc/hangar.png new file mode 100644 index 0000000000000000000000000000000000000000..dc98f55991fb9cf80c006a18b555cc0311682a4a GIT binary patch literal 661 zcmV;G0&4wPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0xC&FK~z{r?UpfX z6hRn3_asG%ASo;@1I8|;R$5pD6#NT{Nw1xSVC?L)S26z}SgBy4AZRIAM8Q(9ND5Iq z1Lu2t-(2Q4yL)>pn&uunW^ZQp+iz!PXKpYY4vW4F27|cj&xt6Hjd=p|1m+3M6PR@; zT)<1Xif8at_z6Ep`HCI#fU+AV(9w0=#c9}QJ;G0=%LtstN0@?sz}M&-?}uqbF5()> z3*2NhzK(u2U;-^J;YXBjxPc2;wpWQZ``A~!cPX0dp+l1fdyZnDWt`~KMD$IG8^g6z zOWPDYz?=9BpWt_#g=M^fj=)2v;+BKV;b9M z970C9J1BRs+NNm)EF;2*sFT_$qTZOY6ICVo2$)^kZk>NISnHg(!NW`{-JfE5ri^#T zJOPKs`FV?J|GpdcWqd!=U`%8CjPW$&30#iyWt5WUw=dQEQ|$Dti8Zi?vW9tmZtpc9 zv>99WqH4SkoWpnc13d$p@VLEzu6U2+oVK Date: Wed, 30 Sep 2020 18:52:19 -0700 Subject: [PATCH 27/40] Fix more None ATC bugs. Fixes https://github.com/Khopa/dcs_liberation/issues/164 --- gen/aircraft.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 81a6202e..ec5dec26 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -279,13 +279,15 @@ class CommonRadioChannelAllocator(RadioChannelAllocator): last_channel = flight.num_radio_channels(radio_id) channel_alloc = iter(range(first_channel, last_channel + 1)) - flight.assign_channel(radio_id, next(channel_alloc), flight.departure.atc) + if flight.departure.atc is not None: + flight.assign_channel(radio_id, next(channel_alloc), + flight.departure.atc) # TODO: If there ever are multiple AWACS, limit to mission relevant. for awacs in air_support.awacs: flight.assign_channel(radio_id, next(channel_alloc), awacs.freq) - if flight.arrival != flight.departure: + if flight.arrival != flight.departure and flight.arrival.atc is not None: flight.assign_channel(radio_id, next(channel_alloc), flight.arrival.atc) @@ -295,7 +297,7 @@ class CommonRadioChannelAllocator(RadioChannelAllocator): flight.assign_channel( radio_id, next(channel_alloc), tanker.freq) - if flight.divert is not None: + if flight.divert is not None and flight.divert.atc is not None: flight.assign_channel(radio_id, next(channel_alloc), flight.divert.atc) except StopIteration: From 8054a0b62f5f0782e62079d2e76e1acb74faa236 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Wed, 30 Sep 2020 13:34:41 +0200 Subject: [PATCH 28/40] removed useless link.cmd.sample file --- resources/scripts/plugins/link.cmd.sample | 29 ----------------------- 1 file changed, 29 deletions(-) delete mode 100644 resources/scripts/plugins/link.cmd.sample diff --git a/resources/scripts/plugins/link.cmd.sample b/resources/scripts/plugins/link.cmd.sample deleted file mode 100644 index e9c69ce7..00000000 --- a/resources/scripts/plugins/link.cmd.sample +++ /dev/null @@ -1,29 +0,0 @@ -rem this can be used to easily create hardlinks from your plugin development folder - -mklink mist.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\mist.lua -mklink Moose.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\Moose.lua -mklink CTLD.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\CTLD.lua -mklink NIOD.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\NIOD.lua -mklink WeatherMark.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\community\WeatherMark.lua -mklink veaf.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veaf.lua -mklink dcsUnits.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\dcsUnits.lua -mklink JTACAutoLase.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\JTACAutoLase.lua -mklink veafAssets.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafAssets.lua -mklink veafCarrierOperations.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCarrierOperations.lua -mklink veafCarrierOperations2.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCarrierOperations2.lua -mklink veafCasMission.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCasMission.lua -mklink veafCombatMission.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCombatMission.lua -mklink veafCombatZone.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafCombatZone.lua -mklink veafGrass.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafGrass.lua -mklink veafInterpreter.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafInterpreter.lua -mklink veafMarkers.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafMarkers.lua -mklink veafMove.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafMove.lua -mklink veafNamedPoints.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafNamedPoints.lua -mklink veafRadio.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafRadio.lua -mklink veafRemote.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafRemote.lua -mklink veafSecurity.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafSecurity.lua -mklink veafShortcuts.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafShortcuts.lua -mklink veafSpawn.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafSpawn.lua -mklink veafTransportMission.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafTransportMission.lua -mklink veafUnits.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\veafUnits.lua -mklink missionConfig.lua d:\dev\_VEAF\VEAF-Mission-Creation-Tools\src\scripts\veaf\missionConfig.lua From 473a7d5fa4b5d65959de0ad420d37c69f6c299af Mon Sep 17 00:00:00 2001 From: David Pierron Date: Wed, 30 Sep 2020 13:35:09 +0200 Subject: [PATCH 29/40] added a 'mkrelease' config for VS.Code --- .vscode/launch.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 646c8768..fde0564f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,6 +14,17 @@ "PYTHONPATH": ".;./pydcs" }, "preLaunchTask": "Prepare Environment" + }, + { + "name": "Python: Make Release", + "type": "python", + "request": "launch", + "program": "resources\\tools\\mkrelease.py", + "console": "integratedTerminal", + "env": { + "PYTHONPATH": ".;./pydcs" + }, + "preLaunchTask": "Prepare Environment" } ] } \ No newline at end of file From f732cc54d0c4e80603d427a8fe0709ef49ab7598 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 30 Sep 2020 21:00:33 -0700 Subject: [PATCH 30/40] Build and archive binaries on push/PR. Not building a full release, but this makes it easier to test someone else's PR, or for players to get at pre-release builds. --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..9d0da6a6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build + +on: [push, pull_request] + +jobs: + + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install environment + run: | + py -m venv ./venv + + - name: Install dependencies + run: | + ./venv/scripts/activate + pip install -r requirements.txt + # 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 + run: | + ./venv/scripts/activate + $env:PYTHONPATH=".;./pydcs" + pyinstaller pyinstaller.spec + + - uses: actions/upload-artifact@v2 + with: + name: dcs_liberation + path: dist/ From 0873dcab0a43c9c2431b7f397f418306ac734296 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 19:06:38 +0200 Subject: [PATCH 31/40] Gitmodule points to pydcs --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d1f0105e..d8db9cf5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "pydcs"] path = pydcs - url = https://github.com/khopa/dcs - branch = dataexport + url = https://github.com/pydcs/dcs + branch = master From f9d5c1f8de62dd3f94ee42e97ea9127076c58e4b Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 19:07:06 +0200 Subject: [PATCH 32/40] Update pydcs location --- pydcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydcs b/pydcs index 7b7c0322..eea75579 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit 7b7c0322856c43ed8d1c7d29b2e30121129af048 +Subproject commit eea755798bce6cf6549df146fbff46ff3a7a5c47 From e48e88428669da58b14d4873e12da30cd77c1cc3 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 19:20:25 +0200 Subject: [PATCH 33/40] Added A-10C_2. Changed bluefor factions' country to "Combined Joint Task Forces Blue" instead of "USA" (support more units) --- game/db.py | 3 +++ game/factions/bluefor_coldwar.py | 2 +- game/factions/bluefor_coldwar_a4.py | 2 +- game/factions/bluefor_modern.py | 3 ++- game/factions/usa_2005.py | 1 + gen/flights/ai_flight_planner_db.py | 3 +++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/game/db.py b/game/db.py index 02120a45..f2b94b54 100644 --- a/game/db.py +++ b/game/db.py @@ -192,6 +192,7 @@ PRICES = { A_10A: 16, A_10C: 22, + A_10C_2: 24, # heli Ka_50: 13, @@ -498,6 +499,7 @@ UNIT_BY_TASK = { AJS37, A_10A, A_10C, + A_10C_2, Su_17M4, Su_25, Su_25T, @@ -957,6 +959,7 @@ PLANE_PAYLOAD_OVERRIDES = { }, A_10A: COMMON_OVERRIDE, A_10C: COMMON_OVERRIDE, + A_10C_2: COMMON_OVERRIDE, AV8BNA: COMMON_OVERRIDE, C_101CC: COMMON_OVERRIDE, F_5E_3: COMMON_OVERRIDE, diff --git a/game/factions/bluefor_coldwar.py b/game/factions/bluefor_coldwar.py index 70bf9467..5db15d73 100644 --- a/game/factions/bluefor_coldwar.py +++ b/game/factions/bluefor_coldwar.py @@ -4,7 +4,7 @@ from dcs.ships import * from dcs.vehicles import * BLUEFOR_COLDWAR = { - "country": "USA", + "country": "Combined Joint Task Forces Blue", "side": "blue", "units": [ diff --git a/game/factions/bluefor_coldwar_a4.py b/game/factions/bluefor_coldwar_a4.py index 5bf366f5..74983134 100644 --- a/game/factions/bluefor_coldwar_a4.py +++ b/game/factions/bluefor_coldwar_a4.py @@ -6,7 +6,7 @@ from dcs.vehicles import * from pydcs_extensions.a4ec.a4ec import A_4E_C BLUEFOR_COLDWAR_A4 = { - "country": "USA", + "country": "Combined Joint Task Forces Blue", "side": "blue", "units": [ diff --git a/game/factions/bluefor_modern.py b/game/factions/bluefor_modern.py index ca64e2f5..8db0ad89 100644 --- a/game/factions/bluefor_modern.py +++ b/game/factions/bluefor_modern.py @@ -4,7 +4,7 @@ from dcs.ships import * from dcs.vehicles import * BLUEFOR_MODERN = { - "country": "USA", + "country": "Combined Joint Task Forces Blue", "side": "blue", "units": [ @@ -20,6 +20,7 @@ BLUEFOR_MODERN = { Su_25T, A_10A, A_10C, + A_10C_2, AV8BNA, AJS37, diff --git a/game/factions/usa_2005.py b/game/factions/usa_2005.py index ddeccd0b..d6b63a58 100644 --- a/game/factions/usa_2005.py +++ b/game/factions/usa_2005.py @@ -13,6 +13,7 @@ USA_2005 = { FA_18C_hornet, F_16C_50, A_10C, + A_10C_2, AV8BNA, MQ_9_Reaper, diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index 3b11b8ee..e1393a1a 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -99,6 +99,7 @@ CAS_CAPABLE = [ A_10A, A_10C, + A_10C_2, AV8BNA, F_86F_Sabre, @@ -197,6 +198,7 @@ STRIKE_CAPABLE = [ A_10A, A_10C, + A_10C_2, AV8BNA, F_86F_Sabre, @@ -244,6 +246,7 @@ ANTISHIP_CAPABLE = [ F_16A, F_16C_50, A_10C, + A_10C_2, A_10A, Tornado_IDS, From 72ce37f008c576528e87976658d29076546d2ccd Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 19:33:46 +0200 Subject: [PATCH 34/40] Added custom payloads for A-10C II --- resources/customized_payloads/A-10C_2.lua | 219 ++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 resources/customized_payloads/A-10C_2.lua diff --git a/resources/customized_payloads/A-10C_2.lua b/resources/customized_payloads/A-10C_2.lua new file mode 100644 index 00000000..bae0f048 --- /dev/null +++ b/resources/customized_payloads/A-10C_2.lua @@ -0,0 +1,219 @@ +local unitPayloads = { + ["name"] = "A-10C II", + ["payloads"] = { + [1] = { + ["name"] = "New Payload", + ["pylons"] = { + [1] = { + ["CLSID"] = "{LAU-131x3 - 7 AGR-20A}", + ["num"] = 8, + }, + [2] = { + ["CLSID"] = "{LAU-131x3 - 7 AGR-20 M282}", + ["num"] = 9, + }, + [3] = { + ["CLSID"] = "{LAU-131x3 - 7 AGR-20A}", + ["num"] = 4, + }, + [4] = { + ["CLSID"] = "{LAU-131x3 - 7 AGR-20 M282}", + ["num"] = 3, + }, + [5] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20A}", + ["num"] = 2, + }, + [6] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20A}", + ["num"] = 10, + }, + }, + ["tasks"] = { + [1] = 31, + }, + }, + [2] = { + ["name"] = "CAP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{DB434044-F5D0-4F1F-9BA9-B73027E18DD3}", + ["num"] = 11, + }, + [2] = { + ["CLSID"] = "{DB434044-F5D0-4F1F-9BA9-B73027E18DD3}", + ["num"] = 1, + }, + }, + ["tasks"] = { + [1] = 31, + }, + }, + [3] = { + ["name"] = "CAS", + ["pylons"] = { + [1] = { + ["CLSID"] = "ALQ_184", + ["num"] = 1, + }, + [2] = { + ["CLSID"] = "{DB434044-F5D0-4F1F-9BA9-B73027E18DD3}", + ["num"] = 11, + }, + [3] = { + ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", + ["num"] = 10, + }, + [4] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20 M282}", + ["num"] = 8, + }, + [5] = { + ["CLSID"] = "{E6A6262A-CA08-4B3D-B030-E1A993B98453}", + ["num"] = 9, + }, + [6] = { + ["CLSID"] = "{E6A6262A-CA08-4B3D-B030-E1A993B98452}", + ["num"] = 3, + }, + [7] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20 M282}", + ["num"] = 4, + }, + [8] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20A}", + ["num"] = 2, + }, + }, + ["tasks"] = { + [1] = 31, + }, + }, + [4] = { + ["name"] = "STRIKE", + ["pylons"] = { + [1] = { + ["CLSID"] = "{DB434044-F5D0-4F1F-9BA9-B73027E18DD3}", + ["num"] = 11, + }, + [2] = { + ["CLSID"] = "ALQ_184", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", + ["num"] = 10, + }, + [4] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 8, + }, + [5] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 7, + }, + [6] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 4, + }, + [7] = { + ["CLSID"] = "{69DC8AE7-8F77-427B-B8AA-B19D3F478B66}", + ["num"] = 3, + }, + [8] = { + ["CLSID"] = "{69DC8AE7-8F77-427B-B8AA-B19D3F478B66}", + ["num"] = 9, + }, + [9] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 5, + }, + }, + ["tasks"] = { + [1] = 31, + }, + }, + [5] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{DB434044-F5D0-4F1F-9BA9-B73027E18DD3}", + ["num"] = 11, + }, + [2] = { + ["CLSID"] = "ALQ_184", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", + ["num"] = 10, + }, + [4] = { + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", + ["num"] = 9, + }, + [5] = { + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", + ["num"] = 3, + }, + [6] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20 M282}", + ["num"] = 2, + }, + }, + ["tasks"] = { + [1] = 31, + }, + }, + [6] = { + ["name"] = "SEAD", + ["pylons"] = { + [1] = { + ["CLSID"] = "{DB434044-F5D0-4F1F-9BA9-B73027E18DD3}", + ["num"] = 11, + }, + [2] = { + ["CLSID"] = "ALQ_184", + ["num"] = 1, + }, + [3] = { + ["CLSID"] = "{A111396E-D3E8-4b9c-8AC9-2432489304D5}", + ["num"] = 10, + }, + [4] = { + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", + ["num"] = 9, + }, + [5] = { + ["CLSID"] = "{DAC53A2F-79CA-42FF-A77A-F5649B601308}", + ["num"] = 3, + }, + [6] = { + ["CLSID"] = "{LAU-131 - 7 AGR-20 M282}", + ["num"] = 2, + }, + [7] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 7, + }, + [8] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 5, + }, + [9] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 8, + }, + [10] = { + ["CLSID"] = "{GBU-38}", + ["num"] = 4, + }, + }, + ["tasks"] = { + [1] = 31, + }, + }, + }, + ["unitType"] = "A-10C_2", +} +return unitPayloads From 75af2d468e48c339c7f0d789892b0521fe5424a0 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 19:38:43 +0200 Subject: [PATCH 35/40] Fix A-10C_II icon --- qt_ui/uiconstants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index 1a15c811..ada6c94c 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -8,7 +8,7 @@ from game.event import UnitsDeliveryEvent, FrontlineAttackEvent from theater.theatergroundobject import CATEGORY_MAP from userdata.liberation_theme import get_theme_icons -VERSION_STRING = "2.1.2" +VERSION_STRING = "2.1.3" URLS : Dict[str, str] = { "Manual": "https://github.com/khopa/dcs_liberation/wiki", @@ -139,6 +139,7 @@ def load_aircraft_icons(): AIRCRAFT_ICONS[aircraft[:-7]] = QPixmap(os.path.join("./resources/ui/units/aircrafts/", aircraft)) AIRCRAFT_ICONS["F-16C_50"] = AIRCRAFT_ICONS["F-16C"] AIRCRAFT_ICONS["FA-18C_hornet"] = AIRCRAFT_ICONS["FA-18C"] + AIRCRAFT_ICONS["A-10C_2"] = AIRCRAFT_ICONS["A-10C"] def load_vehicle_icons(): From 8402d108c06d053fb68a692c840b707ae7f78b5a Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 20:22:11 +0200 Subject: [PATCH 36/40] Pydcs location --- pydcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydcs b/pydcs index eea75579..ceea62a8 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit eea755798bce6cf6549df146fbff46ff3a7a5c47 +Subproject commit ceea62a8e0731c21b3e1a3e90682aa0affc168f1 From 8ecb4cdcf41100fde9f16e1421ee1ff67e33908f Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 21:09:05 +0200 Subject: [PATCH 37/40] Added more ground vehicles icons. --- resources/ui/units/vehicles/2S6 Tunguska_24.jpg | Bin 0 -> 1118 bytes resources/ui/units/vehicles/Bofors 40 mm_24.jpg | Bin 0 -> 1072 bytes resources/ui/units/vehicles/Gepard_24.jpg | Bin 0 -> 1145 bytes .../ui/units/vehicles/HAWK ANMPG-46 TR_24.jpg | Bin 0 -> 1113 bytes .../ui/units/vehicles/HAWK ANMPQ-50 SR_24.jpg | Bin 0 -> 1119 bytes resources/ui/units/vehicles/HAWK M192 LN_24.jpg | Bin 0 -> 1103 bytes .../units/vehicles/HQ-7 Mobile Launcher_24.jpg | Bin 0 -> 1107 bytes .../ui/units/vehicles/HQ-7 Mobile Radar_24.jpg | Bin 0 -> 1118 bytes resources/ui/units/vehicles/M-163 Vulcan_24.jpg | Bin 0 -> 1104 bytes ... HMMWV_24.jpg => M1043 HMMWV Armament_24.jpg} | Bin resources/ui/units/vehicles/M1097 Avenger_24.jpg | Bin 0 -> 1039 bytes resources/ui/units/vehicles/M1A2_24.jpg | Bin 0 -> 1095 bytes resources/ui/units/vehicles/M2A2_24.jpg | Bin 0 -> 1081 bytes resources/ui/units/vehicles/M48 Chaparral_24.jpg | Bin 0 -> 1126 bytes resources/ui/units/vehicles/M6 Linebacker_24.jpg | Bin 0 -> 1127 bytes resources/ui/units/vehicles/M818_24.jpg | Bin 0 -> 1081 bytes resources/ui/units/vehicles/Marder_24.jpg | Bin 0 -> 1103 bytes .../{Merkava Mk IV_24.jpg => Merkava Mk4_24.jpg} | Bin resources/ui/units/vehicles/Osa 9A33 ln_24.jpg | Bin 0 -> 1156 bytes resources/ui/units/vehicles/Roland ADS_24.jpg | Bin 0 -> 1109 bytes resources/ui/units/vehicles/Roland Radar_24.jpg | Bin 0 -> 1014 bytes resources/ui/units/vehicles/T-80UD_24.jpg | Bin 0 -> 1062 bytes resources/ui/units/vehicles/ZU-23 Ural_24.jpg | Bin 0 -> 1119 bytes resources/ui/units/vehicles/ZU-23_24.jpg | Bin 0 -> 1035 bytes 24 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/ui/units/vehicles/2S6 Tunguska_24.jpg create mode 100644 resources/ui/units/vehicles/Bofors 40 mm_24.jpg create mode 100644 resources/ui/units/vehicles/Gepard_24.jpg create mode 100644 resources/ui/units/vehicles/HAWK ANMPG-46 TR_24.jpg create mode 100644 resources/ui/units/vehicles/HAWK ANMPQ-50 SR_24.jpg create mode 100644 resources/ui/units/vehicles/HAWK M192 LN_24.jpg create mode 100644 resources/ui/units/vehicles/HQ-7 Mobile Launcher_24.jpg create mode 100644 resources/ui/units/vehicles/HQ-7 Mobile Radar_24.jpg create mode 100644 resources/ui/units/vehicles/M-163 Vulcan_24.jpg rename resources/ui/units/vehicles/{M1043 HMMWV_24.jpg => M1043 HMMWV Armament_24.jpg} (100%) create mode 100644 resources/ui/units/vehicles/M1097 Avenger_24.jpg create mode 100644 resources/ui/units/vehicles/M1A2_24.jpg create mode 100644 resources/ui/units/vehicles/M2A2_24.jpg create mode 100644 resources/ui/units/vehicles/M48 Chaparral_24.jpg create mode 100644 resources/ui/units/vehicles/M6 Linebacker_24.jpg create mode 100644 resources/ui/units/vehicles/M818_24.jpg create mode 100644 resources/ui/units/vehicles/Marder_24.jpg rename resources/ui/units/vehicles/{Merkava Mk IV_24.jpg => Merkava Mk4_24.jpg} (100%) create mode 100644 resources/ui/units/vehicles/Osa 9A33 ln_24.jpg create mode 100644 resources/ui/units/vehicles/Roland ADS_24.jpg create mode 100644 resources/ui/units/vehicles/Roland Radar_24.jpg create mode 100644 resources/ui/units/vehicles/T-80UD_24.jpg create mode 100644 resources/ui/units/vehicles/ZU-23 Ural_24.jpg create mode 100644 resources/ui/units/vehicles/ZU-23_24.jpg diff --git a/resources/ui/units/vehicles/2S6 Tunguska_24.jpg b/resources/ui/units/vehicles/2S6 Tunguska_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..94e5ee27799a380cb5376bfd758a0c11f446d2bb GIT binary patch literal 1118 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!xw&?&{&VNY%@!BSFQG&Xy|Z+aZah_m)AeS zr&i297N@-JnqJP^_tPYj6&Ci2Ml>W%0)0d-CbLuS@Yd{ch<@!Zh2p^06$ zJZ1^Z?2XnwW}d#TerkO8BPZwOhb1pZRc~OLD08qmnc3EO*5}`{j&F0PsJxb5e~NvE zLG8=*t9py~^nJSa%5-YMs}~`niC(5!YJ7954R)q<$?+ zzn(H-UiaRLzuN0A{He)Xw`kLz-kDEWR4zVkRHzqUn(>jh#Q2+ruk)c>dE1wsEPAE1 zhuyBIfA))7*MguQS-~{{il4d@=h`JLzLLKFv8(8zWsf&r)Mb+Ax@+=U=Aws^%=-}O z{%yuV&JVRWTAGJV>L@6C6L|6szpcii$?H{G#QyQ`n|v;Ftr~+{&8Ag+(c9cIul?h^ zqV9QS+hup9hNRmP3CDLR+mtQp>R;m{SnmCSZ?X32Z@ZPn96sG$a*KWCfhYf_UeB!K giPgJVGvm8o#AdIGzAfrH`$+9(ru_e#06r|mfdBvi literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/Bofors 40 mm_24.jpg b/resources/ui/units/vehicles/Bofors 40 mm_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dda787d8bfe31128395123b4399f313ffd66ac47 GIT binary patch literal 1072 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!%O>ZSKT7_NAc~JbaEERo_(eMVroV=^ZBU5 zvqKssABIozZYWR={Bu6*v0wg5u@`0A?Np*OX5PGzP`Gmg=NtaVk!K(Mo?RRGVE3m- zt!2}aPsCX=^zGfb&i3h~zpBEXJPyY$K6vu(xy`)$y=LAw^c>r=!)7K2a340_cBkZ^ zCG+yC_4PZKB&=O|-|^Awumq{69x4ol+j~mavR;47dHz*{;Sjw`$C`H+}Fl iTXe}mLRjkP);Y`*IL}#^iQX-I>na*FXX!_t|2F|a+o%ly literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/Gepard_24.jpg b/resources/ui/units/vehicles/Gepard_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f2775a847d56c92ae44b33d3dd41a2a493d2960d GIT binary patch literal 1145 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!&|nM!h9U-tdGd)UHxLcY?Ax-2(<~_C0a7M z62EUeUv7Hr^{#pQm*4fcbn3%F?Tsyy48koWjz5fK57|{?`%PV;rt#;os;_GvTYgQe zS-tU!=SSru;^Ak$J-WsbzQoZy@4)lP=WVl^YCJzO$Nk(Kdt`TE$DWBBKSOE39l1S^cFfgI8w389>aKJdpcwX^l{ zx_H=j-w%N&nz?)a#awze_3%`=JNpzTE)vq~Uolldpio@lKf{5SN*`G^d9C>6`p0pO z-Y0<->^l|v7}lF@`Z#^M)p2F>n}0U!cH_Hb{V~>e>-Sr4EJw*hT^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!@GYc=XKRXxrVwbpqZJ=E2`^JP5GR_(cIwyt?8l`KpOOYdxty|>@%{l62o z+6Q!Og4bqp1RZ;19q}Y*V;jf8dY=cyef3e-FWTg;x?j!j_NE0^+ves!=LjpE=;`rkb)Td9ojHN7m04@9Y)Oyq za(g@f@LcmZ0oq6NRaPyqX|((JF1vNt2eZAYl{&eL&syk}?cJ2;Ci%Ac_+wX5gCoAS zM^j4cWPjv+%6Pi9IwEnGQC=?xYtzTW6OZ|uF0B4=>QXl6<85u%te2&HdZMzzf&c6Y z*`p#MyDsN_mz_}Ie(=N5rCDOvzs-NCS*Vh!GO^(F7KRfMDNV)E^W;Cw-8OmQ?WkQ7 ZEgaIU8}Ix*=N_f8)M`@sl`{MPHvtEMzu^D? literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/HAWK ANMPQ-50 SR_24.jpg b/resources/ui/units/vehicles/HAWK ANMPQ-50 SR_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..174088636d5622c5b7c48c1e516f9e0e4229f7ca GIT binary patch literal 1119 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!>eU`Ha7X|J`eiyXO+2})t6Q2(HlR-g?P>l zFY~)oa>D*pcmJD}srN4EJ)9TV@%rSdmAOkg?wNiTjoIe*=IiV0ucK;4Lt>x1(1~ z{LbWe^~wBGYfrAe?J7RwgO@nNw{!ek3(f9nTzF@)^2wF0k^+A(=I0CE-7fLEuc-L` zGUMQzKaL-+YCR*SB}ZO|{WESw4yV#57*&Oy zuFTClDd5w0U_$u9$LmEsx4c!on^IPu@wtD#tQ)`A#*C8NZg*L-)=nxH@_fG5{kq~E z+s5NLGlb_G{1Y{b_B-XJ)7tT1;v6ZB^~SeMFTC)Sv5^zpJwJ3$ceRSa3C9TvNfDnI z<(&hv)_S{Yp4pxs>Xz2$YyUJCdoXvwo`}yP zUmskZ>wMtXvfg~Lr5UL+A5N~;pT>8<^6vF{)k$5NHZDKkSj#ScY4z$(B!^yz*+5i9m literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/HAWK M192 LN_24.jpg b/resources/ui/units/vehicles/HAWK M192 LN_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..08544b415376baa3ba59194f34ceb7f308b602fe GIT binary patch literal 1103 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!`r&!Z#}>HXJuaTh&@`dW^eS-37Hpi*^CPw zya`KS`gnCO`>QIhi^&S#(&aZ;)K(wcb*%HzvZiQ{$6I@*ev+5p8#BiuZ^2_(Ba2nn z?M2p|)XrWSt!HsxWzFL+N0VYJZXc1F#(Jl0I`4L_l*^CH0^fLjytbj++h*ORsrM|4 zw+8U%vA^t^9u+IOX|ddj*K7C0KYE+`^xygZv!B|YdwUmn_18SPw!LNjp5!%IhCcst zwsC4k&WfG5;CSfo-JOyz?7g0r%$Llb#kz6xhPf;`j-j6fe|~$cw);HykL^c{qkPL( z-8yZe+R&f7u%~*$fn@o>AD6yuySj~U*49bxrQhPS0<+(Sy!rZcx5F{c#FGa;hcnDi zGU9(8zVF)4gMDisC*C>z>Y01T*V4ZWR$$Fh|YC%?*SEZWmublh)wW)?qN^lkfjd6Dn7z5VR;_QaQC9_y;Z zf5gkay?r<8-t5X0>m{t^nsz(hx{7F?w7!$6G`GJY&!qawZYA%NN!E+4omS0{DL36K zdu;*RNtTK8?gY9<)x5tauXU&7@|$*{CDk{I4nIx)dOZHvrnZIk`NphQ%A=p;wz=F1 Se{pkB*KX|_otYc|-vj{D$jn6m literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/HQ-7 Mobile Launcher_24.jpg b/resources/ui/units/vehicles/HQ-7 Mobile Launcher_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7fd18f05b54ac5aa33434141d28326330380b340 GIT binary patch literal 1107 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!}~oGJ)dxWT3dX)PI23{^}26WI-*?_dky)b z8#pDuKHD7rh;6Ic+>*mVle8B-SP;?7%8-1SY5i-dSeaL?=hHs1Rfjj;`>{N>>EY$y zd2iXRorSoIs>@b0AFoq>Ae;1b#(#zq{r?QYq4_nzE3*uZ;_tYYH=JTU<8@|1-*HL# zsNhvkLNr%&?9;h+YO&t-ipOOU#mD^~l&pJxz-sEZjDzyA!rYSED@y_@?do;ZJLSJ}t!olR=D->WDb?^XmRybdKcj`&CHPzua zk1v%^7k#!%|A=Sso0F^Vt$zO~?9&eC3o;FcKjr3TulUc6svz^ju~AQ>&+cosIQ7i<`u$5? z+Vfuv-zjq!EnfI)ns`xU?91!(v(Mc)q->Dyw4}hbs=w7n)NJ^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!x!CERUw|HdsaoNx-m;0<})%fei>)~xcc_# zwJA2{!pB(*l(rpL^fs2eYq#}u)N6i`?S?V(7ANJWEI1*;e_TYzIqRjQmiEf`Qftc1 z1=oKo+sHa+%YC6=4Vbk5n#Br z^X)OizuEek8haxwT<5#g%uDJ${I{5I|C?EJS|m;~tBXGPrQda|OShn3vG=sGB-125 zcjo;pU%$SNeLKG|;cDK(wrk=wbN`x6V0>;jb@36;67h|0YHPFfo=B(MRN8R&JRf_K z^;gp)cV1XcU3%og@s#VD%CeJIun5%FYAo9E*sNDCX7`8IH&MB3KCIla)Bo#5{pC4T zkCt4tF)yyJR{8$zbJP)G4w1J-fBPSvkJ4Bax@5x5i%~z4u3h@z(QW;)$BsktkLKG4 z(v>N-+r_=sPg>o2sJ>%S*YnaPTczFt<8 literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/M-163 Vulcan_24.jpg b/resources/ui/units/vehicles/M-163 Vulcan_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f5489310a815ba696f442d3aa18f47929ce4fb60 GIT binary patch literal 1104 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!}~q0Z+$wG=BZ8-k5tYJo$^HL(Voy1F}L?_ zN!WcP;+^(9K8thK;WoE+9^ieJQ1WyBmn9qXyk1JI;yS+kmHdlcwMSkGdtF>;ExdA_ zmcHoy`yT&X3_1=dXt2y{pYyl!4{K6ygw_NxhqVV8_VF6#ubnKN`>p?*Ggt6>&D@27 zizVKb6~6vn_=-Edc;Ve0xAyPfcBJdb3R{c+46nl$-JfQYY1M9P=kokNgZz5?*v#OD zR7r`4_m?k^>dar0ED>F>*z%_{U*;O0Nmu+@;*PI~nq0iQbm)Mr@0W3|mQRn* z`n=ZosMxPU?QIF|7TPd(TxB9)Io0HhcY@sFNy5A5Qf#9TDtIJm*)~*k>Q5vEVVrL4b9jdXH;Y8E5&&hi+W#jnpkzVb(w-OJ<&Kk;&VN}9Tw&%A=dK8x3` zB74^~9i40J@R9e)WX=ay7BSkF-DY6@d}pJC#M#m~xewEp=GW+zM$h;&HGbMHbKPlg SBECH8(w3UKw3=7>|4jhw+rHQU literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/M1043 HMMWV_24.jpg b/resources/ui/units/vehicles/M1043 HMMWV Armament_24.jpg similarity index 100% rename from resources/ui/units/vehicles/M1043 HMMWV_24.jpg rename to resources/ui/units/vehicles/M1043 HMMWV Armament_24.jpg diff --git a/resources/ui/units/vehicles/M1097 Avenger_24.jpg b/resources/ui/units/vehicles/M1097 Avenger_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1ed509750310d4e13d7631bcdd696733324c978a GIT binary patch literal 1039 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!{v|9w%0FxG2zb3O>2T{7icCe+@W>XIL5`! z;-ih1^#q~it)pL~5A{NvTn_c^(WpAD7;d3|!Ucx=D^d5r#K!4r|5$~{cJE?QoJ zyNv_gQ|*t$3p#$PT^V`e#L->JKf@y*#`e4oGV_}{00ULJa3aN
t%~RRX$1JIAQI+^Ig`ZioA2G z96UGV7Sy+j1WnCk7Wv_HDk$P~>5h5LdG=Fn|EOn6F-SdLX4U^;QP*oQvzLHpIj}n#s2?I0M^)` A!2kdN literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/M1A2_24.jpg b/resources/ui/units/vehicles/M1A2_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d0bf9a664fca42babfb9bce5df65d8ba61ccaef0 GIT binary patch literal 1095 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!_9wZzO8c(`RF=z&7|nt2R`}Aw5kZDGEJy! zw>-GKV*634ee)l2Ds9~>aC=o-XQ%^<;JG5Zk>>a>0qO?95(? z=Z$?=uSYxQS4iAGu_-6Fx9|9+JxwgRZNZAN1!n1=o^9Xqx7aN-ec#2_ua^bFJY}b6 zFfW&%8D}Q*8V4~zZyE6OVrcrA(b5gYo``$eMw0P2~Pp$7g$QFYTOpF``)i=55Z2mnBXf_lov4^VIXQ3D;RY$0S3% z@Yi+*DUC%Yi|#g_T~cx@Y|gfD`^+ip9@v*l{W)m+T_)up({|UNUl(<~>QNR=DLUon I_vZgi0R8m6X8-^I literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/M2A2_24.jpg b/resources/ui/units/vehicles/M2A2_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..037dddf1c83cb5afabe8f6632d2741053f69c51a GIT binary patch literal 1081 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!}Yz}H(y>PbnlL9Uhmvx&OMJWU)!vF&Bj)z z&Gf2*j^TtN!}&3N+GqC!<>l3Q*P0v)`K+qbFu8ZHk?m@MEgLsVs!Y6Ydg1k1Ynj#j zZ0ky`&UbwE$X}P#_3Db#BoWVCuSp?t{6X2aHjb6nt&@Je(0hAeom+)$;q|3StUQmO zT6{SxsomT2b@H6~!5NpkUR3c-e^gef+?Vn8&$QRNM;-~xczs>vU+7icqs^l7IhQxx zHLTk6Z|b9tzK92(swNqS={}pJbT4@Bk%YO6Cx)#)s~vMLMB(oF@_w%(qmQe8C2pR7 zY01Bna#J7Os_)w4xVT~4t(MagFNGUU{%5F}r@i^Z{Ufq&?;h%!3d;1Wm7Qr&vv}cN ze`rf@rss`wAwuCsrnz>vL;IiW$}D)|HMd?qFy`vF#$w?GTl+l4^CVjqJl$J)Ok>fm ztiYbFDNaikFJ!#1-sRLHOD@@+1yxla{o9>)nm4BQm2T%LdfoH(ZR2ZK(dio+*KeKR zy(p&p(!}GI+jR_{OWwY3_f;xm`o3b#zRR3-oaCIDnWwRHdh literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/M48 Chaparral_24.jpg b/resources/ui/units/vehicles/M48 Chaparral_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2d01a9cc10444e0ec52e7bd0971e1a0d60929eac GIT binary patch literal 1126 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!}~uI1L8EhcuyCyuq))xNv)gfZr_^_|6`f1 z)z4ftoz#?jqSgH$R|!>oI(|mrB+EO0i;QD-duC;emX`FDx;)?G{5Ut>?@H>{ZTl|C zXg-S&oIP*0-=li}b91vliU&?oG1i+U@xkfXlm6n*Jp4-&v$va-mw&$V^5oX^q|atw#k(zEPblmXjm*n@vpBcE_>#}|X-=7WI_ta*k4%g161=@q z-Sm9+Ki#H_3){WsU3=!H`^><4o8SS7uj=+wi>#Kd=6$=gb=geiBRNyrRGX%svwSRR z6B4v{>c%e3n@e|aPb>JrJ@2@z|60C1YZq!Y?LF@%E;V(Hr|rwl8IApCI9iNWPcX7n z?)lfY?Fg4ALv!B_(}y3G{VOi1L{Ib+FP=Q>WlpIvd#CQKTX!G#M(ErQXgpUur_lek z7=OZ==xZgBrn4U_PB>byvg1mR_Jks%>Tt<5KdJ*7|D2vW#mg>sp?Bfy-AhHnMbsWI zvXTj$bxZZaHqUP-oQ2HZTDMt0zWhhavqXA_?!x&zj{@g*E!kARM`O{JZ=1xm#2!2D z+1@1Sk@i{KI?z+|P3=qd4`09TpTtt+acM!pM$IJ7f5LrV0zJc~HJ<7_?e-yVJ(JtQ orX%N6CN6bad;2N($4{^<^SIV019Tq!2kdN literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/M6 Linebacker_24.jpg b/resources/ui/units/vehicles/M6 Linebacker_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..615368daf1e54e97484eff2ac96ef030a6568da5 GIT binary patch literal 1127 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!@GBRx;YPxW6n%;pI~lz;N;85{ztW(DK|*;C41w^qxrm7kM2E}dv~&O-qQ#F8Gfxiwq{yKXK>Hl^NSwJCFQFr zEuU(*?ScDsk^c<3+6UIwxUS0#5>Br-Qhc?x&7rnzp7zEM=lj;bd**HHnmqLh%aRvN zC9)hZ>bdgvOxoM|P2=)Mx%SL8F9P>n_q>pp;|)!}E%;mXPMgcQtDT*}^V<7t>!mjTXW%%tX4j%yGxT~~ zuhcF~%x$cm^LVRBsMRLX_E&P^SJ!^!-+b$6Whpo7ZKDGRim%%gcIDKGUh7+Nt?Awa zrOk{57q(AxU}>IH{-Dkz(EHY@gGv7x+G~_ozbfySeK&ultI$GA!BtE@Wm10}Gd^1$ oC-^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!?};4cYdj!UFF7hGw?=})dYusTO0o~aEiWU z*sL^pa_`OqYyUHJY>atT6md3{c}s!2=F}-Y8V^4Il=@trz2aHQ#F)7YH|$7al$5ny zT{U^W*>YPA=jpzFtN#f}uh)?`n=vk(7@HY+<}d4h3QplkTX_N3Y+zh}(qZ#%p8*4gDpE=SLK urqh;U-yayhMOIKyWp==JZuJ>*jB{)%ewCbj>nh6CBJwVJwYs$Y|C<0IU9i~z literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/Marder_24.jpg b/resources/ui/units/vehicles/Marder_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3717e28d591aed4fa4b3db715e0847b27e8644ab GIT binary patch literal 1103 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!`pTFYjjgG-s!!4R6D!rq(YFp-B!tKCB3u% zGi+IF_Uq^AIO|8tKJN)Ew)@XutTnss%v*)zpNx??KNDCct$MtQY5%qP*YsBze)ISi z{kPtAZp!7$;U22<*lrg}KGHLsd$)gS<=p$<=1pEzJJmFLbxU_%`quQ+1h%97VsL6hjB zAwRa4Mt^Zjk=Tcw3>?I}8c{MHkXc_oKRl~*4!?q6SZ`SL%-7|;6b{1T=kH^V0! zZ;I%%s{YSl<+o=y_l?DV-yODHDVc0iy?B?W zh1%MTMLTR4N6GREENidZG2@^`@%$-n$A8HPe_39C$bN;Zltt6yYW*|a!ioMiCBN#n z1ctv&ky*6A{j0_zM#UWyb}^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!+V>?mjQR(K1O@0)On;zo;kmj;r--WJ9@Jp zRcG#+^DXRG{_Lj(DV1hV9>}p-g&VG^ao%w~=j_yP{i&)u6P|M02VS0VXzRC^Yx&}n zabm6*}F^kv~yK+p17&G^#vVrypb@^Ff{kQ+%-qlT{(ppr);pFVLE%I+IQ2C zN7Ifk{LvqD#YS<_%dlxx`)}(-&hb{6*mlRNdGh4@66dpC)CjLV|47#?d}puA2GOv> zKPgY1GbEI(SKWPG|0{P!?t9hBM=kR;Q&d{c#}vovO?`Z$gx4VIWtH7cyMRyrmbpL9 zt1wtT`LZfBs?Mooa$NelzjLaBUH3)wlpL)*y8h_ww}VQF~5-OHEP1|M0vbN&X4`2s)8v|mgPYI|~A`GMz-Ja(CqH`(X&wsgk!lV{O6bZa%)yT zQh1lz|8D-ZF3nYaPo{0z&vPgCM(6YUY|j)07h5V{zinC^@WJ=h%V*J=b{F-GpT4=} z@xDL!t*dCyYEQ$(^6nq*{#(CNbx(o6&Kzg-Sd< T3qski1I@p>R^?5%$N!rELcZTq literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/Roland ADS_24.jpg b/resources/ui/units/vehicles/Roland ADS_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3ee30605d5b4f37982f9ffed12f886662c78b0f5 GIT binary patch literal 1109 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!xw%dqXOQ-sOv|vy}3KrzR6MBoe`aU>ShS< zyozIw`w#8-&mf;w9vBl9J$vTDTT4%bE3ap6e8XGx=%LW{PRVC!Co9Ems)9n7JT6xC zl$~>5`0IDQYrkB$cJB+gXq{NMb7iibYPQnTxX-Sw7Zh3CA}!BV&G{A1Y ze1FtDtd{dzpzV$=$vYO;#4Xx0iN7-TW4iqP@FP6z)8)Tx50_Y~DGHwYRadI>kMCOW>5MJEXT}`k{Ckoy;;ZEG z{3wm(Z=d*f?tjR4&GkcTZa(kM3CxBKANHOz{1p=ap*8!`#@;n~p`rfgF3c;uz`uU2 zNKoh#yP$8AAK0e7bMJd}t~%oizwX^@3ex)=Sth<=e;m8My@oM!p~rXQJJP4ON${Ou V@Q>a5`Ms-Xuh-|P7b5=O1OWK!yzl@3 literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/Roland Radar_24.jpg b/resources/ui/units/vehicles/Roland Radar_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5969b934fb0f76cc4c8e2317bff0403cb2bafbea GIT binary patch literal 1014 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!~N@%9$j|WzhevUw~hyC{aNp<_qJC(tubBu zN?hRYtO~u5W2d5`SE$r1|CpTd`m5=S^Tkra%@>P*UGlBXXUSK&^u~pC=8O*uN=V?YJ;zQxzRF>LYTDzti!O@K_ioELapE-F ziC@K$lVUQqr65yTO|3+8wWdT#A_Soj>8oZ_O`Dfq3=3l9ELcz4DR$ z1>bl+y$y=>`pB^D)Ase>Z#2~lxF*NgcPO?xJEO5Q7+`hg{y#L$g zum#s_f}S3_Wi%ybzM^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!@Ym!zO4#BpSWyg_U#o3jOB^9*(Hw^USBJx z`myUr70Z;&{|p&?w;hF7eLL?X99O@#;+VZ~l%Uz(rE6YHGcuU>Pr=7iYt^Snf1m2#p}zKElY_5DSw|@Smj1KROAo3BO+JrBN?^Ca!Y?!2oL z=C8Zp8g;}-PVRW(-}!I7bZl2iyt!uByf*9n`Hz0f|1+d6SDmHO^`GIk)#ilf*)f{z zH~ws0zGZ&0eLCNB&DD{&UTyoNv!W@@VYS(XNC!*im-DV3^;{6=Sdip8Iaw|xRA;YM zPrcrjz^JQ>C9_0Ud07d{ioLzseca-PLqJke^tEZWN*^R9EIF~JF8S&9cgLTe6$z6& zrgra|OZ|=QI_IJ+>td1(&Ckx;yE@zTg5kHycSk1XB)t{PnQr;G|DpWKZ;QHil_b`B Zt_%yaR;;Pbbp82tQP-^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!xtfu`qrSGSCqGOrp&sR8fNj2Z{M8lQJ?-Z zh`o+e+kSQFymOzvNi(ewa6Z-CSDn5td-~)fyFUA{+}eBDV<-1BgU5C=MXuJRE^Oaq z8+}C1G*;sP=Nl(z&iuaK_L%mmb*We8Nd!Im zmwluw-;$ZlF7mkgv*YnELm!phW9IWO$eLT%^v&a!Xp~u@+!rI!yIbT6FI#*$YoD-w ze)6>^eg0o6RUS7S@?E-rZMmJm$0~UvUiU!uGMn{g0UkC_(myS{o*BEaS|$7LO%t(= z=QypLduKAmP6ZD^#KXZXE#0`tZYRCJ>zMU4-%knb zootcr$?w02W*`2gGF^Dj^#Yr+gLMIqGt*v9{PJ~C*Ts{cCfD*U`BCl3A>sC>>cP&V zrhAN+-n)5T#y~}Q*Mv>$D(oM+igwTTcZi-NdTnxbddam(w>;ABw%%%O{v~RAv?^@k h;>XTg+J4=Yi+C)_v*4|5)vt@LF{`YVF4_OT2>>Tg#_s?C literal 0 HcmV?d00001 diff --git a/resources/ui/units/vehicles/ZU-23_24.jpg b/resources/ui/units/vehicles/ZU-23_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4dbf6d3119c071f5bec9c5dbcd4dc7e5a31d2981 GIT binary patch literal 1035 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!>grNX6Xp=@hV&mm+rLAYFqO0v`yifhLlg9 z2SiW2in=nvU&p{nMQ~2)eAd5L%0&-KO;y>hdhB?q-DVN9_m=rnMK;PENZWJi__65@ zC-lD7x(4hEx!sb-X?gCwAG@eh*5>o}1edT%r>4S52f{m! zE{%Dr5^;m~u8K5o$*kPDbNn{O-8mM!@0F`|f&UJZCHLJpzN+l+Sz*12QuGGM9sX8kE=KdQ}K8ymZ!?Pw1d`xNJf zweLLNzYSeuW4MOnd)%$cio`ANdH3IM%2>4Y^j+PfF()@vcb`qw)ie1TmZm+oXUQja zuez*rzq5ck%ozjU}^pdi=i$016qC{{R30 literal 0 HcmV?d00001 From 01220800f3f0f06db14506dfe9b6856bc044faa0 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 22:47:58 +0200 Subject: [PATCH 38/40] Fixed Viggen icon --- .../aircrafts/{AJS37 Viggen_24.jpg => AJS37_24.jpg} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/ui/units/aircrafts/{AJS37 Viggen_24.jpg => AJS37_24.jpg} (100%) diff --git a/resources/ui/units/aircrafts/AJS37 Viggen_24.jpg b/resources/ui/units/aircrafts/AJS37_24.jpg similarity index 100% rename from resources/ui/units/aircrafts/AJS37 Viggen_24.jpg rename to resources/ui/units/aircrafts/AJS37_24.jpg From 44dcdcc8bb4129e1ee62e12b55f2fe00ed9ef652 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 23:17:08 +0200 Subject: [PATCH 39/40] Changelog update --- changelog.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 30da09d0..0f60b72f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,18 @@ -# 2.x.x -* **[Mission Generator]** Use inline loading of the JSON.lua library, and save to either %LIBERATION_EXPORT_DIR%, to %TEMP%, or to DCS working directory +# 2.1.3 + +## Features/Improvements : +* **[Units/Factions]** Added A-10C_2 to USA 2005 and Bluefor modern factions +* **[UI]** Limit number of aircraft that can be bought to the number of available parking slots. +* **[Mission Generator]** Use inline loading of the JSON.lua library, and save to either %LIBERATION_EXPORT_DIR%, or to DCS working directory + +## Changes : +* **[Units/Factions]** Bluefor generic factions will now use the new "Combined Joint Task Forces Blue" country in the generated mission instead of "USA" + +## Fixes : +* **[UI]** Fixed icon for Viggen +* **[UI]** Added icons for some ground units +* **[Misc]** Fixed issue with Chinese characters in pydcs preventing generating the mission. (Take Off button not working) (thanks to spark135246) +* **[Misc]** Fixed an error causing with ATC frequency preventing generating the mission. (Take Off button not working) (thanks to danalbert) # 2.1.2 From f381bf85a457310db7236664ab0a66775af5593f Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 1 Oct 2020 23:17:32 +0200 Subject: [PATCH 40/40] Fixed JTAC script not working after changes made to lua files --- game/operation/operation.py | 61 +++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/game/operation/operation.py b/game/operation/operation.py index 57ff5c32..4bee75b0 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -263,31 +263,38 @@ class Operation: trigger.add_action(DoScriptFile(fileref)) self.current_mission.triggerrules.triggers.append(trigger) + # Inject Ciribob's JTACAutoLase if not done already in the plugins + if not "JTACAutoLase.lua" in listOfPluginsScripts : # don't load the script twice + trigger = TriggerStart(comment="Load JTACAutoLase.lua script") + fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/JTACAutoLase.lua") + trigger.add_action(DoScriptFile(fileref)) + self.current_mission.triggerrules.triggers.append(trigger) + # set a LUA table with data from Liberation that we want to set # at the moment it contains Liberation's install path, and an overridable definition for the JTACAutoLase function # later, we'll add data about the units and points having been generated, in order to facilitate the configuration of the plugin lua scripts state_location = "[[" + os.path.abspath("state.json") + "]]" lua = """ --- setting configuration table -env.info("DCSLiberation|: setting configuration table") - --- all data in this table is overridable. -dcsLiberation = {} - --- the base location for state.json; if non-existent, it'll be replaced with LIBERATION_EXPORT_DIR, TEMP, or DCS working directory -dcsLiberation.installPath=""" + state_location + """ - --- you can override dcsLiberation.JTACAutoLase to make it use your own function ; it will be called with these parameters : ({jtac.unit_name}, {jtac.code}, {smoke}, 'vehicle') for all JTACs -if ctld then - dcsLiberation.JTACAutoLase=ctld.JTACAutoLase -elseif JTACAutoLase then - dcsLiberation.JTACAutoLase=JTACAutoLase -end - --- later, we'll add more data to the table ---dcsLiberation.POIs = {} ---dcsLiberation.BASEs = {} ---dcsLiberation.JTACs = {} + -- setting configuration table + env.info("DCSLiberation|: setting configuration table") + + -- all data in this table is overridable. + dcsLiberation = {} + + -- the base location for state.json; if non-existent, it'll be replaced with LIBERATION_EXPORT_DIR, TEMP, or DCS working directory + dcsLiberation.installPath=""" + state_location + """ + + -- you can override dcsLiberation.JTACAutoLase to make it use your own function ; it will be called with these parameters : ({jtac.unit_name}, {jtac.code}, {smoke}, 'vehicle') for all JTACs + if ctld then + dcsLiberation.JTACAutoLase=ctld.JTACAutoLase + elseif JTACAutoLase then + dcsLiberation.JTACAutoLase=JTACAutoLase + end + + -- later, we'll add more data to the table + --dcsLiberation.POIs = {} + --dcsLiberation.BASEs = {} + --dcsLiberation.JTACs = {} """ trigger = TriggerStart(comment="Set DCS Liberation data") @@ -301,13 +308,6 @@ end trigger.add_action(DoScriptFile(fileref)) self.current_mission.triggerrules.triggers.append(trigger) - # Inject Ciribob's JTACAutoLase if not done already in the plugins - if not "JTACAutoLase.lua" in listOfPluginsScripts : # don't load the script twice - trigger = TriggerStart(comment="Load JTACAutoLase.lua script") - fileref = self.current_mission.map_resource.add_resource_file("./resources/scripts/JTACAutoLase.lua") - trigger.add_action(DoScriptFile(fileref)) - self.current_mission.triggerrules.triggers.append(trigger) - # add a configuration for JTACAutoLase and start lasing for all JTACs smoke = "true" if hasattr(self.game.settings, "jtac_smoke_on"): @@ -315,9 +315,10 @@ end smoke = "false" lua = """ --- setting and starting JTACs -env.info("DCSLiberation|: setting and starting JTACs") -""" + -- setting and starting JTACs + env.info("DCSLiberation|: setting and starting JTACs") + """ + for jtac in jtacs: lua += f"if dcsLiberation.JTACAutoLase then dcsLiberation.JTACAutoLase('{jtac.unit_name}', {jtac.code}, {smoke}, 'vehicle') end\n"