Set location's parent_region when moving it.

Fix copy_world to handle moved locations
This commit is contained in:
compiling
2020-11-08 12:33:31 +11:00
parent af488e653e
commit bdddd3c0de
2 changed files with 4 additions and 0 deletions

View File

@@ -314,6 +314,7 @@ def shuffle_pots(world, player):
key = next(location for location in world.get_region(old_pot.room, player).locations if location.name in key_drop_data)
world.get_region(old_pot.room, player).locations.remove(key)
world.get_region(new_pot.room, player).locations.append(key)
key.parent_region = world.get_region(new_pot.room, player)
elif new_pot.item == PotItem.Switch and (new_pot.flags & PotFlags.SwitchLogicChange):
if new_pot.room == 'PoD Basement Ledge':
basement = world.get_region(old_pot.room, player)