diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-03-21 10:46:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-21 16:46:53 +0100 |
| commit | cb83f8d340ee13746ce2c63c7cd1b247244eb65a (patch) | |
| tree | f8a25fead6c0089dc78c7335b18518651cc7fad8 /locations.py | |
| parent | e016228d2b76fa367889c9d98d6eb9e783f98cb4 (diff) | |
| download | lingo-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.py | 6 |
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 | ||
| 32 | ALL_LOCATION_TABLE: Dict[str, LocationData] = {} | 32 | ALL_LOCATION_TABLE: Dict[str, LocationData] = {} |
| 33 | LOCATIONS_BY_GROUP: Dict[str, List[str]] = {} | ||
| 33 | 34 | ||
| 34 | 35 | ||
| 35 | def load_location_data(): | 36 | def 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: |
