Core: Set locality rules after `set_rules` stage. (#2044)

* Core: Set locality rules after `generate_basic`.

* Move locality rules to before `generate_basic`.
This commit is contained in:
Zach Parks 2023-07-28 21:06:43 -05:00 committed by GitHub
parent b684ba4822
commit 672a97c9ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

13
Main.py
View File

@ -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.