From dd6007b3094e4cf3be4d13dc55b9ceb692e23123 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Wed, 28 May 2025 18:27:03 -0400 Subject: [PATCH 1/3] TWW: Remove unnecessary items from slot data (#5045) --- worlds/tww/Options.py | 47 ++++++++++++++++++++++++++++++++++++++++++ worlds/tww/__init__.py | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/worlds/tww/Options.py b/worlds/tww/Options.py index ad9c8b3937..d02c606f9f 100644 --- a/worlds/tww/Options.py +++ b/worlds/tww/Options.py @@ -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 diff --git a/worlds/tww/__init__.py b/worlds/tww/__init__.py index 918d68478f..71044d78a8 100644 --- a/worlds/tww/__init__.py +++ b/worlds/tww/__init__.py @@ -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 = { From 6ebd60feaa4f70ca73ba473c1e40186e7383e901 Mon Sep 17 00:00:00 2001 From: sgrunt Date: Wed, 28 May 2025 18:37:39 -0600 Subject: [PATCH 2/3] Timespinner: Fix Logic Error with Risky Warp to Emperor's Tower and Lab Access (#4784) Co-authored-by: sgrunt --- worlds/timespinner/Regions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/timespinner/Regions.py b/worlds/timespinner/Regions.py index b00396f222..702e237355 100644 --- a/worlds/timespinner/Regions.py +++ b/worlds/timespinner/Regions.py @@ -115,7 +115,7 @@ def create_regions_and_locations(world: MultiWorld, player: int, options: Timesp connect(world, player, 'The lab', 'The lab (power off)', lambda state: options.lock_key_amadeus or logic.has_doublejump_of_npc(state)) connect(world, player, 'The lab (power off)', 'The lab', lambda state: not flooded.flood_lab or state.has('Water Mask', player)) connect(world, player, 'The lab (power off)', 'The lab (upper)', lambda state: logic.has_forwarddash_doublejump(state) and ((not options.lock_key_amadeus) or state.has('Lab Access Genza', player))) - connect(world, player, 'The lab (upper)', 'The lab (power off)') + connect(world, player, 'The lab (upper)', 'The lab (power off)', lambda state: options.lock_key_amadeus and state.has('Lab Access Genza', player)) connect(world, player, 'The lab (upper)', 'Emperors tower', logic.has_forwarddash_doublejump) connect(world, player, 'The lab (upper)', 'Ancient Pyramid (entrance)', lambda state: state.has_all({'Timespinner Wheel', 'Timespinner Spindle', 'Timespinner Gear 1', 'Timespinner Gear 2', 'Timespinner Gear 3'}, player)) connect(world, player, 'Emperors tower', 'The lab (upper)') From b0f41c0360bdd7621d6733204a03448dc82f42aa Mon Sep 17 00:00:00 2001 From: sgrunt Date: Wed, 28 May 2025 18:40:24 -0600 Subject: [PATCH 3/3] Timespinner: Fix Connection Logic from Maw Cave Entrance to Maw (#4831) Co-authored-by: sgrunt --- worlds/timespinner/Locations.py | 10 +++++----- worlds/timespinner/Regions.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/worlds/timespinner/Locations.py b/worlds/timespinner/Locations.py index 82f284c656..21e5501e58 100644 --- a/worlds/timespinner/Locations.py +++ b/worlds/timespinner/Locations.py @@ -150,10 +150,10 @@ def get_location_datas(player: Optional[int], options: Optional[TimespinnerOptio LocationData('Caves of Banishment (upper)', 'Caves of Banishment (Maw): Jackpot room chest 3', 1337118, lambda state: flooded.flood_maw or logic.has_forwarddash_doublejump(state)), LocationData('Caves of Banishment (upper)', 'Caves of Banishment (Maw): Jackpot room chest 4', 1337119, lambda state: flooded.flood_maw or logic.has_forwarddash_doublejump(state)), LocationData('Caves of Banishment (upper)', 'Caves of Banishment (Maw): Pedestal', 1337120, lambda state: not flooded.flood_maw or state.has('Water Mask', player)), - LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Last chance before Maw', 1337121, lambda state: state.has('Water Mask', player) if flooded.flood_maw else logic.has_doublejump(state)), - LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Plasma Crystal', 1337173, lambda state: state.has_any({'Gas Mask', 'Talaria Attachment'}, player) and (not flooded.flood_maw or state.has('Water Mask', player))), - LocationData('Caves of Banishment (Maw)', 'Killed Maw', EventId, lambda state: state.has('Gas Mask', player) and (not flooded.flood_maw or state.has('Water Mask', player))), - LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Mineshaft', 1337122, lambda state: state.has_any({'Gas Mask', 'Talaria Attachment'}, player) and (not flooded.flood_maw or state.has('Water Mask', player))), + LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Last chance before Maw', 1337121, lambda state: flooded.flood_maw or logic.has_doublejump(state)), + LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Plasma Crystal', 1337173, lambda state: state.has_any({'Gas Mask', 'Talaria Attachment'}, player)), + LocationData('Caves of Banishment (Maw)', 'Killed Maw', EventId, lambda state: state.has('Gas Mask', player)), + LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Mineshaft', 1337122, lambda state: state.has_any({'Gas Mask', 'Talaria Attachment'}, player)), LocationData('Caves of Banishment (Sirens)', 'Caves of Banishment (Sirens): Wyvern room', 1337123), LocationData('Caves of Banishment (Sirens)', 'Caves of Banishment (Sirens): Siren room above water chest', 1337124), LocationData('Caves of Banishment (Sirens)', 'Caves of Banishment (Sirens): Siren room underwater left chest', 1337125, lambda state: state.has('Water Mask', player)), @@ -251,7 +251,7 @@ def get_location_datas(player: Optional[int], options: Optional[TimespinnerOptio LocationData('Royal towers (upper)', 'Royal Towers: Journal - Top Struggle Juggle Base (War of the Sisters)', 1337195), LocationData('Royal towers (upper)', 'Royal Towers: Journal - Aelana Boss (Stained Letter)', 1337196), LocationData('Royal towers', 'Royal Towers: Journal - Near Bottom Struggle Juggle (Mission Findings)', 1337197, lambda state: flooded.flood_courtyard or logic.has_doublejump_of_npc(state)), - LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Journal - Lower Left Caves (Naivety)', 1337198, lambda state: not flooded.flood_maw or state.has('Water Mask', player)) + LocationData('Caves of Banishment (Maw)', 'Caves of Banishment (Maw): Journal - Lower Left Caves (Naivety)', 1337198) ) # 1337199 - 1337232 Reserved for future use diff --git a/worlds/timespinner/Regions.py b/worlds/timespinner/Regions.py index 702e237355..cb55d9810d 100644 --- a/worlds/timespinner/Regions.py +++ b/worlds/timespinner/Regions.py @@ -141,7 +141,7 @@ def create_regions_and_locations(world: MultiWorld, player: int, options: Timesp connect(world, player, 'Lower Lake Serene', 'Left Side forest Caves') connect(world, player, 'Lower Lake Serene', 'Caves of Banishment (upper)', lambda state: flooded.flood_lake_serene or logic.has_doublejump(state)) connect(world, player, 'Caves of Banishment (upper)', 'Lower Lake Serene', lambda state: not flooded.flood_lake_serene or state.has('Water Mask', player)) - connect(world, player, 'Caves of Banishment (upper)', 'Caves of Banishment (Maw)', lambda state: logic.has_doublejump(state) or state.has_any({'Gas Mask', 'Talaria Attachment'}, player) or logic.has_teleport(state)) + connect(world, player, 'Caves of Banishment (upper)', 'Caves of Banishment (Maw)', lambda state: not flooded.flood_maw or state.has('Water Mask', player)) connect(world, player, 'Caves of Banishment (upper)', 'Space time continuum', logic.has_teleport) connect(world, player, 'Caves of Banishment (Maw)', 'Caves of Banishment (upper)', lambda state: logic.has_doublejump(state) if not flooded.flood_maw else state.has('Water Mask', player)) connect(world, player, 'Caves of Banishment (Maw)', 'Caves of Banishment (Sirens)', lambda state: state.has_any({'Gas Mask', 'Talaria Attachment'}, player) )