mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
add separate can_exclude property, so non-progression items can be marked non-excluded
This commit is contained in:
@@ -1104,6 +1104,7 @@ class Item():
|
||||
world: Optional[MultiWorld] = None
|
||||
game: str = "Generic"
|
||||
type: str = None
|
||||
can_be_excluded: bool = True # change manually if you want some non-advancement item to not be excluded
|
||||
pedestal_credit_text: str = "and the Unknown Item"
|
||||
sickkid_credit_text: Optional[str] = None
|
||||
magicshop_credit_text: Optional[str] = None
|
||||
@@ -1117,6 +1118,8 @@ class Item():
|
||||
self.player = player
|
||||
self.code = code
|
||||
|
||||
self.can_be_excluded = not advancement
|
||||
|
||||
@property
|
||||
def hint_text(self):
|
||||
return getattr(self, "_hint_text", self.name.replace("_", " ").replace("-", " "))
|
||||
@@ -1136,6 +1139,10 @@ class Item():
|
||||
def __hash__(self):
|
||||
return hash((self.name, self.player))
|
||||
|
||||
@property
|
||||
def can_exclude(self) -> bool:
|
||||
return not (self.advancement or self.smallkey or self.bigkey) and self.can_be_excluded
|
||||
|
||||
@property
|
||||
def crystal(self) -> bool:
|
||||
return self.type == 'Crystal'
|
||||
|
Reference in New Issue
Block a user