summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--technic/battery_box.lua2
-rw-r--r--technic/battery_box_mv.lua2
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