mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +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
|
@ -138,7 +138,7 @@ local function handle_buttons(this, fields)
|
|||
not mod.is_game_content then
|
||||
if modname_valid(mod.name) then
|
||||
worldfile:set("load_mod_" .. mod.name,
|
||||
tostring(mod.enabled))
|
||||
mod.enabled and "true" or "false")
|
||||
elseif mod.enabled then
|
||||
gamedata.errormessage = fgettext_ne("Failed to enable mo" ..
|
||||
"d \"$1\" as it contains disallowed characters. " ..
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue