Skip to content
Permalink
Browse files

Replace deprecated methods:

- 'setting_get' with 'settings:get'
- 'setting_getbool' with 'settings:get_bool'
  • Loading branch information
AntumDeluge authored and sfan5 committed Mar 25, 2018
1 parent d8f82e6 commit f70a308bb0bddefe963a6b82016f67d3be122069
Showing with 3 additions and 3 deletions.
  1. +3 −3 mesecons/settings.lua
@@ -1,15 +1,15 @@
-- SETTINGS
function mesecon.setting(setting, default)
if type(default) == "boolean" then
local read = minetest.setting_getbool("mesecon."..setting)
local read = minetest.settings:get_bool("mesecon."..setting)
if read == nil then
return default
else
return read
end
elseif type(default) == "string" then
return minetest.setting_get("mesecon."..setting) or default
return minetest.settings:get("mesecon."..setting) or default
elseif type(default) == "number" then
return tonumber(minetest.setting_get("mesecon."..setting) or default)
return tonumber(minetest.settings:get("mesecon."..setting) or default)
end
end

0 comments on commit f70a308

Please sign in to comment.
You can’t perform that action at this time.