mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Fix bug where there is less locations than hint count.
This commit is contained in:
@@ -2287,7 +2287,7 @@ def write_strings(rom, world, player):
|
|||||||
if hint_count:
|
if hint_count:
|
||||||
locations = world.find_items_in_locations(set(items_to_hint), player)
|
locations = world.find_items_in_locations(set(items_to_hint), player)
|
||||||
local_random.shuffle(locations)
|
local_random.shuffle(locations)
|
||||||
for x in range(hint_count):
|
for x in range(min(hint_count, len(locations))):
|
||||||
this_location = locations.pop()
|
this_location = locations.pop()
|
||||||
this_hint = this_location.item.hint_text + ' can be found ' + hint_text(this_location) + '.'
|
this_hint = this_location.item.hint_text + ' can be found ' + hint_text(this_location) + '.'
|
||||||
tt[hint_locations.pop(0)] = this_hint
|
tt[hint_locations.pop(0)] = this_hint
|
||||||
|
Reference in New Issue
Block a user