Core: replace Location.event with advancement property (#2871)

This commit is contained in:
Aaron Wagener
2024-04-14 13:37:48 -05:00
committed by GitHub
parent f67e8497e0
commit 842a15fd3c
35 changed files with 79 additions and 144 deletions

View File

@@ -60,13 +60,11 @@ class LinksAwakeningLocation(Location):
def __init__(self, player: int, region, ladxr_item):
name = meta_to_name(ladxr_item.metadata)
self.event = ladxr_item.event is not None
if self.event:
name = ladxr_item.event
address = None
if not self.event:
if ladxr_item.event is not None:
name = ladxr_item.event
else:
address = locations_to_id[name]
super().__init__(player, name, address)
self.parent_region = region

View File

@@ -154,7 +154,7 @@ class LinksAwakeningWorld(World):
# Place RAFT, other access events
for region in regions:
for loc in region.locations:
if loc.event:
if loc.address is None:
loc.place_locked_item(self.create_event(loc.ladxr_item.event))
# Connect Windfish -> Victory