From 13122ab4668681772261195b88bf4c496152b55f Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 10 Dec 2023 20:42:41 +0100 Subject: [PATCH] Core: remove start_inventory_from_pool from early_items (#2579) --- Main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Main.py b/Main.py index b6465047..8dac8f7d 100644 --- a/Main.py +++ b/Main.py @@ -117,6 +117,17 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No for item_name, count in world.start_inventory_from_pool.setdefault(player, StartInventoryPool({})).value.items(): for _ in range(count): world.push_precollected(world.create_item(item_name, player)) + # remove from_pool items also from early items handling, as starting is plenty early. + early = world.early_items[player].get(item_name, 0) + if early: + world.early_items[player][item_name] = max(0, early-count) + remaining_count = count-early + if remaining_count > 0: + local_early = world.early_local_items[player].get(item_name, 0) + if local_early: + world.early_items[player][item_name] = max(0, local_early - remaining_count) + del local_early + del early logger.info('Creating World.') AutoWorld.call_all(world, "create_regions")