From 05a51346f9e1608592c2fd2b3881194603755bf5 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 17 Jun 2022 03:24:15 +0200 Subject: [PATCH] LttP: fix Ganon's Tower trash prefill ignoring item_rules (#648) --- worlds/alttp/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index 9f646eb8..7b577421 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -472,13 +472,14 @@ class ALTTPWorld(World): 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: