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

Function internal_findScript

library/LuaApi.cpp:4160–4169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4158}
4159
4160static int internal_findScript(lua_State *L)
4161{
4162 const char *name = luaL_checkstring(L, 1);
4163 std::filesystem::path path = Core::getInstance().findScript(name);
4164 if (!path.empty())
4165 lua_pushstring(L, Filesystem::as_string(path).c_str());
4166 else
4167 lua_pushnil(L);
4168 return 1;
4169}
4170
4171static int internal_listPlugins(lua_State *L)
4172{

Callers

nothing calls this directly

Calls 6

lua_pushstringFunction · 0.85
as_stringFunction · 0.85
lua_pushnilFunction · 0.85
findScriptMethod · 0.80
c_strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected