diff options
author | FaceDeer <FaceDeer@users.noreply.github.com> | 2017-10-09 16:48:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 16:48:25 -0600 |
commit | 19a0f193ad37ddf48741b93eb48aa9f973c7df55 (patch) | |
tree | c2d9ad89c924a9212d526b23b26743d31a2bc954 | |
parent | 2b84b4a3da5802b0315a2f9f9d1a536de955befa (diff) | |
parent | f2826937bac77fd2acba37ea5a04055622aa9b5d (diff) |
Merge pull request #9 from EdwardThorsten/master
Fixed deprecated calls. Whitespaces cleanup.
-rw-r--r-- | config.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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") |