Skip to content

Commit

Permalink
Core: add an is_event property to Item to match the one on Location
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysintreble committed May 25, 2024
1 parent 61e8852 commit f3cf593
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BaseClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,10 @@ def trap(self) -> bool:
def flags(self) -> int:
return self.classification.as_flag()

@property
def is_event(self) -> bool:
return self.code is None

def __eq__(self, other: object) -> bool:
if not isinstance(other, Item):
return NotImplemented
Expand Down

0 comments on commit f3cf593

Please sign in to comment.