diff options
Diffstat (limited to 'locations.py')
-rw-r--r-- | locations.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/locations.py b/locations.py index 5903d60..e66ebac 100644 --- a/locations.py +++ b/locations.py | |||
@@ -2,7 +2,8 @@ from enum import Flag, auto | |||
2 | from typing import Dict, List, NamedTuple | 2 | from typing import Dict, List, NamedTuple |
3 | 3 | ||
4 | from BaseClasses import Location | 4 | from BaseClasses import Location |
5 | from .static_logic import DOORS_BY_ROOM, PANELS_BY_ROOM, RoomAndPanel, get_door_location_id, get_panel_location_id | 5 | from .datatypes import RoomAndPanel |
6 | from .static_logic import DOORS_BY_ROOM, PANELS_BY_ROOM, get_door_location_id, get_panel_location_id | ||
6 | 7 | ||
7 | 8 | ||
8 | class LocationClassification(Flag): | 9 | class LocationClassification(Flag): |
@@ -20,14 +21,6 @@ class LocationData(NamedTuple): | |||
20 | panels: List[RoomAndPanel] | 21 | panels: List[RoomAndPanel] |
21 | classification: LocationClassification | 22 | classification: LocationClassification |
22 | 23 | ||
23 | def panel_ids(self): | ||
24 | ids = set() | ||
25 | for panel in self.panels: | ||
26 | effective_room = self.room if panel.room is None else panel.room | ||
27 | panel_data = PANELS_BY_ROOM[effective_room][panel.panel] | ||
28 | ids = ids | set(panel_data.internal_ids) | ||
29 | return ids | ||
30 | |||
31 | 24 | ||
32 | class LingoLocation(Location): | 25 | class LingoLocation(Location): |
33 | """ | 26 | """ |