FIX: Purchase from airfield or anywhere allows negative budget.

This commit is contained in:
Marcos Sigueros Fernández
2021-04-29 09:57:48 +02:00
committed by GitHub
parent 840107c69e
commit b2a551dc63

View File

@@ -93,6 +93,8 @@ class QAircraftRecruitmentMenu(QFrame, QRecruitBehaviour):
self.setLayout(main_layout)
def enable_purchase(self, unit_type: Type[UnitType]) -> bool:
if not super().enable_purchase(unit_type):
return False
if not issubclass(unit_type, FlyingType):
return False
if not self.cp.can_operate(unit_type):