From 4e5a45952a4f40511029de8f9340f59ad6d97c44 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Thu, 6 Jun 2013 23:46:03 +0000 Subject: [PATCH] Remove support for common mods --- src/mods.cpp | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) 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