From 5c21a4fb59a74857839b2879e85a510ed48eee7c Mon Sep 17 00:00:00 2001
From: h-v-smacker <hans-von-smacker+github@gmail.com>
Date: Thu, 15 Feb 2018 23:22:19 +0300
Subject: chainsaw mk2 - red crystal

---
 technic/tools/chainsaw.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/technic/tools/chainsaw.lua b/technic/tools/chainsaw.lua
index 1bb9a95..4ae9c97 100644
--- a/technic/tools/chainsaw.lua
+++ b/technic/tools/chainsaw.lua
@@ -196,7 +196,7 @@ end
 local S = technic.getter
 
 technic.register_power_tool("technic:chainsaw", chainsaw_max_charge)
-technic.register_power_tool("technic:chainsaw_mk2", chainsaw_max_charge*4)
+technic.register_power_tool("technic:chainsaw_mk2", chainsaw_max_charge*5)
 
 -- Table for saving what was sawed down
 local produced = {}
@@ -497,8 +497,8 @@ minetest.register_craft({
 	output = "technic:chainsaw_mk2",
 	recipe = {
 		{"technic:chainsaw",             "technic:stainless_steel_ingot", "technic:stainless_steel_ingot"},
-		{"technic:green_energy_crystal", "",                              ""},
-		{"",                             "",                              ""},
+		{"technic:red_energy_crystal",   "",                              ""},
+		{"dye:green",                    "",                              ""},
 	}
 })
 
-- 
cgit v1.2.3


From e9ce0b5a468c6873ddd3b7b4115aeacf469a8d0e Mon Sep 17 00:00:00 2001
From: h-v-smacker <hans-von-smacker+github@gmail.com>
Date: Thu, 15 Feb 2018 23:28:20 +0300
Subject: chainsaw mk2 - batteries

---
 technic/tools/chainsaw.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/technic/tools/chainsaw.lua b/technic/tools/chainsaw.lua
index 4ae9c97..6008500 100644
--- a/technic/tools/chainsaw.lua
+++ b/technic/tools/chainsaw.lua
@@ -196,7 +196,7 @@ end
 local S = technic.getter
 
 technic.register_power_tool("technic:chainsaw", chainsaw_max_charge)
-technic.register_power_tool("technic:chainsaw_mk2", chainsaw_max_charge*5)
+technic.register_power_tool("technic:chainsaw_mk2", chainsaw_max_charge*4)
 
 -- Table for saving what was sawed down
 local produced = {}
@@ -497,8 +497,8 @@ minetest.register_craft({
 	output = "technic:chainsaw_mk2",
 	recipe = {
 		{"technic:chainsaw",             "technic:stainless_steel_ingot", "technic:stainless_steel_ingot"},
-		{"technic:red_energy_crystal",   "",                              ""},
-		{"dye:green",                    "",                              ""},
+		{"technic:battery",              "technic:battery",               ""},
+		{"technic:battery",                    "",                              ""},
 	}
 })
 
-- 
cgit v1.2.3


From 72d9c2a488f10862a4493061cb898ad438f23125 Mon Sep 17 00:00:00 2001
From: h-v-smacker <hans-von-smacker+github@gmail.com>
Date: Thu, 15 Feb 2018 23:28:45 +0300
Subject: chainsaw mk2 - batteries

---
 technic/tools/chainsaw.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/technic/tools/chainsaw.lua b/technic/tools/chainsaw.lua
index 6008500..3e32397 100644
--- a/technic/tools/chainsaw.lua
+++ b/technic/tools/chainsaw.lua
@@ -498,7 +498,7 @@ minetest.register_craft({
 	recipe = {
 		{"technic:chainsaw",             "technic:stainless_steel_ingot", "technic:stainless_steel_ingot"},
 		{"technic:battery",              "technic:battery",               ""},
-		{"technic:battery",                    "",                              ""},
+		{"technic:battery",              "dye:green",                     ""},
 	}
 })
 
-- 
cgit v1.2.3


From 0637dcbc6913d300b1c88293e2cdeaa43a0513cb Mon Sep 17 00:00:00 2001
From: h-v-smacker <hans-von-smacker+github@gmail.com>
Date: Fri, 16 Feb 2018 15:12:56 +0300
Subject: fixed chainsaw mk2 charge bar

---
 technic/tools/chainsaw.lua | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/technic/tools/chainsaw.lua b/technic/tools/chainsaw.lua
index 3e32397..80e2bc2 100644
--- a/technic/tools/chainsaw.lua
+++ b/technic/tools/chainsaw.lua
@@ -1,6 +1,7 @@
 -- Configuration
 
-local chainsaw_max_charge      = 30000 -- Maximum charge of the saw
+local chainsaw_max_charge      =  30000 -- Maximum charge of the saw
+local chainsaw_max_charge_mk2  = 120000
 -- Gives 2500 nodes on a single charge (about 50 complete normal trees)
 local chainsaw_charge_per_node = 12
 -- Cut down tree leaves.  Leaf decay may cause slowness on large trees
@@ -196,7 +197,7 @@ end
 local S = technic.getter
 
 technic.register_power_tool("technic:chainsaw", chainsaw_max_charge)
-technic.register_power_tool("technic:chainsaw_mk2", chainsaw_max_charge*4)
+technic.register_power_tool("technic:chainsaw_mk2", chainsaw_max_charge_mk2)
 
 -- Table for saving what was sawed down
 local produced = {}
@@ -450,7 +451,11 @@ local function use_chainsaw(itemstack, user, pointed_thing, mk)
 	-- chainsaw will stop after digging a number of nodes
 	meta.charge = chainsaw_dig(pointed_thing.under, meta.charge, mk)
 	if not technic.creative_mode then
-		technic.set_RE_wear(itemstack, meta.charge, chainsaw_max_charge)
+		if mk == 1 then
+			technic.set_RE_wear(itemstack, meta.charge, chainsaw_max_charge)
+		elseif mk == 2 then
+			technic.set_RE_wear(itemstack, meta.charge, chainsaw_max_charge_mk2)
+		end
 		itemstack:set_metadata(minetest.serialize(meta))
 	end
 	return itemstack
-- 
cgit v1.2.3


From 291dc5186ae0e25042b9aa270f4254ac402142a1 Mon Sep 17 00:00:00 2001
From: h-v-smacker <hans-von-smacker+github@gmail.com>
Date: Mon, 19 Feb 2018 02:58:47 +0300
Subject: HV furnace and extra recipes

---
 technic/depends.txt                                |   2 +-
 technic/machines/HV/electric_furnace.lua           |  18 +++
 technic/machines/HV/init.lua                       |   2 +
 technic/machines/LV/cnc_nodes.lua                  | 122 ++++++++++++++++++++-
 technic/machines/register/alloy_recipes.lua        |   6 +
 technic/machines/register/compressor_recipes.lua   |   7 ++
 technic/machines/register/grinder_recipes.lua      |   5 +
 .../technic_hv_electric_furnace_bottom.png         | Bin 0 -> 422 bytes
 .../textures/technic_hv_electric_furnace_front.png | Bin 0 -> 543 bytes
 .../technic_hv_electric_furnace_front_active.png   | Bin 0 -> 542 bytes
 .../textures/technic_hv_electric_furnace_side.png  | Bin 0 -> 425 bytes
 .../technic_hv_electric_furnace_side_tube.png      | Bin 0 -> 2444 bytes
 .../textures/technic_hv_electric_furnace_top.png   | Bin 0 -> 1750 bytes
 13 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100644 technic/machines/HV/electric_furnace.lua
 create mode 100644 technic/textures/technic_hv_electric_furnace_bottom.png
 create mode 100644 technic/textures/technic_hv_electric_furnace_front.png
 create mode 100644 technic/textures/technic_hv_electric_furnace_front_active.png
 create mode 100644 technic/textures/technic_hv_electric_furnace_side.png
 create mode 100644 technic/textures/technic_hv_electric_furnace_side_tube.png
 create mode 100644 technic/textures/technic_hv_electric_furnace_top.png

diff --git a/technic/depends.txt b/technic/depends.txt
index 5bf9f9f..c052452 100644
--- a/technic/depends.txt
+++ b/technic/depends.txt
@@ -9,4 +9,4 @@ digilines?
 digiline_remote?
 intllib?
 unified_inventory?
-vector_extras?
+vector_extras?
\ No newline at end of file
diff --git a/technic/machines/HV/electric_furnace.lua b/technic/machines/HV/electric_furnace.lua
new file mode 100644
index 0000000..a11bb59
--- /dev/null
+++ b/technic/machines/HV/electric_furnace.lua
@@ -0,0 +1,18 @@
+-- MV Electric Furnace
+-- This is a faster version of the stone furnace which runs on EUs
+-- In addition to this it can be upgraded with microcontrollers and batteries
+-- This new version uses the batteries to lower the power consumption of the machine
+-- Also in addition this furnace can be attached to the pipe system from the pipeworks mod.
+
+-- FIXME: kpoppel I'd like to introduce an induction heating element here also
+minetest.register_craft({
+	output = 'technic:hv_electric_furnace',
+	recipe = {
+		{'technic:stainless_steel_ingot', 'technic:lv_electric_furnace', 'technic:stainless_steel_ingot'},
+		{'pipeworks:tube_1',              'technic:hv_transformer',      'pipeworks:tube_1'},
+		{'technic:stainless_steel_ingot', 'technic:hv_cable',            'technic:stainless_steel_ingot'},
+	}
+})
+
+technic.register_electric_furnace({tier="HV", upgrade=1, tube=1, demand={4000, 2500, 1500}, speed=12})
+
diff --git a/technic/machines/HV/init.lua b/technic/machines/HV/init.lua
index d7136b4..20e256b 100644
--- a/technic/machines/HV/init.lua
+++ b/technic/machines/HV/init.lua
@@ -15,4 +15,6 @@ dofile(path.."/generator.lua")
 -- Machines
 dofile(path.."/quarry.lua")
 dofile(path.."/forcefield.lua")
+dofile(path.."/electric_furnace.lua")
+
 
diff --git a/technic/machines/LV/cnc_nodes.lua b/technic/machines/LV/cnc_nodes.lua
index fbc7713..2440702 100644
--- a/technic/machines/LV/cnc_nodes.lua
+++ b/technic/machines/LV/cnc_nodes.lua
@@ -1,7 +1,7 @@
 -- REGISTER MATERIALS AND PROPERTIES FOR NONCUBIC ELEMENTS:
 -----------------------------------------------------------
 
-local S = technic.getter
+local S=technic.getter
 
 -- DIRT
 -------
@@ -155,7 +155,7 @@ technic.cnc.register_all("default:tree",
 -- ICE
 -------
 technic.cnc.register_all("default:ice",
-                {cracky = 3, puts_out_fire = 1, cools_lava = 1, not_in_creative_inventory=1},
+                {cracky=3, puts_out_fire=1, cools_lava=1, not_in_creative_inventory=1},
                 {"default_ice.png"},
                 S("Ice"))
 
@@ -163,7 +163,7 @@ technic.cnc.register_all("default:ice",
 -- OBSIDIAN
 -----------
 technic.cnc.register_all("default:obsidian_block",
-                {cracky = 1, level = 2, not_in_creative_inventory=1},
+                {cracky=1, level=2, not_in_creative_inventory=1},
                 {"default_obsidian_block.png"},
                 S("Obsidian"))
 
@@ -263,3 +263,119 @@ if minetest.get_modpath("ethereal") then
 			S("Glo Stone"))
 
 end
+
+
+if minetest.get_modpath("ethereal") then
+	-- Glostone
+	------------
+	technic.cnc.register_all("ethereal:glostone",
+			{cracky=1, not_in_creative_inventory=1, light_source=13},
+			{"glostone.png"},
+			S("Glo Stone"))
+
+	-- Crystal block
+	----------------
+	technic.cnc.register_all("ethereal:crystal_block",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"crystal_block.png"},
+                S("Crystal"))
+	
+	-- Misc. Wood types
+	-------------------
+	technic.cnc.register_all("ethereal:banana_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"banana_wood.png"},
+                S("Banana Wood"))
+	
+	technic.cnc.register_all("ethereal:birch_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"moretrees_birch_wood.png"},
+                S("Birch Wood"))
+	
+	technic.cnc.register_all("ethereal:frost_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"frost_wood.png"},
+                S("Frost Wood"))
+	
+	technic.cnc.register_all("ethereal:palm_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"moretrees_palm_wood.png"},
+                S("Palm Wood"))
+	
+	technic.cnc.register_all("ethereal:willow_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"willow_wood.png"},
+                S("Willow Wood"))
+	
+	technic.cnc.register_all("ethereal:yellow_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"yellow_wood.png"},
+                S("Healing Tree Wood"))
+	
+	technic.cnc.register_all("ethereal:redwood_wood",
+                {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
+                {"redwood_wood.png"},
+                S("Redwood"))
+end
+
+
+if minetest.get_modpath("moreblocks") then
+	-- Tiles
+	------------
+	technic.cnc.register_all("moreblocks:stone_tile",
+			{stone=1, cracky=3, not_in_creative_inventory=1},
+			{"moreblocks_stone_tile.png"},
+			S("Stone Tile"))
+	
+	technic.cnc.register_all("moreblocks:split_stone_tile",
+			{stone=1, cracky=3, not_in_creative_inventory=1},
+			{"moreblocks_split_stone_tile.png"},
+			S("Split Stone Tile"))
+	
+	technic.cnc.register_all("moreblocks:checker_stone_tile",
+			{stone=1, cracky=3, not_in_creative_inventory=1},
+			{"moreblocks_checker_stone_tile.png"},
+			S("Checker Stone Tile"))
+	
+	technic.cnc.register_all("moreblocks:cactus_checker",
+			{stone=1, cracky=3, not_in_creative_inventory=1},
+			{"moreblocks_cactus_checker.png"},
+			S("Cactus Checker"))
+	
+	-- Bricks
+	------------
+	technic.cnc.register_all("moreblocks:cactus_brick",
+			{cracky=3, not_in_creative_inventory=1},
+			{"moreblocks_cactus_brick.png"},
+			S("Cactus Brick"))
+	
+	technic.cnc.register_all("moreblocks:grey_bricks",
+			{cracky=3, not_in_creative_inventory=1},
+			{"moreblocks_grey_bricks.png"},
+			S("Grey Bricks"))
+	
+	-- Metals
+	------------
+	technic.cnc.register_all("moreblocks:copperpatina",
+			{cracky=1, level=2, not_in_creative_inventory=1},
+			{"moreblocks_copperpatina.png"},
+			S("Copper Patina"))
+	
+	-- Clay
+	------------
+	technic.cnc.register_all("bakedclay:red",
+			{cracky=3, not_in_creative_inventory=1},
+			{"baked_clay_red.png"},
+			S("Red Clay"))
+	
+	technic.cnc.register_all("bakedclay:orange",
+			{cracky=3, not_in_creative_inventory=1},
+			{"baked_clay_orange.png"},
+			S("Orange Clay"))
+	
+	technic.cnc.register_all("bakedclay:grey",
+			{cracky=3, not_in_creative_inventory=1},
+			{"baked_clay_grey.png"},
+			S("Grey Clay"))
+	
+end
diff --git a/technic/machines/register/alloy_recipes.lua b/technic/machines/register/alloy_recipes.lua
index bd09bd6..49c41f4 100644
--- a/technic/machines/register/alloy_recipes.lua
+++ b/technic/machines/register/alloy_recipes.lua
@@ -30,6 +30,12 @@ local recipes = {
 	{"technic:raw_latex 4",           "technic:coal_dust 2",        "technic:rubber 6", 2},
 }
 
+if minetest.get_modpath("ethereal") 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"})
+end
+
 for _, data in pairs(recipes) do
 	technic.register_alloy_recipe({input = {data[1], data[2]}, output = data[3], time = data[4]})
 end
diff --git a/technic/machines/register/compressor_recipes.lua b/technic/machines/register/compressor_recipes.lua
index a625f1a..d516722 100644
--- a/technic/machines/register/compressor_recipes.lua
+++ b/technic/machines/register/compressor_recipes.lua
@@ -17,8 +17,15 @@ local recipes = {
 	{"technic:coal_dust 4",        "technic:graphite"},
 	{"technic:carbon_cloth",       "technic:carbon_plate"},
 	{"technic:uranium35_ingot 5",  "technic:uranium_fuel"},
+	{"technic:graphite 25",        "default:diamond"}
 }
 
+if minetest.get_modpath("ethereal") then
+	-- the density of charcoal is ~1/10 of coal, otherwise it's pure carbon
+	table.insert(recipes, {"ethereal:charcoal_lump 10", "default:coal_lump 1"})
+end
+
+
 -- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner
 minetest.clear_craft({
 	output = "default:sandstone",
diff --git a/technic/machines/register/grinder_recipes.lua b/technic/machines/register/grinder_recipes.lua
index 6a82514..241d2ae 100644
--- a/technic/machines/register/grinder_recipes.lua
+++ b/technic/machines/register/grinder_recipes.lua
@@ -29,6 +29,11 @@ local recipes = {
 	{"default:sandstone",       "default:sand 2"}, -- reverse recipe can be found in the compressor
 }
 
+if minetest.get_modpath("ethereal") then
+	-- the density of charcoal is ~1/10 of coal, otherwise it's the same graphitic carbon
+	table.insert(recipes, {"ethereal:charcoal_lump 5", "technic:coal_dust 1"})
+end
+
 -- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
 minetest.clear_craft({
 	recipe = {
diff --git a/technic/textures/technic_hv_electric_furnace_bottom.png b/technic/textures/technic_hv_electric_furnace_bottom.png
new file mode 100644
index 0000000..3f65026
Binary files /dev/null and b/technic/textures/technic_hv_electric_furnace_bottom.png differ
diff --git a/technic/textures/technic_hv_electric_furnace_front.png b/technic/textures/technic_hv_electric_furnace_front.png
new file mode 100644
index 0000000..e1f9bc5
Binary files /dev/null and b/technic/textures/technic_hv_electric_furnace_front.png differ
diff --git a/technic/textures/technic_hv_electric_furnace_front_active.png b/technic/textures/technic_hv_electric_furnace_front_active.png
new file mode 100644
index 0000000..1baeade
Binary files /dev/null and b/technic/textures/technic_hv_electric_furnace_front_active.png differ
diff --git a/technic/textures/technic_hv_electric_furnace_side.png b/technic/textures/technic_hv_electric_furnace_side.png
new file mode 100644
index 0000000..c30a09e
Binary files /dev/null and b/technic/textures/technic_hv_electric_furnace_side.png differ
diff --git a/technic/textures/technic_hv_electric_furnace_side_tube.png b/technic/textures/technic_hv_electric_furnace_side_tube.png
new file mode 100644
index 0000000..f94c057
Binary files /dev/null and b/technic/textures/technic_hv_electric_furnace_side_tube.png differ
diff --git a/technic/textures/technic_hv_electric_furnace_top.png b/technic/textures/technic_hv_electric_furnace_top.png
new file mode 100644
index 0000000..e3d4195
Binary files /dev/null and b/technic/textures/technic_hv_electric_furnace_top.png differ
-- 
cgit v1.2.3