Add option to only generate night missions (#36)

Replaces the existing checkbox to disable night missions with a selector that allows you to choose between Day/Night/Day&Night
This commit is contained in:
MetalStormGhost
2022-12-13 20:08:56 +02:00
committed by GitHub
parent 608525d5b4
commit 7d2dd0bcbe
3 changed files with 29 additions and 7 deletions

View File

@@ -14,6 +14,7 @@ from .minutesoption import minutes_option
from .optiondescription import OptionDescription, SETTING_DESCRIPTION_KEY
from .skilloption import skill_option
from ..ato.starttype import StartType
from ..weather import NightMissions
@unique
@@ -105,11 +106,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(