Furnace: Don't use items filled from the top as fuel
This commit is contained in:
parent
c98258238b
commit
7a4a446d82
@ -109,17 +109,19 @@ techage.register_node({"default:furnace", "default:furnace_active"}, {
|
|||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return techage.get_items(pos, inv, "dst", num)
|
return techage.get_items(pos, inv, "dst", num)
|
||||||
end,
|
end,
|
||||||
on_push_item = function(pos, side, stack)
|
on_push_item = function(pos, in_dir, stack)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
minetest.get_node_timer(pos):start(1.0)
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
if in_dir == 5 then
|
||||||
|
return techage.put_items(inv, "src", stack)
|
||||||
|
elseif minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
|
||||||
return techage.put_items(inv, "fuel", stack)
|
return techage.put_items(inv, "fuel", stack)
|
||||||
else
|
else
|
||||||
return techage.put_items(inv, "src", stack)
|
return techage.put_items(inv, "src", stack)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_unpull_item = function(pos, side, stack)
|
on_unpull_item = function(pos, in_dir, stack)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return techage.put_items(inv, "dst", stack)
|
return techage.put_items(inv, "dst", stack)
|
||||||
|
Loading…
Reference in New Issue
Block a user