diff options
author | AntumDeluge <antumdeluge@gmail.com> | 2017-05-12 23:08:05 -0700 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2018-03-25 22:05:10 +0200 |
commit | f70a308bb0bddefe963a6b82016f67d3be122069 (patch) | |
tree | d689428374d5d91a58f1d6478eab9ef033987caa | |
parent | d8f82e6771dc21122a59b3f65dbeb102dab2c372 (diff) |
Replace deprecated methods:
- 'setting_get' with 'settings:get'
- 'setting_getbool' with 'settings:get_bool'
-rw-r--r-- | mesecons/settings.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesecons/settings.lua b/mesecons/settings.lua index 1ebbfde..0220707 100644 --- a/mesecons/settings.lua +++ b/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 |