mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Organize builtin into subdirectories
This commit is contained in:
parent
fef2729fd0
commit
1cd512913e
44 changed files with 206 additions and 203 deletions
|
@ -350,14 +350,8 @@ int ModApiServer::l_get_modpath(lua_State *L)
|
|||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
std::string modname = luaL_checkstring(L, 1);
|
||||
// Do it
|
||||
if(modname == "__builtin"){
|
||||
std::string path = getServer(L)->getBuiltinLuaPath();
|
||||
lua_pushstring(L, path.c_str());
|
||||
return 1;
|
||||
}
|
||||
const ModSpec *mod = getServer(L)->getModSpec(modname);
|
||||
if(!mod){
|
||||
if (!mod) {
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue