summaryrefslogtreecommitdiff
path: root/src/subgame.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-20 01:06:44 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-20 01:07:02 +0200
commit50621ffe851223fb791d4ba47959585154d59d3f (patch)
treeecc29be7eda6b6a1aa6bf0e85fcf8b3c574979db /src/subgame.cpp
parentdb4911f9565cae6d982e5fac2627fe45048fab8f (diff)
downloadminetest-50621ffe851223fb791d4ba47959585154d59d3f.tar.gz
minetest-50621ffe851223fb791d4ba47959585154d59d3f.tar.bz2
minetest-50621ffe851223fb791d4ba47959585154d59d3f.zip
Fix mod paths
Diffstat (limited to 'src/subgame.cpp')
-rw-r--r--src/subgame.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/subgame.cpp b/src/subgame.cpp
index e55f1bc97..3d4480ebf 100644
--- a/src/subgame.cpp
+++ b/src/subgame.cpp
@@ -38,14 +38,16 @@ SubgameSpec findSubgame(const std::string &id)
}
if(!fs::PathExists(game_path))
return SubgameSpec();
- // Find addon directories
- std::set<std::string> addon_paths;
+ // Find mod directories
+ std::set<std::string> mods_paths;
+ mods_paths.insert(game_path + DIR_DELIM + "mods");
if(!user_game)
- addon_paths.insert(share + DIR_DELIM + "addons" + DIR_DELIM + id);
- addon_paths.insert(user + DIR_DELIM + "addons" + DIR_DELIM + id);
+ mods_paths.insert(share + DIR_DELIM + "mods" + DIR_DELIM + id);
+ if(user != share || user_game)
+ mods_paths.insert(user + DIR_DELIM + "mods" + DIR_DELIM + id);
// TODO: Read proper name from game_path/game.conf
std::string game_name = id;
- return SubgameSpec(id, game_path, addon_paths, game_name);
+ return SubgameSpec(id, game_path, mods_paths, game_name);
}
std::set<std::string> getAvailableGameIds()