Preference option to prioritize custom Liberation payloads

This commit is contained in:
Raffson
2024-02-09 23:52:27 +01:00
parent 7c05e94619
commit 63d05ea696
4 changed files with 50 additions and 6 deletions

View File

@@ -11,6 +11,7 @@ from dcs.unittype import FlyingType
from game.data.weapons import Pylon, Weapon, WeaponType
from game.dcs.aircrafttype import AircraftType
from .flighttype import FlightType
from ..persistency import prefer_liberation_payloads
if TYPE_CHECKING:
from .flight import Flight
@@ -161,7 +162,10 @@ class Loadout:
# last - the first element in the tuple will be tried first, then the second,
# etc.
loadout_names = {
t: [f"Retribution {t.value}", f"Liberation {t.value}"] for t in FlightType
t: [f"Liberation {t.value}", f"Retribution {t.value}"]
if prefer_liberation_payloads()
else [f"Retribution {t.value}", f"Liberation {t.value}"]
for t in FlightType
}
legacy_names = {
FlightType.TARCAP: (