diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-30 12:00:03 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-30 12:00:03 -0400 |
commit | d2bc5b2811171685e8bdc895122987b53defcf0a (patch) | |
tree | dabf111e8d4ba8caceee46189075968e223e3ee8 /tools/datapacker/main.cpp | |
parent | 3b77044a6a53d38a6960eb2a5855283a00b24d75 (diff) | |
download | lingo2-archipelago-d2bc5b2811171685e8bdc895122987b53defcf0a.tar.gz lingo2-archipelago-d2bc5b2811171685e8bdc895122987b53defcf0a.tar.bz2 lingo2-archipelago-d2bc5b2811171685e8bdc895122987b53defcf0a.zip |
Changed how door location names are formatted
STANDARD type doors with at most four panels in the same map area and no other trigger objects will have their location names generated from the names of the panels used to open the door, similar to Lingo 1. Other door types will use the door's name. In either case, the name can be overridden using the new location_name field. Rooms can also set a panel_display_name field, which will be used in location names for doors, and is used to group panels into areas. Panels themselves can set display names, which differentiates their locations from other panels in the same area. Many maps were updated for this, but note that the_symbolic and the_unyielding have validator failures because of duplicate panel names. This won't matter until panelsanity is implemented.
Diffstat (limited to 'tools/datapacker/main.cpp')
-rw-r--r-- | tools/datapacker/main.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index d820360..cc83ca1 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp | |||
@@ -104,7 +104,11 @@ class DataPacker { | |||
104 | container_.FindOrAddRoom(current_map_name, h_room.name(), std::nullopt); | 104 | container_.FindOrAddRoom(current_map_name, h_room.name(), std::nullopt); |
105 | Room& room = *container_.all_objects().mutable_rooms(room_id); | 105 | Room& room = *container_.all_objects().mutable_rooms(room_id); |
106 | 106 | ||
107 | room.set_display_name(h_room.display_name()); | 107 | //room.set_display_name(h_room.display_name()); |
108 | |||
109 | if (h_room.has_panel_display_name()) { | ||
110 | room.set_panel_display_name(h_room.panel_display_name()); | ||
111 | } | ||
108 | 112 | ||
109 | for (const HumanPanel& h_panel : h_room.panels()) { | 113 | for (const HumanPanel& h_panel : h_room.panels()) { |
110 | room.add_panels(ProcessPanel(h_panel, current_map_name, room.name())); | 114 | room.add_panels(ProcessPanel(h_panel, current_map_name, room.name())); |
@@ -175,6 +179,10 @@ class DataPacker { | |||
175 | map_name, h_panel.required_room().name(), current_map_name)); | 179 | map_name, h_panel.required_room().name(), current_map_name)); |
176 | } | 180 | } |
177 | 181 | ||
182 | if (h_panel.has_display_name()) { | ||
183 | panel.set_display_name(h_panel.display_name()); | ||
184 | } | ||
185 | |||
178 | return panel_id; | 186 | return panel_id; |
179 | } | 187 | } |
180 | 188 | ||
@@ -394,6 +402,10 @@ class DataPacker { | |||
394 | } | 402 | } |
395 | 403 | ||
396 | door.set_type(h_door.type()); | 404 | door.set_type(h_door.type()); |
405 | |||
406 | if (h_door.has_location_name()) { | ||
407 | door.set_location_name(h_door.location_name()); | ||
408 | } | ||
397 | } | 409 | } |
398 | 410 | ||
399 | void ProcessConnectionsFile(std::filesystem::path path, | 411 | void ProcessConnectionsFile(std::filesystem::path path, |