diff options
author | Jeija <norrepli@gmail.com> | 2015-07-27 11:51:02 +0200 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2015-07-27 11:51:02 +0200 |
commit | d0354d0dab68d5927cfcccfddab67613d35cef79 (patch) | |
tree | 8fe3314157f3c42adb22f68e72821899d825643c | |
parent | fec43a324358b2f104e07951fcb00f1bc79a25dc (diff) | |
download | mesecons-d0354d0dab68d5927cfcccfddab67613d35cef79.tar mesecons-d0354d0dab68d5927cfcccfddab67613d35cef79.tar.gz mesecons-d0354d0dab68d5927cfcccfddab67613d35cef79.tar.bz2 mesecons-d0354d0dab68d5927cfcccfddab67613d35cef79.tar.xz mesecons-d0354d0dab68d5927cfcccfddab67613d35cef79.zip |
Fix #234
-rw-r--r-- | mesecons/settings.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mesecons/settings.lua b/mesecons/settings.lua index 164cb57..50240c3 100644 --- a/mesecons/settings.lua +++ b/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
+ return read
+ end
elseif type(default) == "string" then
return minetest.setting_get("mesecon."..setting) or default
elseif type(default) == "number" then
|