From: PilzAdam Date: Thu, 6 Jun 2013 23:46:03 +0000 (+0000) Subject: Remove support for common mods X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=4e5a45952a4f40511029de8f9340f59ad6d97c44;p=zefram%2Fminetest%2Fminetest_engine.git Remove support for common mods --- diff --git a/src/mods.cpp b/src/mods.cpp index 75c2dd89..bcdda01e 100644 --- a/src/mods.cpp +++ b/src/mods.cpp @@ -114,26 +114,6 @@ std::map getModsInPath(std::string path, bool part_of_modp return result; } -ModSpec findCommonMod(const std::string &modname) -{ - // Try to find in {$user,$share}/games/common/$modname - std::vector find_paths; - find_paths.push_back(porting::path_user + DIR_DELIM + "games" + - DIR_DELIM + "common" + DIR_DELIM + "mods" + DIR_DELIM + modname); - find_paths.push_back(porting::path_share + DIR_DELIM + "games" + - DIR_DELIM + "common" + DIR_DELIM + "mods" + DIR_DELIM + modname); - for(u32 i=0; i flattenModTree(std::map mods) { std::map result; @@ -182,36 +162,6 @@ ModConfiguration::ModConfiguration(std::string worldpath) { SubgameSpec gamespec = findWorldSubgame(worldpath); - // Add common mods - std::map common_mods; - std::vector inexistent_common_mods; - Settings gameconf; - if(getGameConfig(gamespec.path, gameconf)){ - if(gameconf.exists("common_mods")){ - Strfnd f(gameconf.get("common_mods")); - while(!f.atend()){ - std::string modname = trim(f.next(",")); - if(modname.empty()) - continue; - ModSpec spec = findCommonMod(modname); - if(spec.name.empty()) - inexistent_common_mods.push_back(modname); - else - common_mods.insert(std::make_pair(modname, spec)); - } - } - } - if(!inexistent_common_mods.empty()){ - std::string s = "Required common mods "; - for(u32 i=0; i