Core: Add Item.excludable helper function (#4080)
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:
		
							parent
							
								
									345d5154a9
								
							
						
					
					
						commit
						a29205b547
					
				| 
						 | 
				
			
			@ -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()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue