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

+5 -1
View File
@@ -4,13 +4,14 @@
#include <unordered_map>
#include "quest/QuestJournal.h"
#include "external/nlohmann/json.hpp"
#include "ISaveable.h"
namespace ZL {
class Location;
class Inventory;
class ScriptEngine {
class ScriptEngine : public ISaveable {
public:
ScriptEngine();
~ScriptEngine();
@@ -60,6 +61,9 @@ public:
// has already run and registered all callbacks.
void loadScriptGlobals(const nlohmann::json& in);
void save(nlohmann::json& out) const override { saveScriptGlobals(out); }
void load(const nlohmann::json& in) override { loadScriptGlobals(in); }
private:
struct Impl;
std::unique_ptr<Impl> impl;