From 3c4d6eb8e44c558cbacec7c85826283f071745a5 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 18 Apr 2021 23:31:45 -0700 Subject: [PATCH] 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 --- qt_ui/windows/basemenu/ground_forces/QArmorRecruitmentMenu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_ui/windows/basemenu/ground_forces/QArmorRecruitmentMenu.py b/qt_ui/windows/basemenu/ground_forces/QArmorRecruitmentMenu.py index 08834e5c..e9b63882 100644 --- a/qt_ui/windows/basemenu/ground_forces/QArmorRecruitmentMenu.py +++ b/qt_ui/windows/basemenu/ground_forces/QArmorRecruitmentMenu.py @@ -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