mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Allow getting the path of builtin.lua using minetest.get_modpath("__builtin")
This commit is contained in:
parent
d5594e431c
commit
56ba193c77
3 changed files with 12 additions and 3 deletions
|
@ -964,8 +964,7 @@ Server::Server(
|
|||
}
|
||||
|
||||
// Path to builtin.lua
|
||||
std::string builtinpath = porting::path_share + DIR_DELIM + "builtin"
|
||||
+ DIR_DELIM + "builtin.lua";
|
||||
std::string builtinpath = getBuiltinLuaPath() + DIR_DELIM + "builtin.lua";
|
||||
|
||||
// Create world if it doesn't exist
|
||||
if(!initializeWorld(m_path_world, m_gamespec.id))
|
||||
|
@ -4410,6 +4409,10 @@ const ModSpec* Server::getModSpec(const std::string &modname)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
std::string Server::getBuiltinLuaPath()
|
||||
{
|
||||
return porting::path_share + DIR_DELIM + "builtin";
|
||||
}
|
||||
|
||||
v3f findSpawnPos(ServerMap &map)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue