BaseClasses: make ItemClassification properties faster
This commit is contained in:
parent
bcd7096e1d
commit
b9fb4de878
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue