From d49860fbebcbde28774ae091a1505290d430b505 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 23 Jul 2023 17:57:33 +0200 Subject: [PATCH] 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. --- Fill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fill.py b/Fill.py index c6fb5c54..9e82ac07 100644 --- a/Fill.py +++ b/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)