Skip to content

Commit

Permalink
Fix hint error when traps are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Feb 17, 2024
1 parent 7064099 commit f0b13d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions randomizers/hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ def __init__(self, rando):
HintsRandomizer.load_hint_text_files()

for item_name in self.logic.all_progress_items:
item_name = HintsRandomizer.get_hint_item_name(item_name)
assert item_name in HintsRandomizer.cryptic_item_hints, f"Progress item is missing hint text: {item_name!r}"
if self.check_item_can_be_hinted_at(item_name):
item_name = HintsRandomizer.get_hint_item_name(item_name)
assert item_name in HintsRandomizer.cryptic_item_hints, f"Progress item is missing hint text: {item_name!r}"

# Validate location names in location hints file.
for location_name in self.location_hints:
Expand Down Expand Up @@ -798,7 +799,7 @@ def filter_out_hinted_barren_locations(self, hintable_locations, hinted_barren_z

return new_hintable_locations

def check_item_can_be_hinted_at(self, item_name):
def check_item_can_be_hinted_at(self, item_name: str):
# Don't hint at non-progress items.
if item_name not in self.logic.all_progress_items:
return False
Expand Down

0 comments on commit f0b13d1

Please sign in to comment.