mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Cleanup country_shortname, use country.shortname instead
This commit is contained in:
parent
f9e15951f2
commit
72eb6622ac
@ -47,9 +47,6 @@ class Faction:
|
||||
# Country used by this faction
|
||||
country: Country
|
||||
|
||||
# Country's short name used by this faction
|
||||
country_shortname: str = field(default="")
|
||||
|
||||
# Nice name of the faction
|
||||
name: str = field(default="")
|
||||
|
||||
@ -194,8 +191,6 @@ class Faction:
|
||||
|
||||
faction = Faction(locales=json.get("locales"), country=country)
|
||||
|
||||
faction.country_shortname = country.shortname
|
||||
|
||||
faction.name = json.get("name", "")
|
||||
if not faction.name:
|
||||
raise AssertionError("Faction has no valid name")
|
||||
|
||||
@ -144,7 +144,7 @@ class SquadronLiverySelector(QComboBox):
|
||||
selected_livery = squadron.livery
|
||||
|
||||
liveries = set()
|
||||
cc = squadron.coalition.faction.country_shortname
|
||||
cc = squadron.coalition.faction.country.shortname
|
||||
aircraft_liveries = set(self.aircraft_type.dcs_unit_type.iter_liveries())
|
||||
if len(aircraft_liveries) == 0:
|
||||
logging.info(f"Liveries for {self.aircraft_type} is empty!")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user