diff --git a/Fill.py b/Fill.py index abdad440..d4df9fdd 100644 --- a/Fill.py +++ b/Fill.py @@ -450,6 +450,12 @@ def distribute_early_items(multiworld: MultiWorld, def distribute_items_restrictive(multiworld: MultiWorld, panic_method: typing.Literal["swap", "raise", "start_inventory"] = "swap") -> None: + assert all(item.location is None for item in multiworld.itempool), ( + "At the start of distribute_items_restrictive, " + "there are items in the multiworld itempool that are already placed on locations:\n" + f"{[(item.location, item) for item in multiworld.itempool if item.location is not None]}" + ) + fill_locations = sorted(multiworld.get_unfilled_locations()) multiworld.random.shuffle(fill_locations) # get items to distribute