1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 00:04:43 +01:00

Fix #11494: Old console commands don't work at headless console since plugin system (#11508)

This commit is contained in:
Ted John
2020-04-27 22:02:38 +01:00
committed by GitHub
parent 06bbf5ddda
commit 2c731273c1
2 changed files with 16 additions and 0 deletions

View File

@@ -51,10 +51,16 @@ namespace OpenRCT2::Scripting
return 0;
}
void executeLegacy(const std::string& command)
{
_console.Execute(command);
}
static void Register(duk_context* ctx)
{
dukglue_register_method(ctx, &ScConsole::clear, "clear");
dukglue_register_method_varargs(ctx, &ScConsole::log, "log");
dukglue_register_method(ctx, &ScConsole::executeLegacy, "executeLegacy");
}
};
} // namespace OpenRCT2::Scripting