mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Mesecons: Stop using deprecated settings syntax
This commit is contained in:
parent
5c2dd37528
commit
801e6fb1c4
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue