From f2e3ccd18c0e814c050452c2d4f60eb64906dd4d Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 17 May 2021 01:46:38 -0700 Subject: [PATCH] Add loadout names for every Liberation task type. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/867 --- gen/flights/loadouts.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gen/flights/loadouts.py b/gen/flights/loadouts.py index 0ba756db..2c30954b 100644 --- a/gen/flights/loadouts.py +++ b/gen/flights/loadouts.py @@ -83,7 +83,8 @@ class Loadout: # names, so those have been included here too. The priority goes from first to # last - the first element in the tuple will be tried first, then the second, # etc. - yield from { + loadout_names = {t: [f"Liberation {t.value}"] for t in FlightType} + legacy_names = { FlightType.TARCAP: ("CAP HEAVY", "CAP"), FlightType.BARCAP: ("CAP HEAVY", "CAP"), FlightType.CAS: ("CAS MAVERICK F", "CAS"), @@ -97,9 +98,10 @@ class Loadout: FlightType.SWEEP: ("CAP HEAVY", "CAP"), FlightType.OCA_RUNWAY: ("RUNWAY_ATTACK", "RUNWAY_STRIKE", "STRIKE"), FlightType.OCA_AIRCRAFT: ("OCA", "CAS MAVERICK F", "CAS"), - FlightType.TRANSPORT: (), - FlightType.AEWC: (), - }.get(flight.flight_type, []) + } + for flight_type, names in legacy_names.items(): + loadout_names[flight_type].extend(names) + yield from loadout_names[flight.flight_type] @classmethod def default_for(cls, flight: Flight) -> Loadout: