F4U-1D support except banner & payloads

This commit is contained in:
Raffson 2025-07-06 21:58:30 +02:00
parent 5592a834c9
commit 3086f64e98
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
6 changed files with 91 additions and 0 deletions

View File

@ -41,6 +41,8 @@ from game.radio.channels import (
WarthogChannelNamer,
PhantomChannelNamer,
KiowaChannelNamer,
ARC5RadioChannelAllocator,
ARC5ChannelNamer,
)
from game.utils import (
Distance,
@ -94,6 +96,7 @@ class RadioConfig:
return None
allocator_type: Type[RadioChannelAllocator] = {
"SCR-522": SCR522RadioChannelAllocator,
"ARC-5": ARC5RadioChannelAllocator,
"common": CommonRadioChannelAllocator,
"farmer": FarmerRadioChannelAllocator,
"noop": NoOpChannelAllocator,
@ -105,6 +108,7 @@ class RadioConfig:
def make_namer(cls, config: dict[str, Any]) -> Type[ChannelNamer]:
return {
"SCR-522": SCR522ChannelNamer,
"ARC-5": ARC5ChannelNamer,
"default": ChannelNamer,
"huey": HueyChannelNamer,
"mirage": MirageChannelNamer,

View File

@ -219,6 +219,27 @@ class SCR522RadioChannelAllocator(RadioChannelAllocator):
return "SCR-522"
@dataclass(frozen=True)
class ARC5RadioChannelAllocator(RadioChannelAllocator):
"""Preset channel allocator for the ARC-5 WW2 radios. (4 channels)"""
def assign_channels_for_flight(
self, flight: FlightData, mission_data: MissionData
) -> None:
radio_id = 1
flight.assign_channel(radio_id, 1, flight.intra_flight_channel)
if flight.departure.atc is not None:
flight.assign_channel(radio_id, 2, flight.departure.atc)
if flight.arrival.atc is not None:
flight.assign_channel(radio_id, 3, flight.arrival.atc)
# TODO : Some GCI on Channel 4 ?
@classmethod
def name(cls) -> str:
return "ARC-5"
class ChannelNamer:
"""Base class allowing channel name customization per-aircraft.
@ -376,6 +397,23 @@ class SCR522ChannelNamer(ChannelNamer):
return "SCR-522"
class ARC5ChannelNamer(ChannelNamer):
"""
Channel namer for F4U-1D Corsair
"""
@staticmethod
def channel_name(radio_id: int, channel_id: int) -> str:
if channel_id > 3:
return "?"
else:
return f"Channel " + "1234"[channel_id - 1]
@classmethod
def name(cls) -> str:
return "ARC-5"
class LegacyWarthogChannelNamer(ChannelNamer):
"""Channel namer for the legacy A-10C."""

View File

@ -231,6 +231,15 @@ RADIOS: List[Radio] = [
# P-51 / P-47 Radio
# 4 preset channels (A/B/C/D)
Radio("SCR522", (RadioRange(MHz(100), MHz(156), kHz(25), Modulation.AM),)),
# F4U-1D Radio
# 4 preset channels (1/2/3/4)
Radio(
"ARC-5",
(
RadioRange(MHz(100), MHz(150), kHz(25), Modulation.AM),
RadioRange(MHz(220), MHz(390), kHz(25), Modulation.AM),
),
),
# JF-17 Radios should use AM
Radio("R&S M3AR VHF", (RadioRange(MHz(120), MHz(174), kHz(25), Modulation.AM),)),
Radio("R&S M3AR UHF", (RadioRange(MHz(225), MHz(400), kHz(25), Modulation.AM),)),

View File

@ -7,6 +7,7 @@
"A-20G Havoc",
"B-17G Flying Fortress",
"C-47 Skytrain",
"F4U-1D Corsair",
"P-47D-30 Thunderbolt (Early)",
"P-47D-30 Thunderbolt (Late)",
"P-47D-40 Thunderbolt",

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,39 @@
always_keeps_gun: true
description: # From Wikipedia, the free encyclopedia
The Vought F4U Corsair is an American fighter aircraft that saw service primarily in World War II and the Korean War.
Designed and initially manufactured by Chance Vought, the Corsair was soon in great demand;
additional production contracts were given to Goodyear, whose Corsairs were designated FG, and Brewster, designated F3A.
The Corsair was designed and principally operated as a carrier-based aircraft, and entered service in large numbers
with the U.S. Navy and Marines in World War II. It quickly became one of the most capable carrier-based fighter-bombers
of the war.[3] Some Japanese pilots regarded it as the most formidable American fighter and U.S. naval aviators
achieved an 11:1 kill ratio.[4][5] Early problems with carrier landings and logistics led to it being eclipsed
as the dominant carrier-based fighter by the Grumman F6F Hellcat, powered by the same Double Wasp engine first
flown on the Corsair's initial prototype in 1940.[6] The Corsair's early deployment was to land-based squadrons
of the U.S. Marine Corps and U.S. Navy.
introduced: 1942
manufacturer: Chance Vought
origin: USA
price: 6
role: Carrier Based Fighter-Bomber
gunfighter: true
variants:
F4U-1D Corsair: {}
radios:
intra_flight: ARC-5
inter_flight: ARC-5
channels:
type: ARC-5
namer: ARC-5
kneeboard_units: "imperial"
tasks:
BAI: 100
BARCAP: 100
CAS: 100
Anti-ship: 100
Escort: 100
Fighter sweep: 100
Intercept: 100
OCA/Aircraft: 100
OCA/Runway: 60
Strike: 60
TARCAP: 100