mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-22 21:51:55 -05:00
Changes filename format to icon indexes separated by dashes
This commit is contained in:
parent
cb0f4ffd97
commit
90cc2fa361
@ -541,8 +541,18 @@ std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t>
|
||||
}
|
||||
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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user