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:
parent
5e61f64ce2
commit
6c184947c3
13 changed files with 359 additions and 74 deletions
14
src/mods.cpp
14
src/mods.cpp
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue