Add support for flyable OH-58D

Co-Authored-By: Starfire13 <72491792+Starfire13@users.noreply.github.com>
Co-Authored-By: zhexu14 <64713351+zhexu14@users.noreply.github.com>
This commit is contained in:
Raffson
2024-06-08 17:55:19 +02:00
parent 7f74203013
commit ec4f19e930
36 changed files with 530 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ from game.radio.channels import (
ViperChannelNamer,
WarthogChannelNamer,
PhantomChannelNamer,
KiowaChannelNamer,
)
from game.utils import (
Distance,
@@ -116,6 +117,7 @@ class RadioConfig:
"a10c-legacy": LegacyWarthogChannelNamer,
"a10c-ii": WarthogChannelNamer,
"phantom": PhantomChannelNamer,
"kiowa": KiowaChannelNamer,
}[config.get("namer", "default")]

View File

@@ -421,3 +421,16 @@ class PhantomChannelNamer(ChannelNamer):
@classmethod
def name(cls) -> str:
return "phantom"
class KiowaChannelNamer(ChannelNamer):
"""Channel namer for OH58D Kiowa Warrior"""
@staticmethod
def channel_name(radio_id: int, channel_id: int) -> str:
radio_name = ["UHF AM", "VHF AM", "VHF FM1", "VHF FM2"][radio_id - 1]
return f"{radio_name} Ch {channel_id}"
@classmethod
def name(cls) -> str:
return "kiowa"