Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect time of day logic for the Bazaar #434

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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