diff options
Diffstat (limited to 'utils/pickle_static_data.py')
-rw-r--r-- | utils/pickle_static_data.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/utils/pickle_static_data.py b/utils/pickle_static_data.py index cd5c4b4..df82a12 100644 --- a/utils/pickle_static_data.py +++ b/utils/pickle_static_data.py | |||
@@ -111,6 +111,16 @@ def load_static_data(ll1_path, ids_path): | |||
111 | with open(ll1_path, "r") as file: | 111 | with open(ll1_path, "r") as file: |
112 | config = Utils.parse_yaml(file) | 112 | config = Utils.parse_yaml(file) |
113 | 113 | ||
114 | # We have to process all panel doors first so that panels can see what panel doors they're in even if they're | ||
115 | # defined earlier in the file than the panel door. | ||
116 | for room_name, room_data in config.items(): | ||
117 | if "panel_doors" in room_data: | ||
118 | PANEL_DOORS_BY_ROOM[room_name] = dict() | ||
119 | |||
120 | for panel_door_name, panel_door_data in room_data["panel_doors"].items(): | ||
121 | process_panel_door(room_name, panel_door_name, panel_door_data) | ||
122 | |||
123 | # Process the rest of the room. | ||
114 | for room_name, room_data in config.items(): | 124 | for room_name, room_data in config.items(): |
115 | process_room(room_name, room_data) | 125 | process_room(room_name, room_data) |
116 | 126 | ||
@@ -515,12 +525,6 @@ def process_room(room_name, room_data): | |||
515 | for source_room, doors in room_data["entrances"].items(): | 525 | for source_room, doors in room_data["entrances"].items(): |
516 | process_entrance(source_room, doors, room_obj) | 526 | process_entrance(source_room, doors, room_obj) |
517 | 527 | ||
518 | if "panel_doors" in room_data: | ||
519 | PANEL_DOORS_BY_ROOM[room_name] = dict() | ||
520 | |||
521 | for panel_door_name, panel_door_data in room_data["panel_doors"].items(): | ||
522 | process_panel_door(room_name, panel_door_name, panel_door_data) | ||
523 | |||
524 | if "panels" in room_data: | 528 | if "panels" in room_data: |
525 | PANELS_BY_ROOM[room_name] = dict() | 529 | PANELS_BY_ROOM[room_name] = dict() |
526 | 530 | ||