diff options
author | Weblate <42@minetest.ru> | 2013-01-24 15:56:49 +0100 |
---|---|---|
committer | Weblate <42@minetest.ru> | 2013-01-24 15:56:49 +0100 |
commit | 13358c29b8a754709c49b0ba997f029af26134bc (patch) | |
tree | 9e7e5efc0f1a97986206fe5e7f0debf5d20e6a28 /src/mods.cpp | |
parent | aaee2786a76dedb52b154223dac813ac02099a91 (diff) | |
parent | 035933f806d3afc45e2e558e505318489209a70b (diff) | |
download | minetest-13358c29b8a754709c49b0ba997f029af26134bc.tar.gz minetest-13358c29b8a754709c49b0ba997f029af26134bc.tar.bz2 minetest-13358c29b8a754709c49b0ba997f029af26134bc.zip |
Merge remote branch 'origin/master'
Diffstat (limited to 'src/mods.cpp')
-rw-r--r-- | src/mods.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mods.cpp b/src/mods.cpp index 9e3c7d5d7..f6e3d58d7 100644 --- a/src/mods.cpp +++ b/src/mods.cpp @@ -46,6 +46,7 @@ std::map<std::string, ModSpec> getModsInPath(std::string path) modpack_is.close(); // We don't actually need the file ModSpec spec(modname,modpath); spec.modpack_content = getModsInPath(modpath); + spec.is_modpack = true; result.insert(std::make_pair(modname,spec)); } else // not a modpack, add the modspec @@ -76,7 +77,7 @@ std::map<std::string, ModSpec> flattenModTree(std::map<std::string, ModSpec> mod it != mods.end(); ++it) { ModSpec mod = (*it).second; - if(!mod.modpack_content.empty()) //is a modpack + if(mod.is_modpack) { std::map<std::string, ModSpec> content = flattenModTree(mod.modpack_content); @@ -98,7 +99,7 @@ std::vector<ModSpec> flattenMods(std::map<std::string, ModSpec> mods) it != mods.end(); ++it) { ModSpec mod = (*it).second; - if(!mod.modpack_content.empty()) //is a modpack + if(mod.is_modpack) { std::vector<ModSpec> content = flattenMods(mod.modpack_content); result.reserve(result.size() + content.size()); |