Convert several locations to using events

Event locations automatically get Moon Perarl requirements added, and
ensure the other referenced location is listed in the spoiler log's path
section
This commit is contained in:
Kevin Cathcart
2018-03-18 01:36:45 -04:00
parent 3fd2dc662a
commit 3592d12bfd
5 changed files with 32 additions and 17 deletions

View File

@@ -294,8 +294,6 @@ def create_playthrough(world):
old_world.spoiler.paths = {location.name : get_path(state, location.parent_region) for sphere in collection_spheres for location in sphere}
if any(exit == 'Pyramid Fairy' for path in old_world.spoiler.paths.values() for (_, exit) in path):
old_world.spoiler.paths['Big Bomb Shop'] = get_path(state, world.get_region('Big Bomb Shop'))
if any(exit == 'Swamp Palace Moat' for path in old_world.spoiler.paths.values() for (_, exit) in path) or 'Sunken Treasure' in old_world.required_locations:
old_world.spoiler.paths['Dam'] = get_path(state, world.get_region('Dam'))
# we can finally output our playthrough
old_world.spoiler.playthrough = OrderedDict([(str(i + 1), {str(location): str(location.item) for location in sphere}) for i, sphere in enumerate(collection_spheres)])