Skip to content

Commit

Permalink
Core: Set locality rules after set_rules stage. (ArchipelagoMW#2044)
Browse files Browse the repository at this point in the history
* Core: Set locality rules after `generate_basic`.

* Move locality rules to before `generate_basic`.
  • Loading branch information
ThePhar authored and kl3cks7r committed Aug 11, 2023
1 parent c479d23 commit 5ca55e3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down

0 comments on commit 5ca55e3

Please sign in to comment.