forked from LizzyFleckenstein03/Memeclone
prevent divizion by zero in mcl_furnaces
This commit is contained in:
parent
9c8098c203
commit
6efed85866
|
@ -321,7 +321,10 @@ local function furnace_node_timer(pos, elapsed)
|
||||||
local result = false
|
local result = false
|
||||||
|
|
||||||
if active then
|
if active then
|
||||||
local fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
|
local fuel_percent = 0
|
||||||
|
if fuel_totaltime > 0 then
|
||||||
|
fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
|
||||||
|
end
|
||||||
formspec = active_formspec(fuel_percent, item_percent)
|
formspec = active_formspec(fuel_percent, item_percent)
|
||||||
swap_node(pos, "mcl_furnaces:furnace_active")
|
swap_node(pos, "mcl_furnaces:furnace_active")
|
||||||
-- make sure timer restarts automatically
|
-- make sure timer restarts automatically
|
||||||
|
|
Loading…
Reference in New Issue