diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-04-01 10:08:52 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-04-01 12:38:14 +0300 |
commit | 56ba193c77109687b9115be0ccb1730922caef65 (patch) | |
tree | 02532fd24d82c80c61c2e5fc689656c4b5cca9b9 /src/server.cpp | |
parent | d5594e431c841bf6a4c97bac946ef188404df129 (diff) | |
download | minetest-56ba193c77109687b9115be0ccb1730922caef65.tar.gz minetest-56ba193c77109687b9115be0ccb1730922caef65.tar.bz2 minetest-56ba193c77109687b9115be0ccb1730922caef65.zip |
Allow getting the path of builtin.lua using minetest.get_modpath("__builtin")
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp index b015e103e..c06fcb0fd 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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) { |