summaryrefslogtreecommitdiff
path: root/src/mods.h
diff options
context:
space:
mode:
authorJürgen Doser <jurgen.doser@gmail.com>2013-01-22 17:06:25 +0100
committerJürgen Doser <jurgen.doser@gmail.com>2013-01-22 19:05:28 +0100
commit26a0efae2359334eb418f91bf85c0eae9db45646 (patch)
treefb9d2b3a3a0ad6ba6ed2d0edb468a1cb3d876e3f /src/mods.h
parente237c1d07d4a257329ba4db1631f40054510d445 (diff)
downloadminetest-26a0efae2359334eb418f91bf85c0eae9db45646.tar.gz
minetest-26a0efae2359334eb418f91bf85c0eae9db45646.tar.bz2
minetest-26a0efae2359334eb418f91bf85c0eae9db45646.zip
Improve behaviour for empty modpacks and when no mods at all are installed:
Only show enable all / disable all buttons for all add-ons when at least one add-on is installed. When no add-on ist installed, don't show any buttons or checkboxes. Added is_modpack flag to ModSpec to distinguish empty modpacks from normal mods and check this flag in mod selection gui so that empty modpacks are not treated like mods that can be enabled or disabled.
Diffstat (limited to 'src/mods.h')
-rw-r--r--src/mods.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mods.h b/src/mods.h
index 37e2cd2db..59dffdade 100644
--- a/src/mods.h
+++ b/src/mods.h
@@ -53,6 +53,8 @@ struct ModSpec
//if normal mod:
std::set<std::string> depends;
std::set<std::string> unsatisfied_depends;
+
+ bool is_modpack;
// if modpack:
std::map<std::string,ModSpec> modpack_content;
ModSpec(const std::string name_="", const std::string path_="",
@@ -61,6 +63,7 @@ struct ModSpec
path(path_),
depends(depends_),
unsatisfied_depends(depends_),
+ is_modpack(false),
modpack_content()
{}
};