forked from Mirrorlandia_minetest/minetest
Add usermods/ to mod search paths and print out the paths at server startup
This commit is contained in:
parent
6b2023dc3e
commit
c6dd75ccfb
@ -2,6 +2,23 @@
|
|||||||
-- dump2(obj, name="_", dumped={})
|
-- dump2(obj, name="_", dumped={})
|
||||||
-- dump(obj, dumped={})
|
-- dump(obj, dumped={})
|
||||||
--
|
--
|
||||||
|
-- Mod load path
|
||||||
|
-- -------------
|
||||||
|
-- Generic:
|
||||||
|
-- $path_data/mods/
|
||||||
|
-- $path_userdata/usermods/
|
||||||
|
-- $mapdir/worldmods/
|
||||||
|
--
|
||||||
|
-- On a run-in-place version (eg. the distributed windows version):
|
||||||
|
-- minetest-0.4.x/mods/
|
||||||
|
-- minetest-0.4.x/usermods/
|
||||||
|
-- minetest-0.4.x/world/worldmods/
|
||||||
|
--
|
||||||
|
-- On an installed version on linux:
|
||||||
|
-- /usr/share/minetest/mods/
|
||||||
|
-- ~/.minetest/usermods
|
||||||
|
-- ~/.minetest/world/worldmods
|
||||||
|
--
|
||||||
-- Naming convention for registered textual names
|
-- Naming convention for registered textual names
|
||||||
-- ----------------------------------------------
|
-- ----------------------------------------------
|
||||||
-- "modname_<whatever>"
|
-- "modname_<whatever>"
|
||||||
|
@ -875,15 +875,23 @@ Server::Server(
|
|||||||
JMutexAutoLock envlock(m_env_mutex);
|
JMutexAutoLock envlock(m_env_mutex);
|
||||||
JMutexAutoLock conlock(m_con_mutex);
|
JMutexAutoLock conlock(m_con_mutex);
|
||||||
|
|
||||||
infostream<<"m_nodedef="<<m_nodedef<<std::endl;
|
|
||||||
|
|
||||||
// Path to builtin.lua
|
// Path to builtin.lua
|
||||||
std::string builtinpath = porting::path_data + DIR_DELIM + "builtin.lua";
|
std::string builtinpath = porting::path_data + DIR_DELIM + "builtin.lua";
|
||||||
|
|
||||||
// Add default global mod search path
|
// Add default global mod search path
|
||||||
m_modspaths.push_front(porting::path_data + DIR_DELIM + "mods");
|
m_modspaths.push_front(porting::path_data + DIR_DELIM + "mods");
|
||||||
// Add world mod search path
|
// Add world mod search path
|
||||||
m_modspaths.push_front(mapsavedir + DIR_DELIM + "mods");
|
m_modspaths.push_front(mapsavedir + DIR_DELIM + "worldmods");
|
||||||
|
// Add user mod search path
|
||||||
|
m_modspaths.push_front(porting::path_userdata + DIR_DELIM + "usermods");
|
||||||
|
|
||||||
|
// Print out mod search paths
|
||||||
|
infostream<<"Mod search paths:"<<std::endl;
|
||||||
|
for(core::list<std::string>::Iterator i = m_modspaths.begin();
|
||||||
|
i != m_modspaths.end(); i++){
|
||||||
|
std::string modspath = *i;
|
||||||
|
infostream<<" "<<modspath<<std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize scripting
|
// Initialize scripting
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user