mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Use virtual paths to specify exact mod to enable (#11784)
This commit is contained in:
parent
8c0331d244
commit
128f6359e9
11 changed files with 223 additions and 80 deletions
|
@ -107,14 +107,13 @@ SubgameSpec findSubgame(const std::string &id)
|
|||
std::string gamemod_path = game_path + DIR_DELIM + "mods";
|
||||
|
||||
// Find mod directories
|
||||
std::set<std::string> mods_paths;
|
||||
if (!user_game)
|
||||
mods_paths.insert(share + DIR_DELIM + "mods");
|
||||
if (user != share || user_game)
|
||||
mods_paths.insert(user + DIR_DELIM + "mods");
|
||||
std::unordered_map<std::string, std::string> mods_paths;
|
||||
mods_paths["mods"] = user + DIR_DELIM + "mods";
|
||||
if (!user_game && user != share)
|
||||
mods_paths["share"] = share + DIR_DELIM + "mods";
|
||||
|
||||
for (const std::string &mod_path : getEnvModPaths()) {
|
||||
mods_paths.insert(mod_path);
|
||||
mods_paths[fs::AbsolutePath(mod_path)] = mod_path;
|
||||
}
|
||||
|
||||
// Get meta
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue