1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 23:10:17 +01:00

Furnace: Start the timer on on_metadata_inventory_take (#2639)

This fixes a cosmetic issue where if a player removes
items from the furnace it will not revert to showing that its
"Empty". The furnace would only show its empty when the the
items were used up by the smelting process.
This commit is contained in:
orbea 2020-09-23 20:58:09 +00:00 committed by GitHub
parent 5348d6e5bc
commit dd91a1bfe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,6 +318,10 @@ minetest.register_node("default:furnace", {
-- start timer function, it will sort out whether furnace can burn or not. -- start timer function, it will sort out whether furnace can burn or not.
minetest.get_node_timer(pos):start(1.0) minetest.get_node_timer(pos):start(1.0)
end, end,
on_metadata_inventory_take = function(pos)
-- check whether the furnace is empty or not.
minetest.get_node_timer(pos):start(1.0)
end,
on_blast = function(pos) on_blast = function(pos)
local drops = {} local drops = {}
default.get_inventory_drops(pos, "src", drops) default.get_inventory_drops(pos, "src", drops)