2022-08-16 17:12:37 +02:00
|
|
|
local default_settings = {
|
|
|
|
trap_players = true,
|
|
|
|
log_to_chat = false,
|
|
|
|
log_level = 2,
|
2021-12-28 18:33:25 +01:00
|
|
|
overworld_help = true,
|
2022-08-16 17:12:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
nether.settings = {}
|
|
|
|
|
|
|
|
for name,dv in pairs(default_settings) do
|
|
|
|
local setting
|
|
|
|
local setting_name = "nether." .. name
|
|
|
|
if type(dv) == "boolean" then
|
|
|
|
setting = minetest.settings:get_bool(setting_name)
|
|
|
|
elseif type(dv) == "number" then
|
|
|
|
setting = tonumber(minetest.settings:get(setting_name))
|
|
|
|
else
|
|
|
|
error"[nether] Only boolean and number settings are available"
|
|
|
|
end
|
|
|
|
if setting == nil then
|
|
|
|
setting = dv
|
|
|
|
end
|
|
|
|
nether[name] = setting
|
|
|
|
end
|