Working on save-load system and UI

This commit is contained in:
Vladislav Khorev committed 2026-06-20 21:41:07 +03:00
1 parent 901142385d
commit d7db0faea3
29 files changed
+708 -180

No files matched your search

-11
View File
@@ -18,10 +18,6 @@ void LocationState::save(nlohmann::json& out) const
out["isDawn"] = isDawn;
out["tutorialInteractiveObjectsLocked"] = tutorialInteractiveObjectsLocked;
nlohmann::json tzArr = nlohmann::json::array();
for (bool v : triggerZonePlayerInside) tzArr.push_back(v);
out["triggerZonePlayerInside"] = std::move(tzArr);
}
void LocationState::load(const nlohmann::json& in)
@@ -40,13 +36,6 @@ void LocationState::load(const nlohmann::json& in)
isDawn = in.value("isDawn", false);
tutorialInteractiveObjectsLocked = in.value("tutorialInteractiveObjectsLocked", false);
triggerZonePlayerInside.clear();
if (in.contains("triggerZonePlayerInside") && in["triggerZonePlayerInside"].is_array()) {
for (const auto& v : in["triggerZonePlayerInside"]) {
triggerZonePlayerInside.push_back(v.get<bool>());
}
}
}
} // namespace ZL