From d0efa15b983f7a0a96e1a7abcdad713715dfeeeb Mon Sep 17 00:00:00 2001
From: Zefram <zefram@fysh.org>
Date: Mon, 18 Aug 2014 16:14:15 +0200
Subject: [PATCH] In quarry, skip past undiggable nodes

---
 technic/machines/other/injector.lua |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua
index 485974c..36c2592 100644
--- a/technic/machines/other/injector.lua
+++ b/technic/machines/other/injector.lua
@@ -13,7 +13,7 @@
 				local item0=stack:to_table()
 				if item0 then 
 					item0["count"] = "1"
-					pipeworks.tube_item(pos, pos, vector.new(0, -1, 0), item0)
+					technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
 					stack:take_item(1)
 					inv:set_stack("main", i, stack)
 					return
@@ -28,7 +28,7 @@
 				if stack then
 				local item0=stack:to_table()
 				if item0 then 
-					pipeworks.tube_item(pos, pos, vector.new(0, -1, 0), item0)
+					technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
 					stack:clear()
 					inv:set_stack("main", i, stack)
 					return
@@ -97,12 +97,11 @@
 	interval = 1,
 	chance = 1,
 	action = function(pos, node, active_object_count, active_object_count_wider)
-	local pos1={}
-	pos1.x = pos.x
-	pos1.y = pos.y-1
-	pos1.z = pos.z
-	local meta=minetest.env:get_meta(pos1) 
-		if meta:get_int("tubelike")==1 then inject_items (pos) end
+		local pos1 = vector.add(pos, vector.new(0, -1, 0))
+		local node1 = minetest.get_node(pos1) 
+		if minetest.get_item_group(node1.name, "tubedevice") > 0 then
+			inject_items(pos)
+		end
 	end,
 })
 

--
Gitblit v1.8.0