Core: crash if non_local pool is too big

This commit is contained in:
Fabian Dill 2022-08-15 20:16:12 +02:00 committed by Fabian Dill
parent d10fbf8263
commit 8484193151
1 changed files with 2 additions and 2 deletions

View File

@ -220,8 +220,8 @@ def distribute_items_restrictive(world: MultiWorld) -> None:
world.push_item(defaultlocations.pop(i), item_to_place, False)
break
else:
logging.warning(
f"Could not place non_local_item {item_to_place} among {defaultlocations}, tossing.")
raise Exception(f"Could not place non_local_item {item_to_place} among {defaultlocations}. "
f"Too many non-local items for too few remaining locations.")
world.random.shuffle(defaultlocations)