From 25fdf59bae999feb764a870c3ae442703548c48e Mon Sep 17 00:00:00 2001
From: h-v-smacker <hans-von-smacker+github@gmail.com>
Date: Sun, 5 Aug 2018 09:13:56 +0300
Subject: desert [sand]stone recipe fix and eject to the right

---
 technic/machines/register/alloy_recipes.lua      | 21 ++++++++++++---------
 technic/machines/register/common.lua             |  8 +++++---
 technic/machines/register/compressor_recipes.lua |  8 +++++++-
 technic/tools/walking_tractor.lua                |  1 +
 4 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/technic/machines/register/alloy_recipes.lua b/technic/machines/register/alloy_recipes.lua
index 0d40b77..209d376 100644
--- a/technic/machines/register/alloy_recipes.lua
+++ b/technic/machines/register/alloy_recipes.lua
@@ -14,10 +14,10 @@ end
 local recipes = {
 	{"technic:copper_dust 3",         "technic:tin_dust",           "technic:bronze_dust 4"},
 	{"default:copper_ingot 3",        "moreores:tin_ingot",         "default:bronze_ingot 4"},
-	{"technic:wrought_iron_dust",     "technic:coal_dust",          "technic:carbon_steel_dust", 3},
-	{"technic:wrought_iron_ingot",    "technic:coal_dust",          "technic:carbon_steel_ingot", 3},
-	{"technic:carbon_steel_dust",     "technic:coal_dust",          "technic:cast_iron_dust", 3},
-	{"technic:carbon_steel_ingot",    "technic:coal_dust",          "technic:cast_iron_ingot", 3},
+	{"technic:wrought_iron_dust",     "technic:coal_dust",          "technic:carbon_steel_dust",        3},
+	{"technic:wrought_iron_ingot",    "technic:coal_dust",          "technic:carbon_steel_ingot",       3},
+	{"technic:carbon_steel_dust",     "technic:coal_dust",          "technic:cast_iron_dust",           3},
+	{"technic:carbon_steel_ingot",    "technic:coal_dust",          "technic:cast_iron_ingot",          3},
 	{"technic:carbon_steel_dust 3",   "technic:chromium_dust",      "technic:stainless_steel_dust 4"},
 	{"technic:carbon_steel_ingot 3",  "technic:chromium_ingot",     "technic:stainless_steel_ingot 4"},
 	{"technic:copper_dust 2",         "technic:zinc_dust",          "technic:brass_dust 3"},
@@ -27,16 +27,19 @@ local recipes = {
 	-- from https://en.wikipedia.org/wiki/Carbon_black
 	-- The highest volume use of carbon black is as a reinforcing filler in rubber products, especially tires.
 	-- "[Compounding a] pure gum vulcanizate … with 50% of its weight of carbon black improves its tensile strength and wear resistance …" 
-	{"technic:raw_latex 4",           "technic:coal_dust 2",        "technic:rubber 6", 2},
-	{"technic:raw_latex 3",           "technic:sulfur_dust 1",      "technic:latex_foam", 2},
+	{"technic:raw_latex 4",           "technic:coal_dust 2",        "technic:rubber 6",                  2},
+	{"technic:raw_latex 3",           "technic:sulfur_dust 1",      "technic:latex_foam",                2},
+	-- straightforward way to get red stone
+	{"default:stone",                 "dye:red",                    "default:desert_stone",              2},
+
 }
 
 if minetest.get_modpath("ethereal") then
 	table.insert(recipes, {"ethereal:crystal_spike", "ethereal:fire_dust 2", "default:mese_crystal 2"})
 	if not minetest.get_modpath("bakedclay") then
-		table.insert(recipes, {"default:clay", "dye:red", "bakedclay:red"})
-		table.insert(recipes, {"default:clay", "dye:orange", "bakedclay:orange"})
-		table.insert(recipes, {"default:clay", "dye:grey", "bakedclay:grey"})
+		table.insert(recipes, {"default:clay", "dye:red",    "bakedclay:red",    3})
+		table.insert(recipes, {"default:clay", "dye:orange", "bakedclay:orange", 3})
+		table.insert(recipes, {"default:clay", "dye:grey",   "bakedclay:grey",   3})
 	end
 	if minetest.get_modpath("bonemeal") then
 		table.insert(recipes, {"default:sand", "bonemeal:mulch", "ethereal:sandy 2"})
diff --git a/technic/machines/register/common.lua b/technic/machines/register/common.lua
index f872fa2..b0ef302 100644
--- a/technic/machines/register/common.lua
+++ b/technic/machines/register/common.lua
@@ -130,12 +130,14 @@ function technic.handle_machine_pipeworks(pos, tube_upgrade, send_function)
 	local x_velocity = 0
 	local z_velocity = 0
 
-	-- Output is on the left side of the furnace
-	if node.param2 == 3 then pos1.z = pos1.z - 1  z_velocity = -1 end
+	-- The machines shall always eject items to the right side
+	-- This will be easy to remember, since the destination inventory is always on the right as well
+	if node.param2 == 3 then pos1.z = pos1.z - 1  z_velocity =  1 end
 	if node.param2 == 2 then pos1.x = pos1.x - 1  x_velocity = -1 end
-	if node.param2 == 1 then pos1.z = pos1.z + 1  z_velocity =  1 end
+	if node.param2 == 1 then pos1.z = pos1.z + 1  z_velocity = -1 end
 	if node.param2 == 0 then pos1.x = pos1.x + 1  x_velocity =  1 end
 
+
 	local output_tube_connected = false
 	local node1 = minetest.get_node(pos1) 
 	if minetest.get_item_group(node1.name, "tubedevice") > 0 then
diff --git a/technic/machines/register/compressor_recipes.lua b/technic/machines/register/compressor_recipes.lua
index 3339981..6952e07 100644
--- a/technic/machines/register/compressor_recipes.lua
+++ b/technic/machines/register/compressor_recipes.lua
@@ -12,7 +12,9 @@ local recipes = {
 	{"default:snowblock",          "default:ice"},
 	{"default:sand 2",             "default:sandstone"},
 	{"default:silver_sand 2",      "default:silver_sandstone"},
-	{"default:desert_sand",        "default:desert_stone"},
+--	{"default:desert_sand",        "default:desert_stone"},
+--	for consistency, any sand should be compressed into respective sandstone type
+	{"default:desert_sand 2",      "default:desert_sandstone"},
 	{"technic:mixed_metal_ingot",  "technic:composite_plate"},
 	{"default:copper_ingot 5",     "technic:copper_plate"},
 	{"technic:coal_dust 4",        "technic:graphite"},
@@ -24,6 +26,10 @@ local recipes = {
 
 if minetest.get_modpath("ethereal") then
 	
+	-- substitute for old recipe chain
+	-- instead of 5 dry dirt -> 1 desert sand -> compressing -> desert_stone
+	table.insert(recipes, {"ethereal:dry_dirt 5", "default:desert_stone"})
+	
 	-- compressing most copious leaves into more compact fuel
 	-- this conversion is based on the burn time (1 vs. 10) + some overhead
 	table.insert(recipes, {"default:acacia_leaves 15", "ethereal:charcoal_lump 1"})
diff --git a/technic/tools/walking_tractor.lua b/technic/tools/walking_tractor.lua
index 1f40a4b..0f514e2 100644
--- a/technic/tools/walking_tractor.lua
+++ b/technic/tools/walking_tractor.lua
@@ -55,6 +55,7 @@ local ripe_for_harvest = {
 	"ethereal:onion_5",
 	"ethereal:strawberry_8",
 	-- also doubles as a snow-plough
+	"default:snow",
 	"default:snowblock",
 	"stairs:slab_snowblock",
 	-- mushrooms
-- 
cgit v1.2.3