Změnit "basic_machines/grinder.lua"
This commit is contained in:
parent
db8fa06bb9
commit
e5cb2f8a92
1 changed files with 30 additions and 1 deletions
|
@ -218,7 +218,36 @@ minetest.register_node("basic_machines:grinder", {
|
||||||
end
|
end
|
||||||
grinder_update_meta(pos);
|
grinder_update_meta(pos);
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
tube = {
|
||||||
|
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
|
||||||
|
return inv:add_item("src", stack)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
can_insert = function(pos, node, stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
if direction.y == 1 then
|
||||||
|
return inv:room_for_item("fuel", stack)
|
||||||
|
else
|
||||||
|
if meta:get_int("split_material_stacks") == 1 then
|
||||||
|
stack = stack:peek_item(1)
|
||||||
|
end
|
||||||
|
return inv:room_for_item("src", stack)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
input_inventory = "dst",
|
||||||
|
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue