mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: cleanup Item classes (#849)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user