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

+6 -1
View File
@@ -2,6 +2,8 @@
#include "items/Item.h"
#include "quest/QuestJournal.h"
#include "Location.h"
#include "ISaveable.h"
#include "external/nlohmann/json.hpp"
#include <unordered_map>
#include <string>
#include <memory>
@@ -32,7 +34,7 @@ struct StoredChatMessage {
bool incoming;
};
struct GameState {
struct GameState : public ISaveable {
// --- World ---
std::unordered_map<std::string, std::shared_ptr<Location>> locations;
std::string currentLocationName;
@@ -66,6 +68,9 @@ struct GameState {
bool chatUnread[3] = { true, true, true };
std::string chatPreviewMsg[3];
std::vector<StoredChatMessage> chatHistory[3];
void save(nlohmann::json& out) const override;
void load(const nlohmann::json& in) override;
};
} // namespace ZL