Merge branch 'master' into nalc-1.2

This commit is contained in:
2019-05-10 00:36:23 +02:00
24 changed files with 335 additions and 211 deletions

View File

@ -1,14 +1,14 @@
--[[
Map Tools: configuration handling
Copyright (c) 2012-2015 Calinou and contributors.
Copyright © 2012-2019 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
maptools.config = {}
local function getbool_default(setting, default)
local value = minetest.setting_getbool(setting)
local value = minetest.settings:get_bool(setting)
if value == nil then
value = default
end
@ -21,7 +21,7 @@ local function setting(settingtype, name, default)
getbool_default("maptools." .. name, default)
else
maptools.config[name] =
minetest.setting_get("maptools." .. name) or default
minetest.settings:get("maptools." .. name) or default
end
end