From 1c7fcd002eb59e8cda09997eb89ecd609aff7275 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 10 Dec 2024 14:36:38 -0500 Subject: Lingo: Fix number hunt issues on panels mode (#4342) --- utils/pickle_static_data.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'utils/pickle_static_data.py') 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): with open(ll1_path, "r") as file: config = Utils.parse_yaml(file) + # We have to process all panel doors first so that panels can see what panel doors they're in even if they're + # defined earlier in the file than the panel door. + for room_name, room_data in config.items(): + if "panel_doors" in room_data: + PANEL_DOORS_BY_ROOM[room_name] = dict() + + for panel_door_name, panel_door_data in room_data["panel_doors"].items(): + process_panel_door(room_name, panel_door_name, panel_door_data) + + # Process the rest of the room. for room_name, room_data in config.items(): process_room(room_name, room_data) @@ -515,12 +525,6 @@ def process_room(room_name, room_data): for source_room, doors in room_data["entrances"].items(): process_entrance(source_room, doors, room_obj) - if "panel_doors" in room_data: - PANEL_DOORS_BY_ROOM[room_name] = dict() - - for panel_door_name, panel_door_data in room_data["panel_doors"].items(): - process_panel_door(room_name, panel_door_name, panel_door_data) - if "panels" in room_data: PANELS_BY_ROOM[room_name] = dict() -- cgit 1.4.1