Skip to content

Commit

Permalink
Merge pull request mint-choc-chip-skyblade#434 from CovenEsme/fix-baz…
Browse files Browse the repository at this point in the history
…aar-tod-logic

Fix incorrect time of day logic for the Bazaar
  • Loading branch information
CovenEsme authored Dec 4, 2024
2 parents 16181df + 7df545f commit 90878b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions data/world/Skyloft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions logic/entrance_shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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")
Expand Down

0 comments on commit 90878b6

Please sign in to comment.