From 343c7946d9014bf111e25a7a225a1b6f5746992b Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz <vanessaezekowitz@gmail.com> Date: Fri, 10 Mar 2017 20:15:38 +0100 Subject: [PATCH] power monitor changes New textures, uses facedir, connects from the back as well. --- technic/machines/other/injector.lua | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua index e932854..ec8966c 100644 --- a/technic/machines/other/injector.lua +++ b/technic/machines/other/injector.lua @@ -58,15 +58,24 @@ "button[0,1;2,1;mode_item;"..S("Stackwise").."]" or "button[0,1;2,1;mode_stack;"..S("Itemwise").."]").. "list[current_name;main;0,2;8,2;]".. - "list[current_player;main;0,5;8,4;]") + "list[current_player;main;0,5;8,4;]".. + "listring[]") end minetest.register_node("technic:injector", { description = S("Self-Contained 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}, - tube = {connect_sides={bottom=1}}, + groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=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) @@ -90,6 +99,8 @@ allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_move = technic.machine_inventory_move, + after_place_node = pipeworks.after_place, + after_dig_node = pipeworks.after_dig }) minetest.register_abm({ -- Gitblit v1.8.0