mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix swapped list order for purchase priorities.
We were accidentally iterating over the faction list and checking it against the priority list rather than the other way around, so the faction's aircraft list was being used for purchase priority rather than the actual priority list in the game.
This commit is contained in:
@@ -171,7 +171,7 @@ class ProcurementAi:
|
||||
max_price: float,
|
||||
) -> Optional[Type[FlyingType]]:
|
||||
best_choice: Optional[Type[FlyingType]] = None
|
||||
for unit in [u for u in self.faction.aircrafts if u in types]:
|
||||
for unit in [u for u in types if u in self.faction.aircrafts]:
|
||||
if db.PRICES[unit] * number > max_price:
|
||||
continue
|
||||
if not airbase.can_operate(unit):
|
||||
|
||||
Reference in New Issue
Block a user