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

Function internal_getScriptPaths

library/LuaApi.cpp:4145–4158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4143}
4144
4145static int internal_getScriptPaths(lua_State *L)
4146{
4147 int i = 1;
4148 lua_newtable(L);
4149 vector<std::filesystem::path> paths;
4150 Core::getInstance().getScriptPaths(&paths);
4151 for (auto it = paths.begin(); it != paths.end(); ++it)
4152 {
4153 lua_pushinteger(L, i++);
4154 lua_pushstring(L, it->string().c_str());
4155 lua_settable(L, -3);
4156 }
4157 return 1;
4158}
4159
4160static int internal_findScript(lua_State *L)
4161{

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected