forked from mtcontrib/pipeworks
Merge pull request #134 from sofar/furnacefix
Work with NodeTimer based furnaces.
This commit is contained in:
commit
b3177a4827
@ -15,6 +15,10 @@ minetest.override_item("default:furnace", {
|
|||||||
insert_object = function(pos, node, stack, direction)
|
insert_object = function(pos, node, stack, direction)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
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
|
if direction.y == 1 then
|
||||||
return inv:add_item("fuel",stack)
|
return inv:add_item("fuel",stack)
|
||||||
else
|
else
|
||||||
@ -60,6 +64,10 @@ minetest.override_item("default:furnace_active", {
|
|||||||
insert_object = function(pos,node,stack,direction)
|
insert_object = function(pos,node,stack,direction)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
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
|
if direction.y == 1 then
|
||||||
return inv:add_item("fuel", stack)
|
return inv:add_item("fuel", stack)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user