diff options
author | Tim <t4im@users.noreply.github.com> | 2015-02-11 03:14:15 +0100 |
---|---|---|
committer | Tim <t4im@users.noreply.github.com> | 2015-02-11 03:15:34 +0100 |
commit | 7ed1aa9398e4966b257bdb37616c0db3e445c789 (patch) | |
tree | f7e98e690ffa8629ce754e0fe92f2eca2b6d38b5 | |
parent | ce40d1cfb839440367c0ac6f1c203f7e838b03fd (diff) |
correct injector inventory handling by tubes
-rw-r--r-- | technic/machines/other/injector.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua index ff4accf..e68760c 100644 --- a/technic/machines/other/injector.lua +++ b/technic/machines/other/injector.lua @@ -66,7 +66,15 @@ minetest.register_node("technic:injector", { tiles = {"technic_injector_top.png", "technic_injector_bottom.png", "technic_injector_side.png", "technic_injector_side.png", "technic_injector_side.png", "technic_injector_side.png"}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1}, - tube = {connect_sides={bottom=1}}, + tube = { + can_insert = function(pos, node, stack, direction) + return minetest.get_meta(pos):get_inventory():room_for_item("main",stack) + end, + insert_object = function(pos, node, stack, direction) + return minetest.get_meta(pos):get_inventory():add_item("main",stack) + end, + connect_sides = {left=1, right=1, front=1, back=1, top=1, bottom=1}, + }, sounds = default.node_sound_wood_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) |