Automate transfers for purchases in the UI.

Buying a unit places the order, but the unit will appear at the nearest
connected source and a transfer will be automatically created next turn.

https://github.com/Khopa/dcs_liberation/issues/986
This commit is contained in:
Dan Albert 2021-04-18 23:31:45 -07:00
parent df98e1f8ac
commit 3c4d6eb8e4

View File

@ -68,7 +68,7 @@ class QArmorRecruitmentMenu(QFrame, QRecruitBehaviour):
self.setLayout(main_layout)
def enable_purchase(self, unit_type: Type[UnitType]) -> bool:
return self.cp.can_recruit_ground_units(self.game_model.game)
return self.cp.has_ground_unit_source(self.game_model.game)
def enable_sale(self, unit_type: Type[UnitType]) -> bool:
return self.pending_deliveries.pending_orders(unit_type) > 0