Muse Dash: Add support for specifying specific DLCs (#2329)

This commit is contained in:
Justus Lind
2023-10-20 10:13:17 +10:00
committed by GitHub
parent fb6b66463d
commit 385803eb5c
7 changed files with 166 additions and 99 deletions

View File

@@ -1,10 +1,19 @@
from typing import Dict
from Options import Toggle, Option, Range, Choice, DeathLink, ItemSet
from Options import Toggle, Option, Range, Choice, DeathLink, ItemSet, OptionSet, PerGameCommonOptions
from dataclasses import dataclass
from .MuseDashCollection import MuseDashCollections
class AllowJustAsPlannedDLCSongs(Toggle):
"""Whether [Just as Planned]/[Muse Plus] DLC Songs, and all the DLCs along with it, will be included in the randomizer."""
display_name = "Allow [Just as Planned]/[Muse Plus] DLC Songs"
"""Whether [Muse Plus] DLC Songs, and all the albums included in it, can be chosen as randomised songs.
Note: The [Just As Planned] DLC contains all [Muse Plus] songs."""
display_name = "Allow [Muse Plus] DLC Songs"
class DLCMusicPacks(OptionSet):
"""Which non-[Muse Plus] DLC packs can be chosen as randomised songs."""
display_name = "DLC Packs"
default = {}
valid_keys = [dlc for dlc in MuseDashCollections.DLC]
class StreamerModeEnabled(Toggle):
@@ -159,21 +168,22 @@ class ExcludeSongs(ItemSet):
display_name = "Exclude Songs"
musedash_options: Dict[str, type(Option)] = {
"allow_just_as_planned_dlc_songs": AllowJustAsPlannedDLCSongs,
"streamer_mode_enabled": StreamerModeEnabled,
"starting_song_count": StartingSongs,
"additional_song_count": AdditionalSongs,
"additional_item_percentage": AdditionalItemPercentage,
"song_difficulty_mode": DifficultyMode,
"song_difficulty_min": DifficultyModeOverrideMin,
"song_difficulty_max": DifficultyModeOverrideMax,
"grade_needed": GradeNeeded,
"music_sheet_count_percentage": MusicSheetCountPercentage,
"music_sheet_win_count_percentage": MusicSheetWinCountPercentage,
"available_trap_types": TrapTypes,
"trap_count_percentage": TrapCountPercentage,
"death_link": DeathLink,
"include_songs": IncludeSongs,
"exclude_songs": ExcludeSongs
}
@dataclass
class MuseDashOptions(PerGameCommonOptions):
allow_just_as_planned_dlc_songs: AllowJustAsPlannedDLCSongs
dlc_packs: DLCMusicPacks
streamer_mode_enabled: StreamerModeEnabled
starting_song_count: StartingSongs
additional_song_count: AdditionalSongs
additional_item_percentage: AdditionalItemPercentage
song_difficulty_mode: DifficultyMode
song_difficulty_min: DifficultyModeOverrideMin
song_difficulty_max: DifficultyModeOverrideMax
grade_needed: GradeNeeded
music_sheet_count_percentage: MusicSheetCountPercentage
music_sheet_win_count_percentage: MusicSheetWinCountPercentage
available_trap_types: TrapTypes
trap_count_percentage: TrapCountPercentage
death_link: DeathLink
include_songs: IncludeSongs
exclude_songs: ExcludeSongs