mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-05 07:41:06 +01:00
b299b95fac
This touches a lot of the existing Mesecons mods. Also add mesecons_wires.
15 lines
441 B
Lua
15 lines
441 B
Lua
-- SETTINGS
|
|
function mesecon.setting(setting, 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
|
|
return tonumber(minetest.setting_get("mesecon."..setting) or default)
|
|
end
|
|
end
|