| 348 | } |
| 349 | |
| 350 | command_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 | |
| 361 | command_result Core::runCommand(color_ostream& out, const std::string& command) |
| 362 | { |
no test coverage detected