local pi = math.pi
local player_in_bed = 0
local is_sp = minetest.is_singleplayer()
-local enable_respawn = minetest.setting_getbool("enable_bed_respawn")
+local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
if enable_respawn == nil then
enable_respawn = true
end
end
local function is_night_skip_enabled()
- local enable_night_skip = minetest.setting_getbool("enable_bed_night_skip")
+ local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
if enable_night_skip == nil then
enable_night_skip = true
end
"listring[current_player;main]" ..
default.get_hotbar_bg(0,4.85)
-local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200
-local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4
+local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
+local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
description = "Bones",
minetest.register_on_dieplayer(function(player)
- local bones_mode = minetest.setting_get("bones_mode") or "bones"
+ local bones_mode = minetest.settings:get("bones_mode") or "bones"
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
bones_mode = "bones"
end
creative = {}
-local creative_mode_cache = minetest.setting_getbool("creative_mode")
+local creative_mode_cache = minetest.settings:get_bool("creative_mode")
function creative.is_enabled_for(name)
return creative_mode_cache
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
-if minetest.setting_getbool("enable_lavacooling") ~= false then
+if minetest.settings:get_bool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"},
-- Sound
--
-local flame_sound = minetest.setting_getbool("flame_sound")
+local flame_sound = minetest.settings:get_bool("flame_sound")
if flame_sound == nil then
-- Enable if no setting present
flame_sound = true
-- Enable the following ABMs according to 'enable fire' setting
-local fire_enabled = minetest.setting_getbool("enable_fire")
+local fire_enabled = minetest.settings:get_bool("enable_fire")
if fire_enabled == nil then
-- enable_fire setting not specified, check for disable_fire
- local fire_disabled = minetest.setting_getbool("disable_fire")
+ local fire_disabled = minetest.settings:get_bool("disable_fire")
if fire_disabled == nil then
-- Neither setting specified, check whether singleplayer
fire_enabled = minetest.is_singleplayer()
-local stuff_string = minetest.setting_get("initial_stuff") or
+local stuff_string = minetest.settings:get("initial_stuff") or
"default:pick_steel,default:axe_steel,default:shovel_steel," ..
"default:torch 99,default:cobble 99"
end
give_initial_stuff.add_from_csv(stuff_string)
-if minetest.setting_getbool("give_initial_stuff") then
+if minetest.settings:get_bool("give_initial_stuff") then
minetest.register_on_newplayer(give_initial_stuff.give)
end
func = function(name)
local player = minetest.get_player_by_name(name)
if player then
- if minetest.setting_getbool("enable_damage") then
+ if minetest.settings:get_bool("enable_damage") then
player:set_hp(0)
return true
else
-- Get setting for replace ABM
-local replace = minetest.setting_getbool("enable_stairs_replace_abm")
+local replace = minetest.settings:get_bool("enable_stairs_replace_abm")
local function rotate_and_place(itemstack, placer, pointed_thing)
local p0 = pointed_thing.under
tnt = {}
-- Default to enabled when in singleplayer
-local enable_tnt = minetest.setting_getbool("enable_tnt")
+local enable_tnt = minetest.settings:get_bool("enable_tnt")
if enable_tnt == nil then
enable_tnt = minetest.is_singleplayer()
end
loss_prob["default:cobble"] = 3
loss_prob["default:dirt"] = 4
-local tnt_radius = tonumber(minetest.setting_get("tnt_radius") or 3)
+local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3)
-- Fill a list with data for content IDs, after all nodes are registered
local cid_data = {}