Working on save-load system and UI
This commit is contained in:
1 parent
901142385d
commit
d7db0faea3
29 files changed
+708
-180
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user