Implemented a Pretense settings page.

This commit is contained in:
MetalStormGhost 2023-10-22 21:59:21 +03:00
parent 5b60d64437
commit 72d1c105a7
3 changed files with 27 additions and 2 deletions

View File

@ -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"
@ -979,6 +981,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.

View File

@ -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(

View File

@ -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"