From a3972a65b9b443a6085a6ac40b153442e190f382 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 1 Sep 2025 12:54:46 -0400 Subject: Added progressive doors --- tools/datapacker/container.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tools/datapacker/container.cpp') diff --git a/tools/datapacker/container.cpp b/tools/datapacker/container.cpp index 2c68552..624caf8 100644 --- a/tools/datapacker/container.cpp +++ b/tools/datapacker/container.cpp @@ -331,6 +331,23 @@ uint64_t Container::FindOrAddDoor(std::optional map_name, } } +uint64_t Container::FindOrAddProgressive(std::string prog_name) { + auto it = progressive_id_by_name_.find(prog_name); + + if (it == progressive_id_by_name_.end()) { + uint64_t new_id = all_objects_.progressives_size(); + Progressive* progressive = all_objects_.add_progressives(); + progressive->set_id(new_id); + progressive->set_name(prog_name); + + progressive_id_by_name_[prog_name] = new_id; + + return new_id; + } else { + return it->second; + } +} + void Container::AddConnection(const Connection& connection) { *all_objects_.add_connections() = connection; } -- cgit 1.4.1