diff options
author | RealBadAngel <mk@realbadangel.pl> | 2013-02-19 23:11:41 +0100 |
---|---|---|
committer | RealBadAngel <mk@realbadangel.pl> | 2013-02-19 23:11:41 +0100 |
commit | 671ba32e5aec9e944dd54699555ebf5a6f7714b9 (patch) | |
tree | ffa29e49aa9666a17e608a4eb22d86616a7d2317 | |
parent | 3a8a4635d7a5af48ab33c73e51c417e8e007c465 (diff) |
Fix to last registered power tool not being able to charge (affected blue energy crystal)
-rw-r--r-- | technic/battery_box.lua | 2 | ||||
-rw-r--r-- | 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 |