From dc82b384c5f04c731551c707c4ab3e9898842448 Mon Sep 17 00:00:00 2001 From: Brad Humphrey Date: Mon, 20 Dec 2021 18:23:19 -0700 Subject: [PATCH] Add comment about swap count --- Fill.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Fill.py b/Fill.py index 067ac98177..686923e945 100644 --- a/Fill.py +++ b/Fill.py @@ -62,6 +62,8 @@ def fill_restrictive(world: MultiWorld, base_state: CollectionState, locations, # try swaping this item with previously placed items for(i, location) in enumerate(placements): placed_item = location.item + # Unplaceable items can sometimes be swapped infinitely. Limit the + # number of times we will swap an individual item to prevent this if swapped_items[placed_item.player, placed_item.name] > 0: continue location.item = None