From 8de745f4d3350ac848c9362a33e223c0ff94fdcf Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 9 Sep 2025 16:44:09 -0400 Subject: Added symbol shuffle Also fixed unlocked letters + any double letter cyan doors, and tweaked some logic related to important panels with symbols on them. --- tools/assign_ids/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tools') diff --git a/tools/assign_ids/main.cpp b/tools/assign_ids/main.cpp index ee55338..3e16f78 100644 --- a/tools/assign_ids/main.cpp +++ b/tools/assign_ids/main.cpp @@ -44,6 +44,7 @@ class AssignIds { ProcessSpecialIds(); ProcessProgressivesFile(datadir_path / "progressives.txtpb"); ProcessDoorGroupsFile(datadir_path / "door_groups.txtpb"); + ProcessGlobalMetadataFile(datadir_path / "metadata.txtpb"); WriteIds(ids_path); @@ -288,6 +289,23 @@ class AssignIds { } } + void ProcessGlobalMetadataFile(std::filesystem::path path) { + if (!std::filesystem::exists(path)) { + return; + } + + auto h_metadata = ReadMessageFromFile(path.string()); + auto& specials = *output_.mutable_special(); + + for (const std::string& h_special : h_metadata.special_names()) { + if (!id_mappings_.special().contains(h_special)) { + specials[h_special] = next_id_++; + } else { + specials[h_special] = id_mappings_.special().at(h_special); + } + } + } + private: void UpdateNextId(const google::protobuf::Map& ids) { for (const auto& [_, id] : ids) { -- cgit 1.4.1