From 87975b9aadf6263e670d6c052e5ac44c8f12bb7d Mon Sep 17 00:00:00 2001 From: MetalStormGhost Date: Sun, 22 Oct 2023 21:59:21 +0300 Subject: [PATCH] Implemented a Pretense settings page. --- game/settings/settings.py | 24 ++++++++++++++++++++++++ qt_ui/uiconstants.py | 3 ++- qt_ui/windows/QLiberationWindow.py | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/game/settings/settings.py b/game/settings/settings.py index bdc42f78..3acc74c8 100644 --- a/game/settings/settings.py +++ b/game/settings/settings.py @@ -49,6 +49,8 @@ FLIGHT_PLANNER_AUTOMATION = "Flight Planner Automation" CAMPAIGN_DOCTRINE_PAGE = "Campaign Doctrine" DOCTRINE_DISTANCES_SECTION = "Doctrine distances" +PRETENSE_PAGE = "Pretense" + MISSION_GENERATOR_PAGE = "Mission Generator" GAMEPLAY_SECTION = "Gameplay" @@ -971,6 +973,28 @@ class Settings: "if the start-up type was manually changed to 'In-Flight'." ), ) + pretense_maxdistfromfront_distance: int = bounded_int_option( + "Max distance from front (km)", + page=PRETENSE_PAGE, + section=GENERAL_SECTION, + default=130, + min=10, + max=10000, + ) + pretense_closeoverride_distance: int = bounded_int_option( + "Close override distance (km)", + page=PRETENSE_PAGE, + section=GENERAL_SECTION, + default=28, + min=5, + max=10000, + ) + pretense_do_not_generate_sead_missions: bool = boolean_option( + "Do not generate player SEAD missions", + page=PRETENSE_PAGE, + section=PERFORMANCE_SECTION, + default=False, + ) # Cheating. Not using auto settings because the same page also has buttons which do # not alter settings. diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index d431fc29..99d84386 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -32,7 +32,8 @@ def load_icons(): "./resources/ui/misc/" + get_theme_icons() + "/github.png" ) ICONS["Ukraine"] = QPixmap("./resources/ui/misc/ukraine.png") - ICONS["Pretense"] = QPixmap("./resources/ui/misc/pretense_discord.png") + ICONS["Pretense"] = QPixmap("./resources/ui/misc/pretense.png") + ICONS["Pretense_discord"] = QPixmap("./resources/ui/misc/pretense_discord.png") ICONS["Pretense_generate"] = QPixmap("./resources/ui/misc/pretense_generate.png") ICONS["Control Points"] = QPixmap( diff --git a/qt_ui/windows/QLiberationWindow.py b/qt_ui/windows/QLiberationWindow.py index 13d0988a..f6a03968 100644 --- a/qt_ui/windows/QLiberationWindow.py +++ b/qt_ui/windows/QLiberationWindow.py @@ -195,7 +195,7 @@ class QLiberationWindow(QMainWindow): ) self.pretenseLinkAction = QAction("&DCS: Pretense", self) - self.pretenseLinkAction.setIcon(QIcon(CONST.ICONS["Pretense"])) + self.pretenseLinkAction.setIcon(QIcon(CONST.ICONS["Pretense_discord"])) self.pretenseLinkAction.triggered.connect( lambda: webbrowser.open_new_tab( "https://" + "discord.gg" + "/" + "PtPsb9Mpk6"