Skip to content

Commit

Permalink
Fix #234
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeija committed Jul 27, 2015
1 parent fec43a3 commit d0354d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mesecons/settings.lua
@@ -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
Expand Down

0 comments on commit d0354d0

Please sign in to comment.