Working on state for location
This commit is contained in:
1 parent
e0968b5522
commit
b01e970554
13 files changed
+494
-101
No files matched your search
@@ -3,6 +3,7 @@
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include "quest/QuestJournal.h"
|
||||
#include "external/nlohmann/json.hpp"
|
||||
|
||||
namespace ZL {
|
||||
|
||||
@@ -51,6 +52,14 @@ public:
|
||||
void callChatOpenCallback(int chatIndex);
|
||||
void callCallTaxiCallback();
|
||||
|
||||
// Serialise all Lua global scalars (numbers, strings, booleans) to JSON.
|
||||
// Complex types (functions, tables, userdata) are skipped — they are recreated
|
||||
// by re-running the script on load.
|
||||
void saveScriptGlobals(nlohmann::json& out) const;
|
||||
// Restore previously saved scalar globals. Call after init() so the script
|
||||
// has already run and registered all callbacks.
|
||||
void loadScriptGlobals(const nlohmann::json& in);
|
||||
|
||||
private:
|
||||
struct Impl;
|
||||
std::unique_ptr<Impl> impl;
|
||||
|
||||
Reference in new issue
Block a user