From d7028126050bf28c873d6d8b0bb294716b192a2c Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Fri, 15 Mar 2024 20:17:52 -0500 Subject: [PATCH] Core: add Location.is_event property --- BaseClasses.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index 24dc074b63d4..a928f034b7f1 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1075,6 +1075,11 @@ def __hash__(self): def __lt__(self, other: Location): return (self.player, self.name) < (other.player, other.name) + @property + def is_event(self) -> bool: + """Returns True if the address of this location is None, denoting it is an Event Location.""" + return self.address is None + @property def native_item(self) -> bool: """Returns True if the item in this location matches game."""