From f2826937bac77fd2acba37ea5a04055622aa9b5d Mon Sep 17 00:00:00 2001 From: anonymous Date: Mon, 2 Oct 2017 20:49:23 +0100 Subject: Fixed deprecated calls. --- config.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config.lua') diff --git a/config.lua b/config.lua index a4b905e..63f16ca 100644 --- a/config.lua +++ b/config.lua @@ -7,20 +7,20 @@ local print_settingtypes = false local function setting(stype, name, default, description) local value if stype == "bool" then - value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name) + value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name) elseif stype == "string" then - value = minetest.setting_get(CONFIG_FILE_PREFIX..name) + value = minetest.settings:get(CONFIG_FILE_PREFIX..name) elseif stype == "int" or stype == "float" then - value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name)) + value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name)) end if value == nil then value = default end digtron.config[name] = value - + if print_settingtypes then minetest.debug(CONFIG_FILE_PREFIX..name.." ("..description..") "..stype.." "..tostring(default)) - end + end end setting("bool", "uses_resources", true, "Digtron uses resources when active") -- cgit v1.2.3