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

Add minetest.register_lbm() to run code on block load only

This commit is contained in:
est31 2016-02-09 07:08:31 +01:00
parent 88fbe7ca1e
commit d494733839
12 changed files with 493 additions and 25 deletions

View file

@ -344,10 +344,11 @@ Server::Server(
servermap->addEventReceiver(this);
// If file exists, load environment metadata
if(fs::PathExists(m_path_world + DIR_DELIM "env_meta.txt"))
{
infostream<<"Server: Loading environment metadata"<<std::endl;
if (fs::PathExists(m_path_world + DIR_DELIM "env_meta.txt")) {
infostream << "Server: Loading environment metadata" << std::endl;
m_env->loadMeta();
} else {
m_env->loadDefaultMeta();
}
// Add some test ActiveBlockModifiers to environment