diff --git a/nether/furnace.lua b/nether/furnace.lua index ee293cd..7de5d25 100644 --- a/nether/furnace.lua +++ b/nether/furnace.lua @@ -1,5 +1,5 @@ -- minetest time speed -local time_speed = tonumber(minetest.setting_get("time_speed")) +local time_speed = tonumber(minetest.settings:get("time_speed")) if not time_speed then time_speed = 1 else @@ -250,7 +250,7 @@ minetest.register_abm({ if last_time == current_time then return end - + local timediff = get_timediff(last_time, current_time)+meta:get_string("timedif") local times = math.floor(timediff) meta:set_string("last_active", current_time) @@ -272,13 +272,13 @@ minetest.register_abm({ local srclist = inv:get_list("src") local cooked = nil local aftercooked - + if srclist then cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) end - + local was_active = false - + if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then was_active = true meta:set_float("fuel_time", meta:get_float("fuel_time") + 1) @@ -298,7 +298,7 @@ minetest.register_abm({ meta:set_string("src_time", 0) end end - + if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then local percent = math.floor(meta:get_float("fuel_time") / meta:get_float("fuel_totaltime") * 100) @@ -313,7 +313,7 @@ minetest.register_abm({ local cooked = nil local fuellist = inv:get_list("fuel") local srclist = inv:get_list("src") - + if srclist then cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) end @@ -339,7 +339,7 @@ minetest.register_abm({ meta:set_string("fuel_totaltime", fuel.time) meta:set_string("fuel_time", 0) - + inv:set_stack("fuel", 1, afterfuel.items[1]) end end, diff --git a/nether/guide.lua b/nether/guide.lua index 529495e..7af5748 100644 --- a/nether/guide.lua +++ b/nether/guide.lua @@ -291,7 +291,7 @@ local guide_size = {x=40, y=10, cx=0.2, cy=0.2} local formspec_offset = {x=0.25, y=0.50} local font_size if minetest.is_singleplayer() then - font_size = tonumber(minetest.setting_get("font_size")) or 13 + font_size = tonumber(minetest.settings:get("font_size")) or 13 else font_size = 13 end diff --git a/nether/init.lua b/nether/init.lua index b4045b6..e8381f2 100644 --- a/nether/init.lua +++ b/nether/init.lua @@ -142,7 +142,7 @@ local function do_ws_func(depth, a, x) return SIZE * y / math.pi end -local chunksize = minetest.setting_get("chunksize") or 5 +local chunksize = minetest.settings:get("chunksize") or 5 local ws_lists = {} local function get_ws_list(a,x) ws_lists[a] = ws_lists[a] or {} diff --git a/nether/pearl.lua b/nether/pearl.lua index d02f2e8..ec79576 100644 --- a/nether/pearl.lua +++ b/nether/pearl.lua @@ -7,7 +7,7 @@ local function table_contains(t, v) return false end -local creative = minetest.setting_getbool("creative_mode") +local creative = minetest.settings:get_bool("creative_mode") local function throw_pearl(item, player) local playerpos = player:getpos() playerpos.y = playerpos.y+1.625 diff --git a/nether/portal.lua b/nether/portal.lua index f21cf6b..9650342 100644 --- a/nether/portal.lua +++ b/nether/portal.lua @@ -2,7 +2,7 @@ -- kills the player if he uses PilzAdam portal local portal_target = nether.buildings+1 -local nether_prisons = minetest.setting_getbool("enable_damage") +local nether_prisons = minetest.settings:get_bool("enable_damage") local obsidian_portal_kills = nether_prisons and true local mclike_portal = false @@ -549,7 +549,7 @@ minetest.after(0.1, function() player:get_player_name(), "Warning: If you are in the nether you may not be able to find the way out!" ) - if not minetest.setting_getbool("creative_mode") then + if not minetest.settings:get_bool("creative_mode") then stack:take_item() end end