LttP: fix ganons tower trash fill deleting items that did not fit (#1113)
This commit is contained in:
parent
b533ffb9e8
commit
1aa3e431c8
|
@ -490,11 +490,15 @@ class ALTTPWorld(World):
|
||||||
|
|
||||||
while gtower_locations and filleritempool and trash_count > 0:
|
while gtower_locations and filleritempool and trash_count > 0:
|
||||||
spot_to_fill = gtower_locations.pop()
|
spot_to_fill = gtower_locations.pop()
|
||||||
item_to_place = filleritempool.pop()
|
for index, item in enumerate(filleritempool):
|
||||||
if spot_to_fill.item_rule(item_to_place):
|
if spot_to_fill.item_rule(item):
|
||||||
world.push_item(spot_to_fill, item_to_place, False)
|
filleritempool.pop(index) # remove from outer fill
|
||||||
fill_locations.remove(spot_to_fill) # very slow, unfortunately
|
world.push_item(spot_to_fill, item, False)
|
||||||
trash_count -= 1
|
fill_locations.remove(spot_to_fill) # very slow, unfortunately
|
||||||
|
trash_count -= 1
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
logging.warning(f"Could not trash fill Ganon's Tower for player {player}.")
|
||||||
|
|
||||||
def get_filler_item_name(self) -> str:
|
def get_filler_item_name(self) -> str:
|
||||||
if self.world.goal[self.player] == "icerodhunt":
|
if self.world.goal[self.player] == "icerodhunt":
|
||||||
|
|
Loading…
Reference in New Issue