1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Add console API using dukglue

This commit is contained in:
Ted John
2018-03-17 23:26:55 +00:00
parent f0de6533a0
commit 839dd6842b
3 changed files with 59 additions and 6 deletions

View File

@@ -31,7 +31,8 @@ namespace OpenRCT2::Scripting
private:
InteractiveConsole& _console;
IPlatformEnvironment& _env;
duk_context * _context;
bool _initialised{};
duk_context * _context{};
std::queue<std::tuple<std::promise<void>, std::string>> _evalQueue;
public:
@@ -39,6 +40,7 @@ namespace OpenRCT2::Scripting
ScriptEngine(ScriptEngine&&) = delete;
~ScriptEngine();
void Initialise();
void Update();
std::future<void> Eval(const std::string &s);
};