Spoiler: fix built-in variable name shadowing

This commit is contained in:
Fabian Dill 2021-08-11 12:45:03 +02:00
parent 3f6a9e5dc7
commit 8c7404edf9
1 changed files with 5 additions and 9 deletions

14
Main.py
View File

@ -517,17 +517,13 @@ def create_playthrough(world):
sphere if location.player == player}) sphere if location.player == player})
if player in world.get_game_players("A Link to the Past"): if player in world.get_game_players("A Link to the Past"):
for path in dict(world.spoiler.paths).values(): for path in dict(world.spoiler.paths).values():
if any(exit == 'Pyramid Fairy' for (_, exit) in path): if any(exit_path == 'Pyramid Fairy' for (_, exit_path) in path):
if world.mode[player] != 'inverted': if world.mode[player] != 'inverted':
world.spoiler.paths[str(world.get_region('Big Bomb Shop', player))] = get_path(state, world.spoiler.paths[str(world.get_region('Big Bomb Shop', player))] = \
world.get_region( get_path(state,world.get_region('Big Bomb Shop', player))
'Big Bomb Shop',
player))
else: else:
world.spoiler.paths[str(world.get_region('Inverted Big Bomb Shop', player))] = get_path(state, world.spoiler.paths[str(world.get_region('Inverted Big Bomb Shop', player))] = \
world.get_region( get_path(state,world.get_region('Inverted Big Bomb Shop', player))
'Inverted Big Bomb Shop',
player))
# we can finally output our playthrough # we can finally output our playthrough
world.spoiler.playthrough = {"0": sorted([str(item) for item in world.precollected_items if item.advancement])} world.spoiler.playthrough = {"0": sorted([str(item) for item in world.precollected_items if item.advancement])}