mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Allow naval adjustments on turn 0
This commit is contained in:
parent
a9a56bfcc4
commit
d051774464
@ -7,6 +7,7 @@
|
||||
* **[Campaigns/Factions]** Support for inline recommended faction in campaign's yaml file
|
||||
* **[Squadrons]** Ability to define a livery-set for each squadron from which Retribution will randomly choose during mission generation
|
||||
* **[Modding]** Updated support for F/A-18E/F/G mod version 2.2.5
|
||||
* **[Campaign Setup]** Allow adjustments to naval TGOs (except carriers) on turn 0
|
||||
|
||||
## Fixes
|
||||
* **[UI/UX]** A-10A flights can be edited again.
|
||||
|
||||
@ -32,6 +32,7 @@ from game.theater.theatergroundobject import (
|
||||
EwrGroundObject,
|
||||
SamGroundObject,
|
||||
VehicleGroupGroundObject,
|
||||
ShipGroundObject,
|
||||
)
|
||||
from qt_ui.uiconstants import EVENT_ICONS
|
||||
|
||||
@ -278,6 +279,9 @@ class QGroundObjectBuyMenu(QDialog):
|
||||
elif isinstance(ground_object, EwrGroundObject):
|
||||
role = GroupRole.AIR_DEFENSE
|
||||
tasks.append(GroupTask.EARLY_WARNING_RADAR)
|
||||
elif isinstance(ground_object, ShipGroundObject):
|
||||
role = GroupRole.NAVAL
|
||||
tasks.append(GroupTask.NAVY)
|
||||
else:
|
||||
raise NotImplementedError(f"Unhandled TGO type {ground_object.__class__}")
|
||||
|
||||
|
||||
@ -104,12 +104,14 @@ class QGroundObjectMenu(QDialog):
|
||||
self.buy_replace.clicked.connect(self.buy_group)
|
||||
self.buy_replace.setProperty("style", "btn-success")
|
||||
|
||||
if self.ground_object.purchasable:
|
||||
if self.ground_object.purchasable or self.game.turn == 0:
|
||||
if self.total_value > 0:
|
||||
self.actionLayout.addWidget(self.sell_all_button)
|
||||
self.actionLayout.addWidget(self.buy_replace)
|
||||
|
||||
if self.show_buy_sell_actions and self.ground_object.purchasable:
|
||||
if self.show_buy_sell_actions and (
|
||||
self.ground_object.purchasable or self.game.turn == 0
|
||||
):
|
||||
self.mainLayout.addLayout(self.actionLayout)
|
||||
self.setLayout(self.mainLayout)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user