1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2025-07-17 15:20:33 +02:00

Version MFF.

This commit is contained in:
sys4-fr
2018-09-08 14:10:05 +02:00
parent 163bd4a021
commit 71236002de
139 changed files with 350 additions and 839 deletions

14
nether/furnace.lua Normal file → Executable file
View File

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