From 5734c293123b8ccbcf4d125934d08dcfde875885 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 28 Dec 2020 16:04:48 -0800 Subject: [PATCH] Remove wrong precondition in aircraft procurement. Those task types aren't correct here (that whole dict probably serves little purpose now), and the actual unit pool is handled in _affordable_aircraft_of_types. --- game/procurement.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/game/procurement.py b/game/procurement.py index 5f378c67..9a928034 100644 --- a/game/procurement.py +++ b/game/procurement.py @@ -178,11 +178,6 @@ class ProcurementAi: def purchase_aircraft( self, budget: int, aircraft_requests: List[AircraftProcurementRequest]) -> int: - unit_pool = [u for u in self.faction.aircrafts - if u in db.UNIT_BY_TASK[CAS] or u in db.UNIT_BY_TASK[CAP]] - if not unit_pool: - return budget - for request in aircraft_requests: for airbase in self.best_airbases_for(request): unit = self.affordable_aircraft_for(request, airbase, budget)