From 83eea8974ba18de74ecbb6e49187c47b02a2426f Mon Sep 17 00:00:00 2001 From: Raffson Date: Sat, 25 Mar 2023 14:58:36 +0100 Subject: [PATCH] Fix procurement bug when coalition has no squadrons If a user removes all squadrons manually, the faction may still contain aircraft but no budget for aircraft should be allocated at all. In such a case, all money should go to ground units... --- game/procurement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/procurement.py b/game/procurement.py index b5f88873..a4a7c6a8 100644 --- a/game/procurement.py +++ b/game/procurement.py @@ -59,8 +59,8 @@ class ProcurementAi: ): return 0 - # faction has no planes - if len(self.faction.aircrafts) == 0: + # faction has no planes or no squadrons + if len(self.faction.aircrafts) == 0 or len(self.air_wing.squadrons) == 0: return 1 for cp in self.owned_points: