TWW: Remove unnecessary items from slot data (#5045)

This commit is contained in:
Jonathan Tan
2025-05-28 18:27:03 -04:00
committed by GitHub
parent fde203379d
commit dd6007b309
2 changed files with 48 additions and 1 deletions

View File

@@ -755,6 +755,53 @@ class TWWOptions(PerGameCommonOptions):
remove_music: RemoveMusic
death_link: DeathLink
def get_slot_data_dict(self) -> dict[str, Any]:
"""
Returns a dictionary of option name to value to be placed in
the slot data network package.
:return: Dictionary of option name to value for the slot data.
"""
return self.as_dict(
"progression_dungeons",
"progression_tingle_chests",
"progression_dungeon_secrets",
"progression_puzzle_secret_caves",
"progression_combat_secret_caves",
"progression_savage_labyrinth",
"progression_great_fairies",
"progression_short_sidequests",
"progression_long_sidequests",
"progression_spoils_trading",
"progression_minigames",
"progression_battlesquid",
"progression_free_gifts",
"progression_mail",
"progression_platforms_rafts",
"progression_submarines",
"progression_eye_reef_chests",
"progression_big_octos_gunboats",
"progression_triforce_charts",
"progression_treasure_charts",
"progression_expensive_purchases",
"progression_island_puzzles",
"progression_misc",
"sword_mode",
"required_bosses",
"logic_obscurity",
"logic_precision",
"enable_tuner_logic",
"randomize_dungeon_entrances",
"randomize_secret_cave_entrances",
"randomize_miniboss_entrances",
"randomize_boss_entrances",
"randomize_secret_cave_inner_entrances",
"randomize_fairy_fountain_entrances",
"swift_sail",
"skip_rematch_bosses",
"remove_music",
)
def get_output_dict(self) -> dict[str, Any]:
"""
Returns a dictionary of option name to value to be placed in

View File

@@ -586,7 +586,7 @@ class TWWWorld(World):
:return: A dictionary to be sent to the client when it connects to the server.
"""
slot_data = self.options.as_dict(*self.options_dataclass.type_hints)
slot_data = self.options.get_slot_data_dict()
# Add entrances to `slot_data`. This is the same data that is written to the .aptww file.
entrances = {