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...
This commit is contained in:
Raffson 2023-03-25 14:58:36 +01:00
parent a1fc92bd00
commit 83eea8974b
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -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: