| 336 | } |
| 337 | |
| 338 | static bool init_enable_script(color_ostream &out, lua_State *state, const std::string_view name, bool enable) |
| 339 | { |
| 340 | if (!lua_checkstack(state, 4)) |
| 341 | return false; |
| 342 | Lua::PushDFHack(state); |
| 343 | lua_getfield(state, -1, "enable_script"); |
| 344 | lua_remove(state, -2); |
| 345 | lua_pushlstring(state, name.data(), name.size()); |
| 346 | lua_pushboolean(state, enable); |
| 347 | return true; |
| 348 | } |
| 349 | |
| 350 | command_result Core::enableLuaScript(color_ostream &out, const std::string_view name, bool enabled) |
| 351 | { |
no test coverage detected