From 671ba32e5aec9e944dd54699555ebf5a6f7714b9 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Tue, 19 Feb 2013 23:11:41 +0100 Subject: [PATCH] Fix to last registered power tool not being able to charge (affected blue energy crystal) --- technic/battery_box.lua | 2 +- technic/battery_box_mv.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/technic/battery_box.lua b/technic/battery_box.lua index 3f61221..d36bca1 100644 --- a/technic/battery_box.lua +++ b/technic/battery_box.lua @@ -194,7 +194,7 @@ minetest.register_abm({ if src_item["metadata"]=="" then src_item["metadata"]="0" end --create meta for not used before tool/item local item_max_charge = nil - local counter=registered_power_tools_count-1 + local counter=registered_power_tools_count for i=1, counter,1 do if power_tools[i].tool_name==src_item["name"] then item_max_charge=power_tools[i].max_charge diff --git a/technic/battery_box_mv.lua b/technic/battery_box_mv.lua index ab51e94..b8f4e5e 100644 --- a/technic/battery_box_mv.lua +++ b/technic/battery_box_mv.lua @@ -131,7 +131,7 @@ minetest.register_abm({ if src_item["metadata"]=="" then src_item["metadata"]="0" end --create meta for not used before tool/item local item_max_charge = nil - local counter=registered_power_tools_count-1 + local counter=registered_power_tools_count for i=1, counter,1 do if power_tools[i].tool_name==src_item["name"] then item_max_charge=power_tools[i].max_charge -- 2.30.2