mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Export airfield data to yaml, switch to ID keys.
This exports all the old AIRFIELD_DATA to yaml files. It's easier for users to send fixes if it's defined this way, and they can also fix it in their install without having to wait for a new release. This also switches the indexes from the unstable DCS airfield names to airfield IDs, so this fixes another case of DCS updates occasionally breaking Liberation. I also ended up finding quite a few typos in airfield names, and incorrect theater names in the process. Those have been fixed.
This commit is contained in:
@@ -71,7 +71,7 @@ class FlightGroupConfigurator:
|
||||
divert = None
|
||||
if self.flight.divert is not None:
|
||||
divert = self.flight.divert.active_runway(
|
||||
self.game.conditions, self.dynamic_runways
|
||||
self.game.theater, self.game.conditions, self.dynamic_runways
|
||||
)
|
||||
|
||||
mission_start_time, waypoints = WaypointGenerator(
|
||||
@@ -93,10 +93,10 @@ class FlightGroupConfigurator:
|
||||
friendly=self.flight.from_cp.captured,
|
||||
departure_delay=mission_start_time,
|
||||
departure=self.flight.departure.active_runway(
|
||||
self.game.conditions, self.dynamic_runways
|
||||
self.game.theater, self.game.conditions, self.dynamic_runways
|
||||
),
|
||||
arrival=self.flight.arrival.active_runway(
|
||||
self.game.conditions, self.dynamic_runways
|
||||
self.game.theater, self.game.conditions, self.dynamic_runways
|
||||
),
|
||||
divert=divert,
|
||||
waypoints=waypoints,
|
||||
|
||||
@@ -11,16 +11,16 @@ from dcs.coalition import Coalition
|
||||
from dcs.countries import country_dict
|
||||
|
||||
from game import db
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanRegistry
|
||||
from game.theater.bullseye import Bullseye
|
||||
from game.theater import Airfield, FrontLine
|
||||
from game.unitmap import UnitMap
|
||||
from gen.airfields import AIRFIELD_DATA
|
||||
from gen.naming import namegen
|
||||
from game.missiongenerator.aircraft.aircraftgenerator import (
|
||||
AircraftGenerator,
|
||||
)
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanRegistry
|
||||
from game.theater import Airfield, FrontLine
|
||||
from game.theater.bullseye import Bullseye
|
||||
from game.unitmap import UnitMap
|
||||
from gen.airfields import AirfieldData
|
||||
from gen.naming import namegen
|
||||
from .aircraft.flightdata import FlightData
|
||||
from .airsupport import AirSupport
|
||||
from .airsupportgenerator import AirSupportGenerator
|
||||
@@ -173,8 +173,8 @@ class MissionGenerator:
|
||||
def initialize_radio_registry(
|
||||
self, unique_map_frequencies: set[RadioFrequency]
|
||||
) -> None:
|
||||
for data in AIRFIELD_DATA.values():
|
||||
if data.theater == self.game.theater.terrain.name and data.atc:
|
||||
for data in AirfieldData.for_theater(self.game.theater):
|
||||
if data.atc is not None:
|
||||
unique_map_frequencies.add(data.atc.hf)
|
||||
unique_map_frequencies.add(data.atc.vhf_fm)
|
||||
unique_map_frequencies.add(data.atc.vhf_am)
|
||||
|
||||
Reference in New Issue
Block a user