mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add loadout names for every Liberation task type.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/867
This commit is contained in:
parent
d41e69d770
commit
f2e3ccd18c
@ -83,7 +83,8 @@ class Loadout:
|
|||||||
# names, so those have been included here too. The priority goes from first to
|
# 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,
|
# last - the first element in the tuple will be tried first, then the second,
|
||||||
# etc.
|
# etc.
|
||||||
yield from {
|
loadout_names = {t: [f"Liberation {t.value}"] for t in FlightType}
|
||||||
|
legacy_names = {
|
||||||
FlightType.TARCAP: ("CAP HEAVY", "CAP"),
|
FlightType.TARCAP: ("CAP HEAVY", "CAP"),
|
||||||
FlightType.BARCAP: ("CAP HEAVY", "CAP"),
|
FlightType.BARCAP: ("CAP HEAVY", "CAP"),
|
||||||
FlightType.CAS: ("CAS MAVERICK F", "CAS"),
|
FlightType.CAS: ("CAS MAVERICK F", "CAS"),
|
||||||
@ -97,9 +98,10 @@ class Loadout:
|
|||||||
FlightType.SWEEP: ("CAP HEAVY", "CAP"),
|
FlightType.SWEEP: ("CAP HEAVY", "CAP"),
|
||||||
FlightType.OCA_RUNWAY: ("RUNWAY_ATTACK", "RUNWAY_STRIKE", "STRIKE"),
|
FlightType.OCA_RUNWAY: ("RUNWAY_ATTACK", "RUNWAY_STRIKE", "STRIKE"),
|
||||||
FlightType.OCA_AIRCRAFT: ("OCA", "CAS MAVERICK F", "CAS"),
|
FlightType.OCA_AIRCRAFT: ("OCA", "CAS MAVERICK F", "CAS"),
|
||||||
FlightType.TRANSPORT: (),
|
}
|
||||||
FlightType.AEWC: (),
|
for flight_type, names in legacy_names.items():
|
||||||
}.get(flight.flight_type, [])
|
loadout_names[flight_type].extend(names)
|
||||||
|
yield from loadout_names[flight.flight_type]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_for(cls, flight: Flight) -> Loadout:
|
def default_for(cls, flight: Flight) -> Loadout:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user