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/battery_box.lua |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua
index 669a06b..953f7af 100644
--- a/technic/machines/register/battery_box.lua
+++ b/technic/machines/register/battery_box.lua
@@ -71,13 +71,21 @@
 		"label[3,0;"..S("Charge").."]"..
 		"label[5,0;"..S("Discharge").."]"..
 		"label[1,3;"..S("Power level").."]"..
-		"list[current_player;main;0,5;8,4;]"
-	
+		"list[current_player;main;0,5;8,4;]"..
+		"listring[current_name;dst]"..
+		"listring[current_player;main]"..
+		"listring[current_name;src]"..
+		"listring[current_player;main]"
+
 	if data.upgrade then
 		formspec = formspec..
 			"list[current_name;upgrade1;3.5,3;1,1;]"..
 			"list[current_name;upgrade2;4.5,3;1,1;]"..
-			"label[3.5,4;"..S("Upgrade Slots").."]"
+			"label[3.5,4;"..S("Upgrade Slots").."]"..
+			"listring[current_name;upgrade1]"..
+			"listring[current_player;main]"..
+			"listring[current_name;upgrade2]"..
+			"listring[current_player;main]"
 	end
 
 	local run = function(pos, node)
@@ -142,8 +150,8 @@
 			.."^[lowpart:"..charge_percent
 			..":technic_power_meter_fg.png]")
 
-		local infotext = S("%s Battery Box: %d/%d"):format(tier,
-				current_charge, max_charge)
+		local infotext = S("@1 Battery Box: @2/@3", tier,
+				technic.pretty_num(current_charge), technic.pretty_num(max_charge))
 		if eu_input == 0 then
 			infotext = S("%s Idle"):format(infotext)
 		end
@@ -151,7 +159,8 @@
 	end
 	
 	for i = 0, 8 do
-		local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1}
+		local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
+				technic_machine=1, ["technic_"..ltier]=1}
 		if i ~= 0 then
 			groups.not_in_creative_inventory = 1
 		end
@@ -170,6 +179,7 @@
 				 "technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png",
 				 "technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"},
 			groups = groups,
+			connect_sides = {"bottom"},
 			tube = data.tube and tube or nil,
 			paramtype2 = "facedir",
 			sounds = default.node_sound_wood_defaults(),
@@ -195,6 +205,8 @@
 			allow_metadata_inventory_take = technic.machine_inventory_take,
 			allow_metadata_inventory_move = technic.machine_inventory_move,
 			technic_run = run,
+			after_place_node = data.tube and pipeworks.after_place,
+			after_dig_node = technic.machine_after_dig_node
 		})
 	end
 

--
Gitblit v1.8.0