mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
Added sanity check to clearing sectionBlock["data"]
to only be for randomizer and only when the save file is not randomizer (to clear the existing structure from the loaded spoiler log).
This commit is contained in:
parent
550c10b1c3
commit
e2177d7392
@ -723,7 +723,9 @@ void SaveManager::SaveFileThreaded(int fileNum, SaveContext* saveContext, const
|
|||||||
if (std::find(gameSaveRegistry.begin(), gameSaveRegistry.end(), sectionHandler.first) != gameSaveRegistry.end()) {
|
if (std::find(gameSaveRegistry.begin(), gameSaveRegistry.end(), sectionHandler.first) != gameSaveRegistry.end()) {
|
||||||
nlohmann::json& sectionBlock = saveBlock["sections"][sectionHandler.first];
|
nlohmann::json& sectionBlock = saveBlock["sections"][sectionHandler.first];
|
||||||
sectionBlock["version"] = sectionHandler.second.first;
|
sectionBlock["version"] = sectionHandler.second.first;
|
||||||
|
if (sectionHandler.first == "randomizer" && !gSaveContext.n64ddFlag) {
|
||||||
sectionBlock["data"] = nlohmann::json::object();
|
sectionBlock["data"] = nlohmann::json::object();
|
||||||
|
}
|
||||||
|
|
||||||
currentJsonContext = §ionBlock["data"];
|
currentJsonContext = §ionBlock["data"];
|
||||||
sectionHandler.second.second(saveContext, "all");
|
sectionHandler.second.second(saveContext, "all");
|
||||||
|
Loading…
Reference in New Issue
Block a user