Skip to content
Permalink
Browse files
Fix #234
  • Loading branch information
Jeija committed Jul 27, 2015
1 parent fec43a3 commit d0354d0dab68d5927cfcccfddab67613d35cef79
Showing 1 changed file with 7 additions and 2 deletions.
@@ -1,7 +1,12 @@
-- SETTINGS
function mesecon.setting(setting, default)
if type(default) == "bool" then
return minetest.setting_getbool("mesecon."..setting) or default
if type(default) == "boolean" then
local read = minetest.setting_getbool("mesecon."..setting)
if read == nil then
return default
else

This comment has been minimized.

Copy link
@HybridDog

HybridDog Jul 27, 2015

Contributor

you don't need an else if you use return

return read
end
elseif type(default) == "string" then
return minetest.setting_get("mesecon."..setting) or default
elseif type(default) == "number" then

0 comments on commit d0354d0

Please sign in to comment.