diff options
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 | } |