From 5e19514c60bd46a939beeeddde1125f137c486fb Mon Sep 17 00:00:00 2001
From: Carter Kolwey <cheapiephp@gmail.com>
Date: Tue, 28 Feb 2017 00:58:43 +0100
Subject: [PATCH] Add dirt recipe to centrifuge 4 dirt -> 2 clay lumps, 1 sand, 1 gravel

---
 technic/machines/register/machine_base.lua |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/technic/machines/register/machine_base.lua b/technic/machines/register/machine_base.lua
index 0c46261..8cf851b 100644
--- a/technic/machines/register/machine_base.lua
+++ b/technic/machines/register/machine_base.lua
@@ -15,6 +15,8 @@
 	connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
 }
 
+local connect_default = {"bottom", "back", "left", "right"}
+
 local function round(v)
 	return math.floor(v + 0.5)
 end
@@ -27,15 +29,13 @@
 	local tier = data.tier
 	local ltier = string.lower(tier)
 
-	local groups = {cracky = 2, technic_machine = 1}
-	local active_groups = {cracky = 2, technic_machine = 1, not_in_creative_inventory = 1}
+	local groups = {cracky = 2, technic_machine = 1, ["technic_"..ltier] = 1}
 	if data.tube then
 		groups.tubedevice = 1
 		groups.tubedevice_receiver = 1
-		active_groups.tubedevice = 1
-		active_groups.tubedevice_receiver = 1
 	end
-
+	local active_groups = {not_in_creative_inventory = 1}
+	for k, v in pairs(groups) do active_groups[k] = v end
 
 	local formspec =
 		"invsize[8,9;]"..
@@ -145,6 +145,7 @@
 		paramtype2 = "facedir",
 		groups = groups,
 		tube = data.tube and tube or nil,
+		connect_sides = data.connect_sides or connect_default,
 		legacy_facedir_simple = true,
 		sounds = default.node_sound_wood_defaults(),
 		on_construct = function(pos)
@@ -179,6 +180,7 @@
 		paramtype2 = "facedir",
 		drop = "technic:"..ltier.."_"..machine_name,
 		groups = active_groups,
+		connect_sides = data.connect_sides or connect_default,
 		legacy_facedir_simple = true,
 		sounds = default.node_sound_wood_defaults(),
 		tube = data.tube and tube or nil,

--
Gitblit v1.8.0