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 @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: