oot hotfix (again) (#66)

* fix hint failure on multigame multiworlds with oot
This commit is contained in:
espeon65536 2021-09-04 08:37:10 -04:00 committed by GitHub
parent d739d04380
commit 25bbbdbecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 30 deletions

View File

@ -669,6 +669,7 @@ class OOTWorld(World):
# Gathers hint data for OoT. Loops over all world locations for woth, barren, and major item locations.
def stage_generate_output(world: MultiWorld, output_directory: str):
try:
items_by_region = {player: {} for player in world.get_game_players("Ocarina of Time") if world.worlds[player].hints != 'none'}
if items_by_region:
for player in items_by_region:
@ -683,7 +684,7 @@ class OOTWorld(World):
player = loc.item.player
autoworld = world.worlds[player]
if ((player in items_by_region and (autoworld.is_major_item(loc.item) or loc.item.name in autoworld.item_added_hint_types['item']))
or (loc.player in items_by_region and loc.name in autoworld.added_hint_types['item'])):
or (loc.player in items_by_region and loc.name in world.worlds[loc.player].added_hint_types['item'])):
autoworld.major_item_locations.append(loc)
if loc.game == "Ocarina of Time":
@ -701,6 +702,9 @@ class OOTWorld(World):
for autoworld in world.get_game_worlds("Ocarina of Time"):
autoworld.empty_areas = {region: info for (region, info) in items_by_region[autoworld.player].items() if not info['prog_items']}
except Exception as e:
raise e
finally:
hint_data_available.set()