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

Function internal_getCommandDescription

library/LuaApi.cpp:4248–4262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4246}
4247
4248static int internal_getCommandDescription(lua_State *L)
4249{
4250 const PluginCommand *pc = getPluginCommand(luaL_checkstring(L, 1));
4251 if (!pc)
4252 {
4253 lua_pushnil(L);
4254 return 1;
4255 }
4256
4257 string help = pc->description;
4258 if (help.size() && help[help.size()-1] != '.')
4259 help += ".";
4260 lua_pushstring(L, help.c_str());
4261 return 1;
4262}
4263
4264static int internal_threadid(lua_State *L)
4265{

Callers

nothing calls this directly

Calls 5

getPluginCommandFunction · 0.85
lua_pushnilFunction · 0.85
lua_pushstringFunction · 0.85
c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected