| 325 | } |
| 326 | |
| 327 | static 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 | |
| 338 | static bool init_enable_script(color_ostream &out, lua_State *state, const std::string_view name, bool enable) |
| 339 | { |
no test coverage detected