Core: cleanup Item classes (#849)

This commit is contained in:
black-sliver
2022-08-06 00:49:54 +02:00
committed by GitHub
parent dd6e212519
commit f6da81ac70
12 changed files with 75 additions and 75 deletions

View File

@@ -24,6 +24,7 @@ def ap_id_to_oot_data(ap_id):
class OOTItem(Item):
game: str = "Ocarina of Time"
type: str
def __init__(self, name, player, data, event, force_not_advancement):
(type, advancement, index, special) = data
@@ -38,7 +39,6 @@ class OOTItem(Item):
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
adv = bool(advancement) and not force_not_advancement
super(OOTItem, self).__init__(name, classification, oot_data_to_ap_id(data, event), player)
self.type = type
self.index = index
@@ -46,25 +46,12 @@ class OOTItem(Item):
self.looks_like_item = None
self.price = special.get('price', None) if special else None
self.internal = False
# The playthrough calculation calls a function that uses "sweep_for_events(key_only=True)"
# This checks if the item it's looking for is a small key, using the small key property.
# Because of overlapping item fields, this means that OoT small keys are technically counted, unless we do this.
# This causes them to be double-collected during playthrough and generation.
@property
def smallkey(self) -> bool:
return False
@property
def bigkey(self) -> bool:
return False
@property
def dungeonitem(self) -> bool:
return self.type in ['SmallKey', 'HideoutSmallKey', 'BossKey', 'GanonBossKey', 'Map', 'Compass']
# Progressive: True -> Advancement
# False -> Priority
# None -> Normal