Skip to content

Commit

Permalink
LttP: fix Ganon's Tower trash prefill ignoring item_rules (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 authored Jun 17, 2022
1 parent 6c525e1 commit 05a5134
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions worlds/alttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,14 @@ def stage_fill_hook(cls, world, progitempool, nonexcludeditempool, localrestitem
while gtower_locations and gt_item_pool and trash_count > 0:
spot_to_fill = gtower_locations.pop()
item_to_place = gt_item_pool.pop()
if item_to_place in localrest:
localrest.remove(item_to_place)
else:
restitempool.remove(item_to_place)
world.push_item(spot_to_fill, item_to_place, False)
fill_locations.remove(spot_to_fill) # very slow, unfortunately
trash_count -= 1
if spot_to_fill.item_rule(item_to_place):
if item_to_place in localrest:
localrest.remove(item_to_place)
else:
restitempool.remove(item_to_place)
world.push_item(spot_to_fill, item_to_place, False)
fill_locations.remove(spot_to_fill) # very slow, unfortunately
trash_count -= 1


def get_filler_item_name(self) -> str:
Expand Down

0 comments on commit 05a5134

Please sign in to comment.