UX : Display a warning message when attempting to buy more aircraft at an already full airfield.

This commit is contained in:
Khopa 2020-12-16 21:08:48 +01:00
parent ba2686630a
commit e3b13f7b4a

View File

@ -88,6 +88,9 @@ class QAircraftRecruitmentMenu(QFrame, QRecruitBehaviour):
if self.maximum_units > 0:
if self.cp.unclaimed_parking(self.game_model.game) <= 0:
logging.debug(f"No space for additional aircraft at {self.cp}.")
QMessageBox.warning(
self, "No space for additional aircraft",
f"There is no parking space left at {self.cp.name} to accommodate another plane.", QMessageBox.Ok)
return
super().buy(unit_type)