mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -07: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
1 changed files with 3 additions and 1 deletions
|
@ -723,7 +723,9 @@ void SaveManager::SaveFileThreaded(int fileNum, SaveContext* saveContext, const
|
|||
if (std::find(gameSaveRegistry.begin(), gameSaveRegistry.end(), sectionHandler.first) != gameSaveRegistry.end()) {
|
||||
nlohmann::json& sectionBlock = saveBlock["sections"][sectionHandler.first];
|
||||
sectionBlock["version"] = sectionHandler.second.first;
|
||||
sectionBlock["data"] = nlohmann::json::object();
|
||||
if (sectionHandler.first == "randomizer" && !gSaveContext.n64ddFlag) {
|
||||
sectionBlock["data"] = nlohmann::json::object();
|
||||
}
|
||||
|
||||
currentJsonContext = §ionBlock["data"];
|
||||
sectionHandler.second.second(saveContext, "all");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue