From a9e784c0e3e9cd0d0c375da556a3a6fe77d6cf48 Mon Sep 17 00:00:00 2001 From: Raffson Date: Wed, 25 Dec 2024 23:40:06 +0100 Subject: [PATCH] Regroup settings per page in code --- game/settings/settings.py | 77 ++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/game/settings/settings.py b/game/settings/settings.py index 5dbba454..7b5153d4 100644 --- a/game/settings/settings.py +++ b/game/settings/settings.py @@ -175,44 +175,6 @@ class Settings: default=None, ) - # Campaign management - # General - squadron_random_chance: int = bounded_int_option( - "Percentage of randomly selected aircraft types (only for generated squadrons)", - page=CAMPAIGN_MANAGEMENT_PAGE, - section=GENERAL_SECTION, - default=50, - min=0, - max=100, - detail=( - "Aircraft type selection is governed by the campaign and the squadron definitions available to " - "Retribution. Squadrons are generated by Retribution if the faction does not have access to the campaign " - "designer's squadron/aircraft definitions. Use the above to increase/decrease aircraft variety by making " - "some selections random instead of picking aircraft types from a priority list." - ), - ) - restrict_weapons_by_date: bool = boolean_option( - "Restrict weapons by date (WIP)", - page=CAMPAIGN_MANAGEMENT_PAGE, - section=GENERAL_SECTION, - default=False, - detail=( - "Restricts weapon availability based on the campaign date. Data is " - "extremely incomplete so does not affect all weapons." - ), - ) - prefer_squadrons_with_matching_primary_task: bool = boolean_option( - "Prefer squadrons with matching primary task when planning missions", - page=CAMPAIGN_MANAGEMENT_PAGE, - section=GENERAL_SECTION, - default=False, - detail=( - "If checked, squadrons with a primary task matching the mission will be " - "preferred even if there is a closer squadron capable of the mission as a " - "secondary task. Expect longer flights, but squadrons will be more often " - "assigned to their primary task." - ), - ) # CAMPAIGN DOCTRINE desired_barcap_mission_duration: timedelta = minutes_option( "Desired BARCAP on-station time", @@ -500,6 +462,45 @@ class Settings: "range is defined in the helicopter's yaml specification." ), ) + + # Campaign management + # General + squadron_random_chance: int = bounded_int_option( + "Percentage of randomly selected aircraft types (only for generated squadrons)", + page=CAMPAIGN_MANAGEMENT_PAGE, + section=GENERAL_SECTION, + default=50, + min=0, + max=100, + detail=( + "Aircraft type selection is governed by the campaign and the squadron definitions available to " + "Retribution. Squadrons are generated by Retribution if the faction does not have access to the campaign " + "designer's squadron/aircraft definitions. Use the above to increase/decrease aircraft variety by making " + "some selections random instead of picking aircraft types from a priority list." + ), + ) + restrict_weapons_by_date: bool = boolean_option( + "Restrict weapons by date (WIP)", + page=CAMPAIGN_MANAGEMENT_PAGE, + section=GENERAL_SECTION, + default=False, + detail=( + "Restricts weapon availability based on the campaign date. Data is " + "extremely incomplete so does not affect all weapons." + ), + ) + prefer_squadrons_with_matching_primary_task: bool = boolean_option( + "Prefer squadrons with matching primary task when planning missions", + page=CAMPAIGN_MANAGEMENT_PAGE, + section=GENERAL_SECTION, + default=False, + detail=( + "If checked, squadrons with a primary task matching the mission will be " + "preferred even if there is a closer squadron capable of the mission as a " + "secondary task. Expect longer flights, but squadrons will be more often " + "assigned to their primary task." + ), + ) # Pilots and Squadrons ai_pilot_levelling: bool = boolean_option(