From 5c162bd7ce615b79fc2d83a637dc5f7955946479 Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Sat, 5 Apr 2025 09:07:06 -0700 Subject: [PATCH] Core: add an is_event property to Item to match the one on Location (#3401) --- BaseClasses.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index 781fef0e..4db39179 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1416,6 +1416,10 @@ class Item: 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