OoT: Fix blind item.type reference (#905)

* oot: remove blind reference to item.type

* oot: logical reasoning is hard

* oot: fix blind item.type reference
This commit is contained in:
espeon65536
2022-08-12 19:36:06 -07:00
committed by GitHub
parent f5e48c850d
commit 645ede869f
2 changed files with 5 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ from urllib.error import URLError, HTTPError
import json
from enum import Enum
from .Items import OOTItem
from .HintList import getHint, getHintGroup, Hint, hintExclusions
from .Messages import COLOR_MAP, update_message_by_id
from .TextBox import line_wrap
@@ -480,7 +481,7 @@ def get_specific_item_hint(world, checked):
def get_random_location_hint(world, checked):
locations = list(filter(lambda location:
is_not_checked(location, checked)
and location.item.type not in ('Drop', 'Event', 'Shop', 'DungeonReward')
and not (isinstance(location.item, OOTItem) and location.item.type in ('Drop', 'Event', 'Shop', 'DungeonReward'))
# and not (location.parent_region.dungeon and isRestrictedDungeonItem(location.parent_region.dungeon, location.item)) # AP already locks dungeon items
and not location.locked
and location.name not in world.hint_exclusions