BaseClasses: make ItemClassification properties faster

This commit is contained in:
Fabian Dill 2022-07-02 13:27:50 +02:00 committed by Fabian Dill
parent bcd7096e1d
commit b9fb4de878
1 changed files with 4 additions and 4 deletions

View File

@ -1191,19 +1191,19 @@ class Item:
@property
def advancement(self) -> bool:
return bool(self.classification & ItemClassification.progression)
return ItemClassification.progression in self.classification
@property
def skip_in_prog_balancing(self) -> bool:
return self.classification == ItemClassification.progression_skip_balancing
return ItemClassification.progression_skip_balancing in self.classification
@property
def useful(self) -> bool:
return bool(self.classification & ItemClassification.useful)
return ItemClassification.useful in self.classification
@property
def trap(self) -> bool:
return bool(self.classification & ItemClassification.trap)
return ItemClassification.trap in self.classification
@property
def flags(self) -> int: