forked from Mirrorlandia_minetest/mesecons
Fix #234
This commit is contained in:
parent
fec43a3243
commit
d0354d0dab
@ -1,7 +1,12 @@
|
|||||||
-- SETTINGS
|
-- SETTINGS
|
||||||
function mesecon.setting(setting, default)
|
function mesecon.setting(setting, default)
|
||||||
if type(default) == "bool" then
|
if type(default) == "boolean" then
|
||||||
return minetest.setting_getbool("mesecon."..setting) or default
|
local read = minetest.setting_getbool("mesecon."..setting)
|
||||||
|
if read == nil then
|
||||||
|
return default
|
||||||
|
else
|
||||||
|
return read
|
||||||
|
end
|
||||||
elseif type(default) == "string" then
|
elseif type(default) == "string" then
|
||||||
return minetest.setting_get("mesecon."..setting) or default
|
return minetest.setting_get("mesecon."..setting) or default
|
||||||
elseif type(default) == "number" then
|
elseif type(default) == "number" then
|
||||||
|
Loading…
Reference in New Issue
Block a user