diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-07 15:42:00 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-07 15:42:00 -0400 |
commit | d79984b099c3f762b95d3b4257bef113d3a8d6ee (patch) | |
tree | bcb647c4734b9ddecb465f818e06efc899482f4e /tools/datapacker/container.cpp | |
parent | 8ab6132f99e9a033c170310b2d88a7312e46a153 (diff) | |
download | lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.tar.gz lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.tar.bz2 lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.zip |
Added door groups
Diffstat (limited to 'tools/datapacker/container.cpp')
-rw-r--r-- | tools/datapacker/container.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/datapacker/container.cpp b/tools/datapacker/container.cpp index 624caf8..4a656b3 100644 --- a/tools/datapacker/container.cpp +++ b/tools/datapacker/container.cpp | |||
@@ -348,6 +348,23 @@ uint64_t Container::FindOrAddProgressive(std::string prog_name) { | |||
348 | } | 348 | } |
349 | } | 349 | } |
350 | 350 | ||
351 | uint64_t Container::FindOrAddDoorGroup(std::string group_name) { | ||
352 | auto it = door_group_id_by_name_.find(group_name); | ||
353 | |||
354 | if (it == door_group_id_by_name_.end()) { | ||
355 | uint64_t new_id = all_objects_.door_groups_size(); | ||
356 | DoorGroup* door_group = all_objects_.add_door_groups(); | ||
357 | door_group->set_id(new_id); | ||
358 | door_group->set_name(group_name); | ||
359 | |||
360 | door_group_id_by_name_[group_name] = new_id; | ||
361 | |||
362 | return new_id; | ||
363 | } else { | ||
364 | return it->second; | ||
365 | } | ||
366 | } | ||
367 | |||
351 | void Container::AddConnection(const Connection& connection) { | 368 | void Container::AddConnection(const Connection& connection) { |
352 | *all_objects_.add_connections() = connection; | 369 | *all_objects_.add_connections() = connection; |
353 | } | 370 | } |