From 672a97c9aebea93c2a3654945791c069bf5caca7 Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Fri, 28 Jul 2023 21:06:43 -0500 Subject: [PATCH] Core: Set locality rules after `set_rules` stage. (#2044) * Core: Set locality rules after `generate_basic`. * Move locality rules to before `generate_basic`. --- Main.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Main.py b/Main.py index c81466bf..fe56dc7d 100644 --- a/Main.py +++ b/Main.py @@ -133,12 +133,6 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No world.non_local_items[player].value -= world.local_items[player].value world.non_local_items[player].value -= set(world.local_early_items[player]) - if world.players > 1: - locality_rules(world) - else: - world.non_local_items[1].value = set() - world.local_items[1].value = set() - AutoWorld.call_all(world, "set_rules") for player in world.player_ids: @@ -147,6 +141,13 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No for location_name in world.priority_locations[player].value: world.get_location(location_name, player).progress_type = LocationProgressType.PRIORITY + # Set local and non-local item rules. + if world.players > 1: + locality_rules(world) + else: + world.non_local_items[1].value = set() + world.local_items[1].value = set() + AutoWorld.call_all(world, "generate_basic") # remove starting inventory from pool items.