summary refs log tree commit diff stats
path: root/locations.py
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-03-21 10:46:53 -0500
committerGitHub <noreply@github.com>2024-03-21 16:46:53 +0100
commitcb83f8d340ee13746ce2c63c7cd1b247244eb65a (patch)
treef8a25fead6c0089dc78c7335b18518651cc7fad8 /locations.py
parente016228d2b76fa367889c9d98d6eb9e783f98cb4 (diff)
downloadlingo-apworld-cb83f8d340ee13746ce2c63c7cd1b247244eb65a.tar.gz
lingo-apworld-cb83f8d340ee13746ce2c63c7cd1b247244eb65a.tar.bz2
lingo-apworld-cb83f8d340ee13746ce2c63c7cd1b247244eb65a.zip
Lingo: Add item/location groups (#2789)
Diffstat (limited to 'locations.py')
-rw-r--r--locations.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/locations.py b/locations.py index e66ebac..92ee309 100644 --- a/locations.py +++ b/locations.py
@@ -30,10 +30,11 @@ class LingoLocation(Location):
30 30
31 31
32ALL_LOCATION_TABLE: Dict[str, LocationData] = {} 32ALL_LOCATION_TABLE: Dict[str, LocationData] = {}
33LOCATIONS_BY_GROUP: Dict[str, List[str]] = {}
33 34
34 35
35def load_location_data(): 36def load_location_data():
36 global ALL_LOCATION_TABLE 37 global ALL_LOCATION_TABLE, LOCATIONS_BY_GROUP
37 38
38 for room_name, panels in PANELS_BY_ROOM.items(): 39 for room_name, panels in PANELS_BY_ROOM.items():
39 for panel_name, panel in panels.items(): 40 for panel_name, panel in panels.items():
@@ -50,6 +51,9 @@ def load_location_data():
50 LocationData(get_panel_location_id(room_name, panel_name), room_name, 51 LocationData(get_panel_location_id(room_name, panel_name), room_name,
51 [RoomAndPanel(None, panel_name)], classification) 52 [RoomAndPanel(None, panel_name)], classification)
52 53
54 if panel.achievement:
55 LOCATIONS_BY_GROUP.setdefault("Achievements", []).append(location_name)
56
53 for room_name, doors in DOORS_BY_ROOM.items(): 57 for room_name, doors in DOORS_BY_ROOM.items():
54 for door_name, door in doors.items(): 58 for door_name, door in doors.items():
55 if door.skip_location or door.event or door.panels is None: 59 if door.skip_location or door.event or door.panels is None: