mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
prevent divizion by zero in mcl_furnaces
This commit is contained in:
parent
9c8098c203
commit
6efed85866
1 changed files with 4 additions and 1 deletions
|
@ -321,7 +321,10 @@ local function furnace_node_timer(pos, elapsed)
|
|||
local result = false
|
||||
|
||||
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)
|
||||
swap_node(pos, "mcl_furnaces:furnace_active")
|
||||
-- make sure timer restarts automatically
|
||||
|
|
Loading…
Reference in a new issue