From 1d275f4ead406ae16f85ac95eb00b65e94e581b3 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Wed, 22 Jul 2026 04:15:39 -0700 Subject: [PATCH] actually save attribute overrides --- src/dusk/randomizer/game/randomizer_context.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/dusk/randomizer/game/randomizer_context.cpp b/src/dusk/randomizer/game/randomizer_context.cpp index 18334b4201..a5d47552eb 100644 --- a/src/dusk/randomizer/game/randomizer_context.cpp +++ b/src/dusk/randomizer/game/randomizer_context.cpp @@ -129,6 +129,10 @@ std::optional RandomizerContext::WriteToFile() { textData << YAML::EndMap; textData << YAML::EndMap; + for (const auto& [key, override] : mAttributeOverrides) { + out["mAttributeOverrides"][key] = ContainerToHexString(override); + } + for (const auto& [key, override] : mEntranceOverrides) { out["mEntranceOverrides"][key] = std::bit_cast(override); } @@ -303,6 +307,15 @@ std::optional RandomizerContext::LoadFromHash(const std::string& ha } } + // Attribute Overrides + for (const auto& attributeNode : in["mAttributeOverrides"]) { + auto key = attributeNode.first.as(); + std::vector overrideVec = HexToBytes(attributeNode.second.as()); + std::array override{}; + std::copy(overrideVec.begin(), overrideVec.end(), override.begin()); + this->mAttributeOverrides[key] = override; + } + // Entrance Overrides for (const auto& entranceNode : in["mEntranceOverrides"]) { auto key = entranceNode.first.as();