Core: recache all locations before locality rules

Some worlds would not trigger a recache, causing locations to be missed when setting locality rules.
This commit is contained in:
espeon65536 2023-01-23 23:11:07 -06:00 committed by Fabian Dill
parent 920240cb6f
commit 86fb450ecc
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
logger.info('Creating Items.')
AutoWorld.call_all(world, "create_items")
# All worlds should have finished creating all regions, locations, and entrances.
# Recache to ensure that they are all visible for locality rules.
world._recache()
logger.info('Calculating Access Rules.')
for player in world.player_ids: