Merge pull request #1 from EdwardThorsten/master

Cleaning up deprecated calls.
This commit is contained in:
Tai Kedzierski 2017-10-02 09:07:07 +01:00 committed by GitHub
commit 0ec2755c59
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ if not minetest.registered_privileges[areas.config.self_protection_privilege] th
})
end
if minetest.setting_getbool("log_mod") then
if minetest.settings:get_bool("log_mod") then
local diffTime = os.clock() - areas.startTime
minetest.log("action", "areas loaded in "..diffTime.."s.")
end

View File

@ -6,13 +6,13 @@ local function setting(tp, name, default)
local full_name = "areas."..name
local value
if tp == "boolean" then
value = minetest.setting_getbool(full_name)
value = minetest.settings:get_bool(full_name)
elseif tp == "string" then
value = minetest.setting_get(full_name)
value = minetest.settings:get(full_name)
elseif tp == "position" then
value = minetest.setting_get_pos(full_name)
elseif tp == "number" then
value = tonumber(minetest.setting_get(full_name))
value = tonumber(minetest.settings:get(full_name))
else
error("Invalid setting type!")
end