Core: Add Item.excludable helper function

Some worlds might want to check for "Item is junk", i.e. an excludable item.

Because this is both `filler` and `trap`, and because `filler` is `0`, there are many "wrong ways" to do this. So I think we should provide a helper function for it.
This commit is contained in:
NewSoupVi
2024-10-22 17:39:37 +02:00
committed by GitHub
parent f709d61d04
commit 68f90571fd

View File

@@ -1264,6 +1264,10 @@ class Item:
def trap(self) -> bool:
return ItemClassification.trap in self.classification
@property
def excludable(self) -> bool:
return not (self.advancement or self.useful)
@property
def flags(self) -> int:
return self.classification.as_flag()