1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 17:35:37 +02:00

Use virtual paths to specify exact mod to enable (#11784)

This commit is contained in:
rubenwardy
2022-01-30 22:40:53 +00:00
committed by GitHub
parent 8c0331d244
commit 128f6359e9
11 changed files with 223 additions and 80 deletions

View File

@@ -41,8 +41,10 @@ ServerModManager::ServerModManager(const std::string &worldpath) :
SubgameSpec gamespec = findWorldSubgame(worldpath);
// Add all game mods and all world mods
addModsInPath(gamespec.gamemods_path);
addModsInPath(worldpath + DIR_DELIM + "worldmods");
std::string game_virtual_path;
game_virtual_path.append("games/").append(gamespec.id).append("/mods");
addModsInPath(gamespec.gamemods_path, game_virtual_path);
addModsInPath(worldpath + DIR_DELIM + "worldmods", "worldmods");
// Load normal mods
std::string worldmt = worldpath + DIR_DELIM + "world.mt";