Added option for only night missions.

- Moved the night mission setting back from the Mission restrictions section to the Mission difficulty section.
- Changed the Night/day mission option into a dropdown menu.

Resolves #1786
This commit is contained in:
MetalStormGhost
2021-11-24 00:12:18 +02:00
committed by RndName
parent 475cb4851a
commit d2eb98bcc5
3 changed files with 30 additions and 7 deletions

View File

@@ -23,6 +23,12 @@ class AutoAtoBehavior(Enum):
Prefer = "Prefer player pilots"
class NightMissions(Enum):
DayAndNight = "nightmissions_nightandday"
OnlyDay = "nightmissions_onlyday"
OnlyNight = "nightmissions_onlynight"
DIFFICULTY_PAGE = "Difficulty"
AI_DIFFICULTY_SECTION = "AI Difficulty"
@@ -104,11 +110,16 @@ class Settings:
section=MISSION_DIFFICULTY_SECTION,
default=True,
)
night_disabled: bool = boolean_option(
"No night missions",
night_day_missions: NightMissions = choices_option(
"Night/day mission options",
page=DIFFICULTY_PAGE,
section=MISSION_DIFFICULTY_SECTION,
default=False,
choices={
"Generate night and day missions": NightMissions.DayAndNight,
"Only generate day missions": NightMissions.OnlyDay,
"Only generate night missions": NightMissions.OnlyNight,
},
default=NightMissions.DayAndNight,
)
# Mission Restrictions
labels: str = choices_option(