Core: add Location.is_event property (#2968)

This commit is contained in:
Aaron Wagener 2024-04-11 17:49:22 -05:00 committed by GitHub
parent 8d28c34f95
commit 5dcafac861
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1075,6 +1075,11 @@ class Location:
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."""