mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix livery overrides
This commit is contained in:
parent
4af7255917
commit
6c673697f0
@ -161,6 +161,14 @@ class SquadronLiverySelector(QComboBox):
|
||||
valid_livery = livery.countries is None or cc in livery.countries
|
||||
if valid_livery or cc in ["BLUE", "RED"]:
|
||||
liveries.add(livery)
|
||||
faction = squadron.coalition.faction
|
||||
overrides = [
|
||||
x
|
||||
for x in faction.liveries_overrides.get(self.aircraft_type, [])
|
||||
if x in [y.id.lower() for y in liveries]
|
||||
]
|
||||
if len(overrides) > 0:
|
||||
self.addItem("Use livery overrides", userData=None)
|
||||
for livery in sorted(liveries):
|
||||
self.addItem(livery.name, userData=livery.id)
|
||||
if selected_livery is not None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user