mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
BaseClasses: make ItemClassification properties faster
This commit is contained in:
@@ -1191,19 +1191,19 @@ class Item:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def advancement(self) -> bool:
|
def advancement(self) -> bool:
|
||||||
return bool(self.classification & ItemClassification.progression)
|
return ItemClassification.progression in self.classification
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def skip_in_prog_balancing(self) -> bool:
|
def skip_in_prog_balancing(self) -> bool:
|
||||||
return self.classification == ItemClassification.progression_skip_balancing
|
return ItemClassification.progression_skip_balancing in self.classification
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def useful(self) -> bool:
|
def useful(self) -> bool:
|
||||||
return bool(self.classification & ItemClassification.useful)
|
return ItemClassification.useful in self.classification
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def trap(self) -> bool:
|
def trap(self) -> bool:
|
||||||
return bool(self.classification & ItemClassification.trap)
|
return ItemClassification.trap in self.classification
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def flags(self) -> int:
|
def flags(self) -> int:
|
||||||
|
Reference in New Issue
Block a user