X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=builtin%2Fmainmenu%2Fpkgmgr.lua;h=7863f1ca1a893fa65d5bfca93a16a368101d4a56;hb=df6670b28a2f4e1f6094b617a25792a70400b66d;hp=cea373c9f5e7858d3eb2ab7f446417b9d70c05d6;hpb=4b04268304a2f798cea110415f360c165395b4fb;p=dragonfireclient.git diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua index cea373c9f..7863f1ca1 100644 --- a/builtin/mainmenu/pkgmgr.lua +++ b/builtin/mainmenu/pkgmgr.lua @@ -391,7 +391,10 @@ function pkgmgr.get_worldconfig(worldpath) if key == "gameid" then worldconfig.id = value elseif key:sub(0, 9) == "load_mod_" then - worldconfig.global_mods[key] = core.is_yes(value) + -- Compatibility: Check against "nil" which was erroneously used + -- as value for fresh configured worlds + worldconfig.global_mods[key] = value ~= "false" and value ~= "nil" + and value else worldconfig[key] = value end @@ -561,7 +564,7 @@ function pkgmgr.preparemodlist(data) retval[#retval + 1] = { type = "game", is_game_content = true, - name = fgettext(gamespec.name .. " mods"), + name = fgettext("$1 mods", gamespec.name), path = gamespec.path } end @@ -595,7 +598,7 @@ function pkgmgr.preparemodlist(data) end end if element ~= nil then - element.enabled = core.is_yes(value) + element.enabled = value ~= "false" and value ~= "nil" and value else core.log("info", "Mod: " .. key .. " " .. dump(value) .. " but not found") end