Add "Instant Squadron Transfer" cheat option

Resolves #14
This commit is contained in:
Raffson
2022-12-26 01:27:52 +01:00
parent 5c06e74659
commit 00ab0c4be2
7 changed files with 42 additions and 4 deletions

View File

@@ -60,6 +60,10 @@ class CheatSettingsBox(QGroupBox):
)
self.base_capture_cheat_checkbox.toggled.connect(apply_settings)
self.transfer_cheat_checkbox = QCheckBox()
self.transfer_cheat_checkbox.setChecked(game.settings.enable_transfer_cheat)
self.transfer_cheat_checkbox.toggled.connect(apply_settings)
self.red_ato = QLabeledWidget("Show Red ATO:", self.red_ato_checkbox)
self.main_layout.addLayout(self.red_ato)
self.frontline_cheat = QLabeledWidget(
@@ -70,6 +74,10 @@ class CheatSettingsBox(QGroupBox):
"Enable Base Capture Cheat:", self.base_capture_cheat_checkbox
)
self.main_layout.addLayout(self.base_capture_cheat)
self.transfer_cheat = QLabeledWidget(
"Enable Instant Squadron Transfer Cheat:", self.transfer_cheat_checkbox
)
self.main_layout.addLayout(self.transfer_cheat)
@property
def show_red_ato(self) -> bool:
@@ -83,6 +91,10 @@ class CheatSettingsBox(QGroupBox):
def show_base_capture_cheat(self) -> bool:
return self.base_capture_cheat_checkbox.isChecked()
@property
def show_transfer_cheat(self) -> bool:
return self.transfer_cheat_checkbox.isChecked()
class AutoSettingsLayout(QGridLayout):
def __init__(
@@ -360,6 +372,9 @@ class QSettingsWindow(QDialog):
self.game.settings.enable_base_capture_cheat = (
self.cheat_options.show_base_capture_cheat
)
self.game.settings.enable_transfer_cheat = (
self.cheat_options.show_transfer_cheat
)
events = GameUpdateEvents()
self.game.compute_unculled_zones(events)