diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-01-13 16:22:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-13 16:22:32 +0100 |
commit | ed1415f78d7820c44e9a219b578b9fbcdce0cc65 (patch) | |
tree | a15d23478bd18df7c9ecf1cf568c2920a6cfe8eb /src/content | |
parent | a51909bb64811694773b6dd3abd791d3d78d85e6 (diff) | |
download | minetest-ed1415f78d7820c44e9a219b578b9fbcdce0cc65.tar.gz minetest-ed1415f78d7820c44e9a219b578b9fbcdce0cc65.tar.bz2 minetest-ed1415f78d7820c44e9a219b578b9fbcdce0cc65.zip |
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
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/mods.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<std::string> 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)); } |