1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2025-07-12 21:10:25 +02:00

replace deprecated setting methods

This commit is contained in:
DS-Minetest
2017-07-05 18:52:46 +02:00
parent a7da195aa1
commit e8a666f34e
5 changed files with 13 additions and 13 deletions

View File

@ -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,