mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
a51909bb64
commit
ed1415f78d
3 changed files with 8 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue