From abbb04656612acefe3e1dd73465326bf34b89ae6 Mon Sep 17 00:00:00 2001 From: Simon Clark Date: Tue, 12 Jan 2021 12:27:31 +0000 Subject: [PATCH] Add the SH-60B Seahawk into the game. It was requested in #759, and also carries the Penguin AShM, which could be fun. --- game/db.py | 9 +++++++++ gen/flights/ai_flight_planner_db.py | 2 ++ resources/customized_payloads/SH-60B.lua | 18 ++++++++++++++++++ resources/factions/australia_2005.json | 1 + resources/factions/us_aggressors.json | 1 + resources/factions/usa_1990.json | 1 + resources/factions/usa_2005.json | 1 + resources/factions/usa_2005_c130.json | 1 + resources/factions/usa_2005_modded.json | 1 + resources/factions/usn_1985.json | 1 + resources/units/pretty_unit_names.json | 3 +++ 11 files changed, 39 insertions(+) create mode 100644 resources/customized_payloads/SH-60B.lua diff --git a/game/db.py b/game/db.py index 6c71a4e2..267d5487 100644 --- a/game/db.py +++ b/game/db.py @@ -19,6 +19,7 @@ from dcs.helicopters import ( SA342M, SA342Minigun, SA342Mistral, + SH_60B, UH_1H, UH_60A, helicopter_map, @@ -325,6 +326,7 @@ PRICES = { AH_64A: 24, AH_64D: 30, OH_58D: 6, + SH_60B: 6, # Bombers B_52H: 35, @@ -586,6 +588,7 @@ Following tasks are present: * CAS - CAS aircraft * Transport - transport aircraft (used as targets in intercept operations) * AWACS - awacs +* AntishipStrike - units that will engage shipping * PinpointStrike - armor that will engage in ground war * AirDefense - AA units * Reconnaissance - units that will be used as targets in destroy insurgents operations @@ -706,6 +709,9 @@ UNIT_BY_TASK = { A_50, KJ_2000 ], + AntishipStrike: [ + SH_60B + ], PinpointStrike: [ Armor.APC_MTLB, Armor.APC_MTLB, @@ -1152,6 +1158,7 @@ PLANE_PAYLOAD_OVERRIDES: Dict[Type[PlaneType], Dict[Type[Task], str]] = { AH_1W: COMMON_OVERRIDE, AH_64D: COMMON_OVERRIDE, AH_64A: COMMON_OVERRIDE, + SH_60B: COMMON_OVERRIDE, Hercules: COMMON_OVERRIDE, Su_25TM: { @@ -1234,6 +1241,7 @@ CARRIER_CAPABLE = [ AH_1W, OH_58D, UH_60A, + SH_60B, SA342L, SA342M, @@ -1250,6 +1258,7 @@ LHA_CAPABLE = [ AH_1W, OH_58D, UH_60A, + SH_60B, SA342L, SA342M, diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index 7406e22a..b64c66fc 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -13,6 +13,7 @@ from dcs.helicopters import ( SA342L, SA342M, UH_1H, + SH_60B, ) from dcs.planes import ( AJS37, @@ -312,6 +313,7 @@ ANTISHIP_CAPABLE = [ AV8BNA, Ju_88A4, C_101CC, + SH_60B, ] diff --git a/resources/customized_payloads/SH-60B.lua b/resources/customized_payloads/SH-60B.lua new file mode 100644 index 00000000..22ff5907 --- /dev/null +++ b/resources/customized_payloads/SH-60B.lua @@ -0,0 +1,18 @@ +local unitPayloads = { + ["name"] = "SH-60B", + ["payloads"] = { + [1] = { + ["name"] = "ANTISHIP", + ["pylons"] = { + [1] = { + ["CLSID"] = "{7B8DCEB4-820B-4015-9B48-1028A4195692}", + ["num"] = 1, + }, + }, + ["tasks"] = { + [1] = 30, + }, + }, + ["unitType"] = "SH-60B", +} +return unitPayloads diff --git a/resources/factions/australia_2005.json b/resources/factions/australia_2005.json index 8e9109d2..36968b09 100644 --- a/resources/factions/australia_2005.json +++ b/resources/factions/australia_2005.json @@ -6,6 +6,7 @@ "aircrafts": [ "FA_18C_hornet", "UH_1H", + "SH_60B", "AH_1W" ], "awacs": [ diff --git a/resources/factions/us_aggressors.json b/resources/factions/us_aggressors.json index 7568ccd5..31595c5f 100644 --- a/resources/factions/us_aggressors.json +++ b/resources/factions/us_aggressors.json @@ -13,6 +13,7 @@ "A_10C", "AV8BNA", "UH_1H", + "SH_60B", "AH_64D", "Ka_50", "B_52H", diff --git a/resources/factions/usa_1990.json b/resources/factions/usa_1990.json index e2da4d5f..8904f404 100644 --- a/resources/factions/usa_1990.json +++ b/resources/factions/usa_1990.json @@ -13,6 +13,7 @@ "A_10A", "AV8BNA", "UH_1H", + "SH_60B", "AH_64A", "B_52H", "B_1B", diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index 09a6fd1d..3bee8dda 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -13,6 +13,7 @@ "A_10C_2", "AV8BNA", "UH_1H", + "SH_60B", "AH_64D", "B_52H", "B_1B", diff --git a/resources/factions/usa_2005_c130.json b/resources/factions/usa_2005_c130.json index af749b94..ccec35db 100644 --- a/resources/factions/usa_2005_c130.json +++ b/resources/factions/usa_2005_c130.json @@ -13,6 +13,7 @@ "A_10C_2", "AV8BNA", "UH_1H", + "SH_60B", "AH_64D", "B_52H", "B_1B", diff --git a/resources/factions/usa_2005_modded.json b/resources/factions/usa_2005_modded.json index de7375e6..9991f540 100644 --- a/resources/factions/usa_2005_modded.json +++ b/resources/factions/usa_2005_modded.json @@ -13,6 +13,7 @@ "A_10C_2", "AV8BNA", "UH_1H", + "SH_60B", "AH_64D", "B_52H", "B_1B", diff --git a/resources/factions/usn_1985.json b/resources/factions/usn_1985.json index c976f371..7be3a7fd 100644 --- a/resources/factions/usn_1985.json +++ b/resources/factions/usn_1985.json @@ -9,6 +9,7 @@ "F_14B", "S_3B", "UH_1H", + "SH_60B", "AH_1W" ], "awacs": [ diff --git a/resources/units/pretty_unit_names.json b/resources/units/pretty_unit_names.json index cc7810eb..e4b7fa3d 100644 --- a/resources/units/pretty_unit_names.json +++ b/resources/units/pretty_unit_names.json @@ -218,6 +218,9 @@ "SA342Mistral": [{ "default": "SA 342M Gazelle Mistral" }], + "SH-60B": [{ + "default": "SH-60B Seahawk" + }], "SpitfireLFMkIX": [{ "default": "Spitfire LF Mk IX" }],