summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-04-27 17:55:49 -0400
committerShadowNinja <shadowninja@minetest.net>2014-05-07 17:14:23 -0400
commit1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528 (patch)
tree8c1e2c708f567656684e89faee4f7c8e6c5ec673 /src/server.cpp
parentfef2729fd0945601e6772780514ee55fec35b068 (diff)
downloadminetest-1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528.tar.gz
minetest-1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528.tar.bz2
minetest-1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528.zip
Organize builtin into subdirectories
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/server.cpp b/src/server.cpp
index ed99a7214..288f254ed 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -294,9 +294,6 @@ Server::Server(
errorstream << std::endl;
}
- // Path to builtin.lua
- std::string builtinpath = getBuiltinLuaPath() + DIR_DELIM + "builtin.lua";
-
// Lock environment
JMutexAutoLock envlock(m_env_mutex);
@@ -305,16 +302,13 @@ Server::Server(
m_script = new GameScripting(this);
+ std::string scriptpath = getBuiltinLuaPath() + DIR_DELIM "init.lua";
- // Load and run builtin.lua
- infostream<<"Server: Loading builtin.lua [\""
- <<builtinpath<<"\"]"<<std::endl;
- bool success = m_script->loadMod(builtinpath, "__builtin");
- if(!success){
- errorstream<<"Server: Failed to load and run "
- <<builtinpath<<std::endl;
- throw ModError("Failed to load and run "+builtinpath);
+ if (!m_script->loadScript(scriptpath)) {
+ throw ModError("Failed to load and run " + scriptpath);
}
+
+
// Print 'em
infostream<<"Server: Loading mods: ";
for(std::vector<ModSpec>::iterator i = m_mods.begin();