Buy/Replace TGOs for free at turn 0

This commit is contained in:
Raffson 2024-03-01 23:46:56 +01:00
parent 32f8d8d0b7
commit b4ba200f95
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 3 additions and 2 deletions

View File

@ -43,6 +43,7 @@
* **[Options]** Made AI jettisoning empty fuel tanks optional (disabled by default)
* **[Options]** Add option (so it can be disabled when fixed in DCS) to force air-starts (except for the slots that work) at Nevatim due to https://forum.dcs.world/topic/335545-29-nevatim-ramp-starts-still-bugged/
* **[Cheat]** Add cheat option to manually manage REDFOR's TGOs
* **[UX]** Buy/Replace TGOs for free before the campaign has started
## Fixes
* **[Mission Generation]** Anti-ship strikes should use "group attack" in their attack-task

View File

@ -189,7 +189,7 @@ class QGroundObjectTemplateLayout(QGroupBox):
@property
def affordable(self) -> bool:
coalition = self.ground_object.coalition
return self.cost <= coalition.budget
return self.cost <= coalition.budget or self.game.turn == 0
def add_theater_group(
self, group_name: str, force_group: ForceGroup, groups: list[TgoLayoutUnitGroup]
@ -228,7 +228,7 @@ class QGroundObjectTemplateLayout(QGroupBox):
or self.ground_object.heading
)
coalition = self.ground_object.coalition
coalition.budget -= self.cost
coalition.budget -= self.cost if self.game.turn else 0
self.ground_object.groups = []
for group_name, groups in self.layout_model.groups.items():
for group in groups: