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
+5
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user