From ed1415f78d7820c44e9a219b578b9fbcdce0cc65 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 13 Jan 2019 16:22:32 +0100 Subject: world.mt: Only accept true/false/nil values (#8055) This patch will make distinguishable mods in modpacks possible in the future `nil` checks are required to provide backwards-compatibility for fresh configured worlds --- src/content/mods.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/content') diff --git a/src/content/mods.cpp b/src/content/mods.cpp index 3cb168e19..676666f78 100644 --- a/src/content/mods.cpp +++ b/src/content/mods.cpp @@ -274,7 +274,8 @@ void ModConfiguration::addModsFromConfig( conf.readConfigFile(settings_path.c_str()); std::vector names = conf.getNames(); for (const std::string &name : names) { - if (name.compare(0, 9, "load_mod_") == 0 && conf.getBool(name)) + if (name.compare(0, 9, "load_mod_") == 0 && conf.get(name) != "false" && + conf.get(name) != "nil") load_mod_names.insert(name.substr(9)); } -- cgit v1.2.3