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

Function internal_listPlugins

library/LuaApi.cpp:4171–4184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4169}
4170
4171static int internal_listPlugins(lua_State *L)
4172{
4173 auto plugins = Core::getInstance().getPluginManager();
4174
4175 int i = 1;
4176 lua_newtable(L);
4177 for (auto it = plugins->begin(); it != plugins->end(); ++it)
4178 {
4179 lua_pushinteger(L, i++);
4180 lua_pushstring(L, it->first.c_str());
4181 lua_settable(L, -3);
4182 }
4183 return 1;
4184}
4185
4186static int internal_listCommands(lua_State *L)
4187{

Callers

nothing calls this directly

Calls 6

lua_pushintegerFunction · 0.85
lua_pushstringFunction · 0.85
lua_settableFunction · 0.85
c_strMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected