Fix edge-case where manually set gameid isn't used

This commit is contained in:
sfan5
2025-04-08 12:15:16 +02:00
parent 9d81c02f27
commit 124d770823
4 changed files with 20 additions and 22 deletions

View File

@@ -15,15 +15,8 @@
* All new calls to this class must be tested in test_servermodmanager.cpp
*/
/**
* Creates a ServerModManager which targets worldpath
* @param worldpath
*/
ServerModManager::ServerModManager(const std::string &worldpath):
configuration()
ServerModManager::ServerModManager(const std::string &worldpath, SubgameSpec gamespec)
{
SubgameSpec gamespec = findWorldSubgame(worldpath);
// Add all game mods and all world mods
configuration.addGameMods(gamespec);
configuration.addModsInPath(worldpath + DIR_DELIM + "worldmods", "worldmods");