From acf7fda26aeb9e75020c64c91bbac76435033f9c Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 16 Oct 2022 14:32:13 +0200 Subject: [PATCH] Main: Fill: more opportunities for swapping --- Fill.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Fill.py b/Fill.py index 41a09676..15430d1d 100644 --- a/Fill.py +++ b/Fill.py @@ -82,13 +82,14 @@ def fill_restrictive(world: MultiWorld, base_state: CollectionState, locations: location.item = None placed_item.location = None - swap_state = sweep_from_pool(base_state) + swap_state = sweep_from_pool(base_state, [placed_item]) + # swap_state assumes we can collect placed item before item_to_place if (not single_player_placement or location.player == item_to_place.player) \ and location.can_fill(swap_state, item_to_place, perform_access_check): - # Verify that placing this item won't reduce available locations + # Verify that placing this item won't reduce available locations, which could happen with rules + # that want to not have both items. Left in until removal is proven useful. prev_state = swap_state.copy() - prev_state.collect(placed_item) prev_loc_count = len( world.get_reachable_locations(prev_state))