From 11f344fc6bc207f47530037cf1c3e9acf6c9b6c8 Mon Sep 17 00:00:00 2001 From: CovenEsme <84377742+CovenEsme@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:56:00 +0000 Subject: [PATCH] Fix incorrect time of day logic for the Bazaar --- data/world/Skyloft.yaml | 8 ++++---- logic/entrance_shuffle.py | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/data/world/Skyloft.yaml b/data/world/Skyloft.yaml index 415960f7..cd219f34 100644 --- a/data/world/Skyloft.yaml +++ b/data/world/Skyloft.yaml @@ -250,7 +250,7 @@ Central Skyloft - West Rupee in Bird's Nest: Nothing - name: Bazaar - allowed_time_of_day: All + allowed_time_of_day: Day Only events: Obtain Stamina Potion: Bottle and Raise_Lanayru_Mining_Facility # important Tracker events @@ -272,19 +272,19 @@ # Bazaar - Upgrade to Big Bug Net: Bug_Net and 'Can_Play_Clean_Cut_Minigame' - name: Bazaar North - allowed_time_of_day: All + allowed_time_of_day: Day Only exits: Bazaar: Nothing Central Skyloft: Nothing - name: Bazaar South - allowed_time_of_day: All + allowed_time_of_day: Day Only exits: Bazaar: Nothing Central Skyloft: Nothing - name: Bazaar West - allowed_time_of_day: All + allowed_time_of_day: Day Only exits: Bazaar: Nothing Central Skyloft: Nothing diff --git a/logic/entrance_shuffle.py b/logic/entrance_shuffle.py index 625a63e1..165ec938 100644 --- a/logic/entrance_shuffle.py +++ b/logic/entrance_shuffle.py @@ -519,13 +519,17 @@ def set_plandomizer_entrances( entrance_type = entrance_to_connect.type else: raise EntranceShuffleError( - f"Entrance {entrance}'s type is not being shuffled and thus can't be plandomized" + f"Entrance {entrance}'s type ({entrance.type}) is not being shuffled and thus can't be plandomized" ) # Get the appropriate pools entrance_pool = entrance_pools[entrance_type] target_pool = target_entrance_pools[entrance_type] + if entrance_to_connect.reverse in entrance_pool: + entrance_to_connect = entrance_to_connect.reverse + target_to_connect = target_to_connect.reverse + if entrance_to_connect in entrance_pool: valid_target_found = False for target_entrance in target_pool: @@ -546,7 +550,7 @@ def set_plandomizer_entrances( ) else: raise EntranceShuffleError( - f"Entrance {entrance}'s type is not being shuffled and thus can't be plandomized" + f"Entrance {entrance}'s type ({entrance.type}) is not being shuffled and thus can't be plandomized" ) logging.getLogger("").debug("All plandomizer entrances have been placed")