From cb83f8d340ee13746ce2c63c7cd1b247244eb65a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 21 Mar 2024 10:46:53 -0500 Subject: Lingo: Add item/location groups (#2789) --- locations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'locations.py') 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): ALL_LOCATION_TABLE: Dict[str, LocationData] = {} +LOCATIONS_BY_GROUP: Dict[str, List[str]] = {} def load_location_data(): - global ALL_LOCATION_TABLE + global ALL_LOCATION_TABLE, LOCATIONS_BY_GROUP for room_name, panels in PANELS_BY_ROOM.items(): for panel_name, panel in panels.items(): @@ -50,6 +51,9 @@ def load_location_data(): LocationData(get_panel_location_id(room_name, panel_name), room_name, [RoomAndPanel(None, panel_name)], classification) + if panel.achievement: + LOCATIONS_BY_GROUP.setdefault("Achievements", []).append(location_name) + for room_name, doors in DOORS_BY_ROOM.items(): for door_name, door in doors.items(): if door.skip_location or door.event or door.panels is None: -- cgit 1.4.1