diff --git a/changelog.md b/changelog.md index 5ebcd6aa..07a18114 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ Saves from 5.x are not compatible with 6.0. ## Features/Improvements +* **[Engine]** Support for DCS DCS 2.7.11.21408, including the new Apache AH-64D * **[Mission Generation]** Added an option to fast-forward mission generation until the point of first contact (WIP). * **[Mission Generation]** Added performance option to not cull IADS when culling would effect how mission is played at target area. * **[Mission Generation]** Reworked the ground object generation which now uses a new layout system diff --git a/game/dcs/aircrafttype.py b/game/dcs/aircrafttype.py index a14d8643..89da469e 100644 --- a/game/dcs/aircrafttype.py +++ b/game/dcs/aircrafttype.py @@ -15,6 +15,7 @@ from game.data.units import UnitClass from game.dcs.unitproperty import UnitProperty from game.dcs.unittype import UnitType from game.radio.channels import ( + ApacheChannelNamer, ChannelNamer, CommonRadioChannelAllocator, FarmerRadioChannelAllocator, @@ -100,6 +101,7 @@ class RadioConfig: "tomcat": TomcatChannelNamer, "viggen": ViggenChannelNamer, "viper": ViperChannelNamer, + "apache": ApacheChannelNamer, }[config.get("namer", "default")] diff --git a/game/radio/channels.py b/game/radio/channels.py index 98ca72eb..9bc3ef93 100644 --- a/game/radio/channels.py +++ b/game/radio/channels.py @@ -258,6 +258,27 @@ class MirageChannelNamer(ChannelNamer): return "mirage" +class ApacheChannelNamer(ChannelNamer): + """Channel namer for the AH-64D Apache""" + + @staticmethod + def channel_name(radio_id: int, channel_id: int) -> str: + # From the manual: Radio identifier (“VHF” for ARC-186, “UHF” for ARC-164, + # “FM1” for first ARC-201D, “FM2” for second ARC-201D, or “HF” for ARC-220). + radio_name = [ + "VHF", # ARC-186 + "UHF", # ARC-164 + "FM1", # first ARC-201D + "FM2", # second ARC-201D + "HF", # ARC-220 + ][radio_id - 1] + return f"{radio_name} Ch {channel_id}" + + @classmethod + def name(cls) -> str: + return "apache" + + class TomcatChannelNamer(ChannelNamer): """Channel namer for the F-14.""" diff --git a/resources/units/aircraft/AH-64D_BLK_II.yaml b/resources/units/aircraft/AH-64D_BLK_II.yaml index 6043da0f..0a45d5cb 100644 --- a/resources/units/aircraft/AH-64D_BLK_II.yaml +++ b/resources/units/aircraft/AH-64D_BLK_II.yaml @@ -16,3 +16,16 @@ price: 20 role: Attack variants: AH-64D Apache Longbow: {} +radios: + # DCS uses the 2nd Radio AN/ARC-164 (UHF) as the main intra flight for the Apache + # so we use this Radio for Intra and Inter Flight for now + # The radio frequencies set in the mission editor are in the current state of Early + # access not used for radio presets. Only the flight frequency is used. Any other + # frequency has to be entered manually atm. + intra_flight: AN/ARC-164 + inter_flight: AN/ARC-164 + channels: + type: common + namer: apache + intra_flight_radio_index: 2 + inter_flight_radio_index: 2