Merge pull request 'Aktualizovat „basic_machines/recycler.lua“' (#18) from milan2018 into master
This commit is contained in:
commit
34f3d3846e
1 changed files with 23 additions and 1 deletions
|
@ -166,7 +166,7 @@ end
|
||||||
minetest.register_node("basic_machines:recycler", {
|
minetest.register_node("basic_machines:recycler", {
|
||||||
description = "Recycler - use to get some ingredients back from crafted things",
|
description = "Recycler - use to get some ingredients back from crafted things",
|
||||||
tiles = {"recycler.png"},
|
tiles = {"recycler.png"},
|
||||||
groups = {cracky=3, mesecon_effector_on = 1},
|
groups = {cracky=3, mesecon_effector_on = 1, tubedevice = 1, tubedevice_receiver = 1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
local meta = minetest.get_meta(pos);
|
local meta = minetest.get_meta(pos);
|
||||||
|
@ -230,6 +230,28 @@ minetest.register_node("basic_machines:recycler", {
|
||||||
recycler_update_meta(pos);
|
recycler_update_meta(pos);
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
tube = {
|
||||||
|
insert_object = function(pos, node, stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
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
|
||||||
|
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