core: remove the correct item from the item_pool in fill_restrictive

This commit is contained in:
el-u 2023-07-29 19:54:56 +02:00 committed by Fabian Dill
parent 6c908de13f
commit 5869f78ea7
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ def fill_restrictive(world: MultiWorld, base_state: CollectionState, locations:
items_to_place = [items.pop() items_to_place = [items.pop()
for items in reachable_items.values() if items] for items in reachable_items.values() if items]
for item in items_to_place: for item in items_to_place:
item_pool.remove(item) for p, pool_item in enumerate(item_pool):
if pool_item is item:
item_pool.pop(p)
break
maximum_exploration_state = sweep_from_pool( maximum_exploration_state = sweep_from_pool(
base_state, item_pool + unplaced_items) base_state, item_pool + unplaced_items)