Skip to content

Commit

Permalink
Core: remove start_inventory_from_pool from early_items
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 committed Dec 8, 2023
1 parent a9a6c72 commit 641faab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ 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:
early = world.early_local_items[player].get(item_name, 0)
if early:
world.early_items[player][item_name] = max(0, early - remaining_count)

logger.info('Creating World.')
AutoWorld.call_all(world, "create_regions")
Expand Down

0 comments on commit 641faab

Please sign in to comment.