Fix use of 5.0 setting method

This commit is contained in:
rubenwardy 2019-01-06 00:59:59 +00:00
parent 919edf0aee
commit 141f165289

View file

@ -71,8 +71,8 @@ local function search_for_maps()
for key, _ in pairs(files_hash) do for key, _ in pairs(files_hash) do
local conf = Settings(mapdir .. "/" .. key .. ".conf") local conf = Settings(mapdir .. "/" .. key .. ".conf")
minetest.log("error", "ctf.maps." .. key:gsub("%./", ""):gsub("/", ".")) minetest.log("error", "ctf.maps." .. key:gsub("%./", ""):gsub("/", "."))
if not conf:get_bool("disabled", false) and local val = minetest.settings:get("ctf.maps." .. key:gsub("%./", ""):gsub("/", "."))
minetest.settings:get_bool("ctf.maps." .. key:gsub("%./", ""):gsub("/", "."), true) then if not conf:get_bool("disabled", false) and val ~= "false" then
table.insert(ctf_map.available_maps, key) table.insert(ctf_map.available_maps, key)
else else
minetest.log("error", key .. " disabled!") minetest.log("error", key .. " disabled!")