2016-04-01 22:10:20 -04:00
|
|
|
-- SETTINGS
|
|
|
|
function mesecon.setting(setting, default)
|
|
|
|
if type(default) == "boolean" then
|
Add readme.md mostly taken from the forum thread (and markdown-ified)
Updated several mods: castles, homedecor, digilines, farming redo,
jumping, maptools, mesecons, moreblocks, moretrees, pipeworks,
signs_lib, technic, unified_dyes
Deleted the peaceful_npc mod, as it is broken and unmaintained.
2018-05-11 10:22:53 -04:00
|
|
|
local read = minetest.settings:get_bool("mesecon."..setting)
|
2016-04-01 22:10:20 -04:00
|
|
|
if read == nil then
|
|
|
|
return default
|
|
|
|
else
|
|
|
|
return read
|
|
|
|
end
|
|
|
|
elseif type(default) == "string" then
|
Add readme.md mostly taken from the forum thread (and markdown-ified)
Updated several mods: castles, homedecor, digilines, farming redo,
jumping, maptools, mesecons, moreblocks, moretrees, pipeworks,
signs_lib, technic, unified_dyes
Deleted the peaceful_npc mod, as it is broken and unmaintained.
2018-05-11 10:22:53 -04:00
|
|
|
return minetest.settings:get("mesecon."..setting) or default
|
2016-04-01 22:10:20 -04:00
|
|
|
elseif type(default) == "number" then
|
Add readme.md mostly taken from the forum thread (and markdown-ified)
Updated several mods: castles, homedecor, digilines, farming redo,
jumping, maptools, mesecons, moreblocks, moretrees, pipeworks,
signs_lib, technic, unified_dyes
Deleted the peaceful_npc mod, as it is broken and unmaintained.
2018-05-11 10:22:53 -04:00
|
|
|
return tonumber(minetest.settings:get("mesecon."..setting) or default)
|
2016-04-01 22:10:20 -04:00
|
|
|
end
|
|
|
|
end
|