1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Server: delegate mod management & config to ServerModConfiguration (#7131)

* Server: delegate mod management & config to ServerModConfiguration (rename it to ServerModManager)

* Use c++11 range based loops
* Add unittests + experimental/default mod as a test case to permit testing mod loading in future tests
This commit is contained in:
Loïc Blot 2018-03-16 08:41:33 +01:00 committed by GitHub
parent 5e61f64ce2
commit 6c184947c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 359 additions and 74 deletions

View file

@ -322,20 +322,6 @@ void ModConfiguration::resolveDependencies()
m_unsatisfied_mods.assign(unsatisfied.begin(), unsatisfied.end());
}
ServerModConfiguration::ServerModConfiguration(const std::string &worldpath):
ModConfiguration(worldpath)
{
SubgameSpec gamespec = findWorldSubgame(worldpath);
// Add all game mods and all world mods
addModsInPath(gamespec.gamemods_path);
addModsInPath(worldpath + DIR_DELIM + "worldmods");
// Load normal mods
std::string worldmt = worldpath + DIR_DELIM + "world.mt";
addModsFromConfig(worldmt, gamespec.addon_mods_paths);
}
#ifndef SERVER
ClientModConfiguration::ClientModConfiguration(const std::string &path):
ModConfiguration(path)