MCPcopy Create free account
hub / github.com/DFHack/dfhack / runLuaScript

Function runLuaScript

library/Core.cpp:327–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327static command_result runLuaScript(color_ostream &out, const std::string_view name, const std::span<const std::string> args)
328{
329 auto init_fn = [name, args](color_ostream& out, lua_State* state) -> bool {
330 return init_run_script(out, state, name, args);
331 };
332
333 bool ok = Lua::RunCoreQueryLoop(out, DFHack::Core::getInstance().getLuaState(true), init_fn);
334
335 return ok ? CR_OK : CR_FAILURE;
336}
337
338static bool init_enable_script(color_ostream &out, lua_State *state, const std::string_view name, bool enable)
339{

Callers 1

runCommandMethod · 0.85

Calls 1

init_run_scriptFunction · 0.85

Tested by

no test coverage detected