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/util/ids_yaml_format.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools/util') diff --git a/tools/util/ids_yaml_format.cpp b/tools/util/ids_yaml_format.cpp index f72f60e..ae62073 100644 --- a/tools/util/ids_yaml_format.cpp +++ b/tools/util/ids_yaml_format.cpp @@ -89,6 +89,13 @@ IdMappings ReadIdsFromYaml(const std::string& filename) { } } + if (document["progressives"]) { + for (const auto& prog_it : document["progressives"]) { + (*result.mutable_progressives())[prog_it.first.as()] = + prog_it.second.as(); + } + } + return result; } @@ -144,6 +151,11 @@ void WriteIdsAsYaml(const IdMappings& ids, const std::string& filename) { result["special"][special_name] = special_id; }); + OperateOnSortedMap(ids.progressives(), + [&result](const std::string& prog_name, uint64_t prog_id) { + result["progressives"][prog_name] = prog_id; + }); + std::ofstream output_stream(filename); output_stream << result << std::endl; } -- cgit 1.4.1