From 724f8092c4808cdad47316e00949c04ee797acb5 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 19 Aug 2025 20:19:48 -0400 Subject: Store IDs in a yaml file This is much more efficient than the txtpb format, and we only need an interface for it in C++ since the IDs will be packed into the binary proto representation. --- tools/datapacker/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/datapacker/main.cpp') diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index 860d3c0..0beb304 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp @@ -14,6 +14,7 @@ #include "container.h" #include "proto/data.pb.h" #include "proto/human.pb.h" +#include "util/ids_yaml_format.h" namespace com::fourisland::lingo2_archipelago { namespace { @@ -42,7 +43,7 @@ class DataPacker { ProcessConnectionsFile(datadir_path / "connections.txtpb", std::nullopt); ProcessMaps(datadir_path); - ProcessIdsFile(datadir_path / "ids.txtpb"); + ProcessIdsFile(datadir_path / "ids.yaml"); { std::ofstream outputfile(outputpath_); @@ -490,7 +491,7 @@ class DataPacker { } void ProcessIdsFile(std::filesystem::path path) { - auto ids = ReadMessageFromFile(path.string()); + auto ids = ReadIdsFromYaml(path.string()); for (const auto& [map_name, map] : ids.maps()) { for (const auto& [door_name, ap_id] : map.doors()) { -- cgit 1.4.1