Fix another item.type crash bug. (#927)

* Fix another item.type crash bug.

* Another location that can crash, in the instance of plando fixed.
This commit is contained in:
CaitSith2
2022-08-17 07:16:14 -07:00
committed by GitHub
parent 431a9b7023
commit 6602c580f4
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import random
from BaseClasses import LocationProgressType
from .Items import OOTItem
# Abbreviations
# DMC Death Mountain Crater
@@ -1260,7 +1261,7 @@ def hintExclusions(world, clear_cache=False):
world.hint_exclusions = []
for location in world.get_locations():
if (location.locked and (location.item.type != 'Song' or world.shuffle_song_items != 'song')) or location.progress_type == LocationProgressType.EXCLUDED:
if (location.locked and ((isinstance(location.item, OOTItem) and location.item.type != 'Song') or world.shuffle_song_items != 'song')) or location.progress_type == LocationProgressType.EXCLUDED:
world.hint_exclusions.append(location.name)
world_location_names = [