From 10307f23a78b33af50dc4a5f3d1baafb4ee4b0d9 Mon Sep 17 00:00:00 2001 From: Maciej 'agaran' Pijanka <agaran@pld-linux.org> Date: Thu, 16 Mar 2017 00:00:22 +0100 Subject: [PATCH] Do not run converters twice. --- technic/machines/register/battery_box.lua | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua index 263b647..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) @@ -143,7 +151,7 @@ ..":technic_power_meter_fg.png]") local infotext = S("@1 Battery Box: @2/@3", tier, - technic.prettynum(current_charge), technic.prettynum(max_charge)) + 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(), -- Gitblit v1.8.0