From 343c7946d9014bf111e25a7a225a1b6f5746992b Mon Sep 17 00:00:00 2001
From: Vanessa Ezekowitz <vanessaezekowitz@gmail.com>
Date: Fri, 10 Mar 2017 20:15:38 +0100
Subject: [PATCH] power monitor changes New textures, uses facedir, connects from the back as well.

---
 technic/machines/LV/solar_panel.lua |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/technic/machines/LV/solar_panel.lua b/technic/machines/LV/solar_panel.lua
index 41dff95..a06ddb8 100644
--- a/technic/machines/LV/solar_panel.lua
+++ b/technic/machines/LV/solar_panel.lua
@@ -4,6 +4,17 @@
 
 local S = technic.getter
 
+
+minetest.register_craft({
+	output = 'technic:solar_panel',
+	recipe = {
+		{'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer'},
+		{'technic:fine_silver_wire',    'technic:lv_cable',            'mesecons_materials:glue'},
+
+	}
+})
+
+
 local run = function(pos, node)
 	-- The action here is to make the solar panel prodice power
 	-- Power is dependent on the light level and the height above ground
@@ -24,7 +35,7 @@
 		local charge_to_give = math.floor((light + pos1.y) * 3)
 		charge_to_give = math.max(charge_to_give, 0)
 		charge_to_give = math.min(charge_to_give, 200)
-		meta:set_string("infotext", S("@1 Active (@2 EU)", machine_name, technic.prettynum(charge_to_give)))
+		meta:set_string("infotext", S("@1 Active (@2 EU)", machine_name, technic.pretty_num(charge_to_give)))
 		meta:set_int("LV_EU_supply", charge_to_give)
 	else
 		meta:set_string("infotext", S("%s Idle"):format(machine_name))
@@ -35,7 +46,9 @@
 minetest.register_node("technic:solar_panel", {
 	tiles = {"technic_solar_panel_top.png",  "technic_solar_panel_bottom.png", "technic_solar_panel_side.png",
 	         "technic_solar_panel_side.png", "technic_solar_panel_side.png",   "technic_solar_panel_side.png"},
-	groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1},
+	groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
+		technic_machine=1, technic_lv=1},
+	connect_sides = {"bottom"},
 	sounds = default.node_sound_wood_defaults(),
     	description = S("Small Solar %s Generator"):format("LV"),
 	active = false,
@@ -52,15 +65,6 @@
 		meta:set_string("infotext", S("Small Solar %s Generator"):format("LV"))
 	end,
 	technic_run = run,
-})
-
-minetest.register_craft({
-	output = 'technic:solar_panel',
-	recipe = {
-		{'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer'},
-		{'technic:fine_silver_wire',    'technic:lv_cable0',           'mesecons_materials:glue'},
-
-	}
 })
 
 technic.register_machine("LV", "technic:solar_panel", technic.producer)

--
Gitblit v1.8.0