mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Don't save load_mod_* = false
lines in world.mt
(#15758)
This commit is contained in:
@@ -299,7 +299,7 @@ local function handle_buttons(this, fields)
|
|||||||
worldfile:set("load_mod_" .. mod.name, mod.virtual_path)
|
worldfile:set("load_mod_" .. mod.name, mod.virtual_path)
|
||||||
was_set[mod.name] = true
|
was_set[mod.name] = true
|
||||||
elseif not was_set[mod.name] then
|
elseif not was_set[mod.name] then
|
||||||
worldfile:set("load_mod_" .. mod.name, "false")
|
worldfile:remove("load_mod_" .. mod.name)
|
||||||
end
|
end
|
||||||
elseif mod.enabled then
|
elseif mod.enabled then
|
||||||
gamedata.errormessage = fgettext_ne("Failed to enable mo" ..
|
gamedata.errormessage = fgettext_ne("Failed to enable mo" ..
|
||||||
|
@@ -140,8 +140,6 @@ void ModConfiguration::addModsFromConfig(
|
|||||||
*
|
*
|
||||||
* Alternative candidates for a modname are stored in `candidates`,
|
* Alternative candidates for a modname are stored in `candidates`,
|
||||||
* and used in an error message later.
|
* and used in an error message later.
|
||||||
*
|
|
||||||
* If not enabled, add `load_mod_modname = false` to world.mt
|
|
||||||
*/
|
*/
|
||||||
for (const auto &modPath : modPaths) {
|
for (const auto &modPath : modPaths) {
|
||||||
std::vector<ModSpec> addon_mods_in_path = flattenMods(getModsInPath(modPath.second, modPath.first));
|
std::vector<ModSpec> addon_mods_in_path = flattenMods(getModsInPath(modPath.second, modPath.first));
|
||||||
@@ -154,7 +152,7 @@ void ModConfiguration::addModsFromConfig(
|
|||||||
candidates[pair->first].emplace_back(mod.virtual_path);
|
candidates[pair->first].emplace_back(mod.virtual_path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
conf.setBool("load_mod_" + mod.name, false);
|
conf.remove("load_mod_" + mod.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user