1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Organize builtin into subdirectories

This commit is contained in:
ShadowNinja 2014-04-27 17:55:49 -04:00
parent fef2729fd0
commit 1cd512913e
44 changed files with 206 additions and 203 deletions

View file

@ -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();