From bdd13beeff5045a34042439e39620b9ca550b214 Mon Sep 17 00:00:00 2001
From: Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com>
Date: Tue, 27 Nov 2018 21:24:52 +0100
Subject: [PATCH] fix brass block->ingot recipe (clearing basic_materials' copper/silver recipe killed this one also)

---
 technic/machines/other/constructor.lua |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/technic/machines/other/constructor.lua b/technic/machines/other/constructor.lua
index 3396ac7..0a62a7c 100644
--- a/technic/machines/other/constructor.lua
+++ b/technic/machines/other/constructor.lua
@@ -2,6 +2,7 @@
 local S = technic.getter
 
 local function deploy_node(inv, slot_name, pos, node, machine_node)
+	if node.param2 > 3 then return end
 	if node.name ~= "air" then
 		if node.name == "ignore" or
 		   node.name == "default:lava_source" or
@@ -21,7 +22,7 @@
 		end
 		if remove_to then
 			for i = 1, remove_to do
-				inv:remove_item(drops[i])
+				inv:remove_item(slot_name, drops[i])
 			end
 		else
 			minetest.remove_node(pos)
@@ -98,7 +99,7 @@
 
 		if node.name == "technic:constructor_mk"..mark.."_off" then
 			technic.swap_node(pos, "technic:constructor_mk"..mark.."_on")
-			nodeupdate(pos)
+			minetest.check_for_falling(pos)
 			for i = 1, length do
 				place_pos = vector.add(place_pos, dir)
 				local place_node = minetest.get_node(place_pos)
@@ -112,7 +113,7 @@
 	return function(pos, node)
 		if node.name == "technic:constructor_mk"..mark.."_on" then
 			technic.swap_node(pos,"technic:constructor_mk"..mark.."_off")
-			nodeupdate(pos)
+			minetest.check_for_falling(pos)
 		end
 	end
 end
@@ -162,6 +163,7 @@
 		allow_metadata_inventory_put = technic.machine_inventory_put,
 		allow_metadata_inventory_take = technic.machine_inventory_take,
 		allow_metadata_inventory_move = technic.machine_inventory_move,
+		on_rotate = screwdriver.rotate_simple
 	})
 
 	minetest.register_node("technic:constructor_mk"..mark.."_on", {
@@ -180,6 +182,7 @@
 		allow_metadata_inventory_put = technic.machine_inventory_put,
 		allow_metadata_inventory_take = technic.machine_inventory_take,
 		allow_metadata_inventory_move = technic.machine_inventory_move,
+		on_rotate = false
 	})
 end
 

--
Gitblit v1.8.0