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

Method enableLuaScript

library/Core.cpp:350–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350command_result Core::enableLuaScript(color_ostream &out, const std::string_view name, bool enabled)
351{
352 auto init_fn = [name, enabled](color_ostream& out, lua_State* state) -> bool {
353 return init_enable_script(out, state, name, enabled);
354 };
355
356 bool ok = Lua::RunCoreQueryLoop(out, DFHack::Core::getInstance().getLuaState(), init_fn);
357
358 return ok ? CR_OK : CR_FAILURE;
359}
360
361command_result Core::runCommand(color_ostream& out, const std::string& command)
362{

Callers 1

enableMethod · 0.80

Calls 1

init_enable_scriptFunction · 0.85

Tested by

no test coverage detected