diff --git a/soh/soh/Enhancements/randomizer/3drando/menu.cpp b/soh/soh/Enhancements/randomizer/3drando/menu.cpp index f8e0bb398..fe8ce6c99 100644 --- a/soh/soh/Enhancements/randomizer/3drando/menu.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/menu.cpp @@ -541,8 +541,18 @@ std::string GenerateRandomizer(std::unordered_map } Settings::Keysanity.RestoreDelayedOption(); } - - return "./Randomizer/" + Settings::hash + ".json"; + std::ostringstream fileNameStream; + for (int i = 0; i < Settings::hashIconIndexes.size(); i++) { + if (i) { + fileNameStream << '-'; + } + if (Settings::hashIconIndexes[i] < 10) { + fileNameStream << '0'; + } + fileNameStream << std::to_string(Settings::hashIconIndexes[i]); + } + std::string fileName = fileNameStream.str(); + return "./Randomizer/" + fileName + ".json"; } std::string GetInput(const char* hintText) { diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp index f7efe4633..e53164acf 100644 --- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp @@ -728,12 +728,23 @@ const char* SpoilerLog_Write(int language) { } std::string jsonString = jsonData.dump(4); + std::ostringstream fileNameStream; + for (int i = 0; i < Settings::hashIconIndexes.size(); i ++) { + if (i) { + fileNameStream << '-'; + } + if (Settings::hashIconIndexes[i] < 10) { + fileNameStream << '0'; + } + fileNameStream << std::to_string(Settings::hashIconIndexes[i]); + } + std::string fileName = fileNameStream.str(); std::ofstream jsonFile(Ship::Window::GetPathRelativeToAppDirectory( - (std::string("Randomizer/") + std::string(Settings::hash) + std::string(".json")).c_str())); + (std::string("Randomizer/") + fileName + std::string(".json")).c_str())); jsonFile << std::setw(4) << jsonString << std::endl; jsonFile.close(); - return Settings::hash.c_str(); + return fileName.c_str(); } void PlacementLog_Msg(std::string_view msg) {