From ce8f07b347fb2a8f03de44039ef1e4df8e69ea06 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 16 Sep 2023 03:32:05 +0200 Subject: [PATCH] Core: fix start_inventory_from_pool only adding one filler per item name --- Main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Main.py b/Main.py index 860be6347c66..ab3a8a666828 100644 --- a/Main.py +++ b/Main.py @@ -159,7 +159,8 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No for player, items in depletion_pool.items(): player_world: AutoWorld.World = world.worlds[player] for count in items.values(): - new_items.append(player_world.create_filler()) + for _ in range(count): + new_items.append(player_world.create_filler()) target: int = sum(sum(items.values()) for items in depletion_pool.values()) for i, item in enumerate(world.itempool): if depletion_pool[item.player].get(item.name, 0): @@ -179,6 +180,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No if remaining_items: raise Exception(f"{world.get_player_name(player)}" f" is trying to remove items from their pool that don't exist: {remaining_items}") + assert len(world.itempool) == len(new_items), "Item Pool amounts should not change." world.itempool[:] = new_items # temporary home for item links, should be moved out of Main