working on campaign

This commit is contained in:
Vladislav Khorev committed 2026-10-23 22:47:55 +06:00
1 parent 9fa120d4ad
commit d38a75ea72
24 files changed
+929 -410

No files matched your search

+3
View File
@@ -36,6 +36,7 @@ void GameState::save(nlohmann::json& out) const
out["savedAt"] = ts.str();
// --- World ---
out["campaignId"] = campaignId;
out["currentLocationName"] = currentLocationName;
out["isDarklands"] = isDarklands;
out["isNight"] = isNight;
@@ -104,6 +105,8 @@ void GameState::load(const nlohmann::json& in)
//logger() << "GameState::load step 1" << std::endl;
// --- World ---
// Literal default: saves made before campaigns existed belong to the main game.
campaignId = in.value("campaignId", std::string("main"));
currentLocationName = in.value("currentLocationName", currentLocationName);
isDarklands = in.value("isDarklands", isDarklands);
isNight = in.value("isNight", isNight);