mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 00:57:29 +01:00
Work with NodeTimer based furnaces.
If we insert items through tubes, we must start the furnace timer otherwise it will never start operating. This shouldn't break older versions, as not having a timer function should just cancel out.
This commit is contained in:
parent
6de437b83d
commit
c61c090ac4
@ -15,6 +15,10 @@ minetest.override_item("default:furnace", {
|
||||
insert_object = function(pos, node, stack, direction)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
if not timer:is_started() then
|
||||
timer:start(1.0)
|
||||
end
|
||||
if direction.y == 1 then
|
||||
return inv:add_item("fuel",stack)
|
||||
else
|
||||
@ -60,6 +64,10 @@ minetest.override_item("default:furnace_active", {
|
||||
insert_object = function(pos,node,stack,direction)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
if not timer:is_started() then
|
||||
timer:start(1.0)
|
||||
end
|
||||
if direction.y == 1 then
|
||||
return inv:add_item("fuel", stack)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user