mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Issue 3204 (#3458)
This issue addresses Issue #3204 by allowing factions to set a different weapon introduction date.
This commit is contained in:
@@ -26,7 +26,9 @@ class QPylonEditor(QComboBox):
|
||||
|
||||
self.addItem("None", None)
|
||||
if self.game.settings.restrict_weapons_by_date:
|
||||
weapons = pylon.available_on(self.game.date)
|
||||
weapons = pylon.available_on(
|
||||
self.game.date, flight.squadron.coalition.faction
|
||||
)
|
||||
else:
|
||||
weapons = pylon.allowed
|
||||
allowed = sorted(weapons, key=operator.attrgetter("name"))
|
||||
@@ -68,7 +70,11 @@ class QPylonEditor(QComboBox):
|
||||
|
||||
def matching_weapon_name(self, loadout: Loadout) -> str:
|
||||
if self.game.settings.restrict_weapons_by_date:
|
||||
loadout = loadout.degrade_for_date(self.flight.unit_type, self.game.date)
|
||||
loadout = loadout.degrade_for_date(
|
||||
self.flight.unit_type,
|
||||
self.game.date,
|
||||
self.flight.squadron.coalition.faction,
|
||||
)
|
||||
weapon = self.weapon_from_loadout(loadout)
|
||||
if weapon is None:
|
||||
return "None"
|
||||
|
||||
Reference in New Issue
Block a user