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

Method lua_is_enabled

library/PluginManager.cpp:739–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739int Plugin::lua_is_enabled(lua_State *state)
740{
741 auto obj = (Plugin*)lua_touserdata(state, lua_upvalueindex(1));
742
743 RefAutoinc lock(obj->access);
744 if (obj->state == PS_LOADED && obj->plugin_is_enabled)
745 lua_pushboolean(state, obj->is_enabled());
746 else
747 lua_pushnil(state);
748
749 return 1;
750}
751
752int Plugin::lua_set_enabled(lua_State *state)
753{

Callers

nothing calls this directly

Calls 4

lua_touserdataFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_pushnilFunction · 0.85
is_enabledMethod · 0.45

Tested by

no test coverage detected