1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Add/remove/change some log messages for clarity

This commit is contained in:
sfan5 2025-04-07 20:23:13 +02:00
parent a00b9cab36
commit 9d81c02f27
11 changed files with 73 additions and 79 deletions

View file

@ -42,21 +42,25 @@ void ServerModManager::loadMods(ServerScripting &script)
for (const ModSpec &mod : configuration.getMods()) {
infostream << mod.name << " ";
}
infostream << std::endl;
// Load and run "mod" scripts
auto t0 = porting::getTimeMs();
for (const ModSpec &mod : configuration.getMods()) {
mod.checkAndLog();
auto t1 = porting::getTimeMs();
std::string script_path = mod.path + DIR_DELIM + "init.lua";
auto t = porting::getTimeMs();
script.loadMod(script_path, mod.name);
infostream << "Mod \"" << mod.name << "\" loaded after "
<< (porting::getTimeMs() - t) << " ms" << std::endl;
<< (porting::getTimeMs() - t1) << " ms" << std::endl;
}
// Run a callback when mods are loaded
script.on_mods_loaded();
infostream << "All mods loaded after " << (porting::getTimeMs() - t0)
<< " ms" << std::endl;
}
const ModSpec *ServerModManager::getModSpec(const std::string &modname) const