mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
New cheat option: manage REDFOR's TGOs
This commit is contained in:
@@ -188,7 +188,8 @@ class QGroundObjectTemplateLayout(QGroupBox):
|
||||
|
||||
@property
|
||||
def affordable(self) -> bool:
|
||||
return self.cost <= self.game.blue.budget
|
||||
coalition = self.ground_object.coalition
|
||||
return self.cost <= coalition.budget
|
||||
|
||||
def add_theater_group(
|
||||
self, group_name: str, force_group: ForceGroup, groups: list[TgoLayoutUnitGroup]
|
||||
@@ -226,7 +227,8 @@ class QGroundObjectTemplateLayout(QGroupBox):
|
||||
self.game.theater.heading_to_conflict_from(self.ground_object.position)
|
||||
or self.ground_object.heading
|
||||
)
|
||||
self.game.blue.budget -= self.cost
|
||||
coalition = self.ground_object.coalition
|
||||
coalition.budget -= self.cost
|
||||
self.ground_object.groups = []
|
||||
for group_name, groups in self.layout_model.groups.items():
|
||||
for group in groups:
|
||||
@@ -282,7 +284,8 @@ class QGroundObjectBuyMenu(QDialog):
|
||||
if not tasks:
|
||||
tasks = role.tasks
|
||||
|
||||
for group in game.blue.armed_forces.groups_for_tasks(tasks):
|
||||
coalition = ground_object.coalition
|
||||
for group in coalition.armed_forces.groups_for_tasks(tasks):
|
||||
self.force_group_selector.addItem(group.name, userData=group)
|
||||
self.force_group_selector.setEnabled(self.force_group_selector.count() > 1)
|
||||
self.force_group_selector.adjustSize()
|
||||
|
||||
Reference in New Issue
Block a user