mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add channel naming for the warthogs.
The manual for the legacy warthog usually calls these VHF 1/2 and UHF, or VHF AM/FM and UHF. The AM/FM nomenclature is what I usually hear people call them and it's clearer, so go with that. For the A-10C II, that manual hasn't been updated for the AN/ARC-210 yet, so I'm not really sure what that ought to be called. The UFC calls it COM 1 though, so I went with that. The alternative would be something like VHF/UHF for the 210 and UHF for the 164, but I don't know if that's actually better. Could be completely explicit and call them by their full names, but that's probably less clear to people that aren't fiddling with the radio implementation constantly (and even I confuse the 164 and the 186 all the damn time).
This commit is contained in:
parent
2fed84c676
commit
2d9b0177ec
@ -20,6 +20,7 @@ from game.radio.channels import (
|
||||
CommonRadioChannelAllocator,
|
||||
FarmerRadioChannelAllocator,
|
||||
HueyChannelNamer,
|
||||
LegacyWarthogChannelNamer,
|
||||
MirageChannelNamer,
|
||||
MirageF1CEChannelNamer,
|
||||
NoOpChannelAllocator,
|
||||
@ -31,6 +32,7 @@ from game.radio.channels import (
|
||||
ViggenChannelNamer,
|
||||
ViggenRadioChannelAllocator,
|
||||
ViperChannelNamer,
|
||||
WarthogChannelNamer,
|
||||
)
|
||||
from game.utils import (
|
||||
Distance,
|
||||
@ -104,6 +106,8 @@ class RadioConfig:
|
||||
"viggen": ViggenChannelNamer,
|
||||
"viper": ViperChannelNamer,
|
||||
"apache": ApacheChannelNamer,
|
||||
"a10c-legacy": LegacyWarthogChannelNamer,
|
||||
"a10c-ii": WarthogChannelNamer,
|
||||
}[config.get("namer", "default")]
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional, Any, TYPE_CHECKING
|
||||
from typing import Any, Optional, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.missiongenerator.aircraft.flightdata import FlightData
|
||||
@ -355,3 +355,37 @@ class SCR522ChannelNamer(ChannelNamer):
|
||||
@classmethod
|
||||
def name(cls) -> str:
|
||||
return "SCR-522"
|
||||
|
||||
|
||||
class LegacyWarthogChannelNamer(ChannelNamer):
|
||||
"""Channel namer for the legacy A-10C."""
|
||||
|
||||
@staticmethod
|
||||
def channel_name(radio_id: int, channel_id: int) -> str:
|
||||
radio_name = {
|
||||
1: "VHF AM",
|
||||
2: "UHF",
|
||||
3: "VHF FM",
|
||||
}[radio_id]
|
||||
return f"{radio_name} Ch {channel_id}"
|
||||
|
||||
@classmethod
|
||||
def name(cls) -> str:
|
||||
return "a10c-legacy"
|
||||
|
||||
|
||||
class WarthogChannelNamer(ChannelNamer):
|
||||
"""Channel namer for the legacy A-10C II"""
|
||||
|
||||
@staticmethod
|
||||
def channel_name(radio_id: int, channel_id: int) -> str:
|
||||
radio_name = {
|
||||
1: "COM 1",
|
||||
2: "UHF",
|
||||
3: "VHF FM",
|
||||
}[radio_id]
|
||||
return f"{radio_name} Ch {channel_id}"
|
||||
|
||||
@classmethod
|
||||
def name(cls) -> str:
|
||||
return "a10c-ii"
|
||||
|
||||
@ -21,5 +21,6 @@ radios:
|
||||
inter_flight: AN/ARC-164
|
||||
channels:
|
||||
type: common
|
||||
namer: a10c-legacy
|
||||
intra_flight_radio_index: 2
|
||||
inter_flight_radio_index: 2
|
||||
|
||||
@ -25,5 +25,6 @@ radios:
|
||||
inter_flight: AN/ARC-210
|
||||
channels:
|
||||
type: common
|
||||
namer: a10c-ii
|
||||
intra_flight_radio_index: 2
|
||||
inter_flight_radio_index: 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user