added pipeworks support yay
This commit is contained in:
parent
d50ef3def3
commit
d4d1211f13
@ -246,7 +246,7 @@ minetest.register_node("forestry_bees:apiary", apply_logger({
|
||||
"forestry_bees_apiary_side.png", "forestry_bees_apiary_side.png"
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2},
|
||||
groups = {choppy=2, oddly_breakable_by_hand=2, tubedevice = 1, tubedevice_receiver = 1},
|
||||
legacy_facedir_simple = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -285,6 +285,31 @@ minetest.register_node("forestry_bees:apiary", apply_logger({
|
||||
return drops
|
||||
end,
|
||||
|
||||
tube = {
|
||||
insert_object = function(pos, node, stack, direction)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if minetest.get_item_group(stack:get_name(),"bee_drone") == 1 then
|
||||
return inv:add_item('drone', stack)
|
||||
end
|
||||
if minetest.get_item_group(stack:get_name(),"bee_monarch") == 1 then
|
||||
return inv:add_item('monarch', stack)
|
||||
end
|
||||
end,
|
||||
can_insert = function(pos, node, stack, direction)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if minetest.get_item_group(stack:get_name(),"bee_drone") == 1 then
|
||||
return inv:room_for_item('drone', stack)
|
||||
end
|
||||
if minetest.get_item_group(stack:get_name(),"bee_monarch") == 1 then
|
||||
return inv:room_for_item('monarch', stack)
|
||||
end
|
||||
end,
|
||||
input_inventory = 'dst',
|
||||
connect_sides = {left = 1, right = 1, front = 1, back = 1, bottom = 1, top = 1}
|
||||
},
|
||||
|
||||
allow_metadata_inventory_put = allow_metadata_inventory_put,
|
||||
allow_metadata_inventory_move = allow_metadata_inventory_move,
|
||||
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
||||
|
Loading…
Reference in New Issue
Block a user