summary refs log tree commit diff stats
path: root/tools/util
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-01 12:54:46 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-01 12:54:46 -0400
commita3972a65b9b443a6085a6ac40b153442e190f382 (patch)
tree8291258115a066f99c972005557208cb9dbd8899 /tools/util
parentd142ae3408d3e26e12d7dfaa6a7ccbcf56042957 (diff)
downloadlingo2-archipelago-a3972a65b9b443a6085a6ac40b153442e190f382.tar.gz
lingo2-archipelago-a3972a65b9b443a6085a6ac40b153442e190f382.tar.bz2
lingo2-archipelago-a3972a65b9b443a6085a6ac40b153442e190f382.zip
Added progressive doors
Diffstat (limited to 'tools/util')
-rw-r--r--tools/util/ids_yaml_format.cpp12
1 files changed, 12 insertions, 0 deletions
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) {
89 } 89 }
90 } 90 }
91 91
92 if (document["progressives"]) {
93 for (const auto& prog_it : document["progressives"]) {
94 (*result.mutable_progressives())[prog_it.first.as<std::string>()] =
95 prog_it.second.as<uint64_t>();
96 }
97 }
98
92 return result; 99 return result;
93} 100}
94 101
@@ -144,6 +151,11 @@ void WriteIdsAsYaml(const IdMappings& ids, const std::string& filename) {
144 result["special"][special_name] = special_id; 151 result["special"][special_name] = special_id;
145 }); 152 });
146 153
154 OperateOnSortedMap(ids.progressives(),
155 [&result](const std::string& prog_name, uint64_t prog_id) {
156 result["progressives"][prog_name] = prog_id;
157 });
158
147 std::ofstream output_stream(filename); 159 std::ofstream output_stream(filename);
148 output_stream << result << std::endl; 160 output_stream << result << std::endl;
149} 161}