Compare commits

...

1 Commits

Author SHA1 Message Date
NewSoupVi
68f90571fd 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.
2024-10-22 17:39:37 +02:00

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()