Fill: fix cleanup-after-swapping performance (#2016)
#1800 introduced a cleanup pass to "eject" unreachable items to hopefully get better error reporting of what could not be placed. The code to do so has an unnecessary amount of sweeps from pool.
This commit is contained in:
parent
591661ca79
commit
d49860fbeb
2
Fill.py
2
Fill.py
|
@ -152,8 +152,8 @@ def fill_restrictive(world: MultiWorld, base_state: CollectionState, locations:
|
|||
|
||||
if cleanup_required:
|
||||
# validate all placements and remove invalid ones
|
||||
state = sweep_from_pool(base_state, [])
|
||||
for placement in placements:
|
||||
state = sweep_from_pool(base_state, [])
|
||||
if world.accessibility[placement.item.player] != "minimal" and not placement.can_reach(state):
|
||||
placement.item.location = None
|
||||
unplaced_items.append(placement.item)
|
||||
|
|
Loading…
Reference in New Issue