Fix to last registered power tool not being able to charge (affected blue energy crystal)

This commit is contained in:
RealBadAngel 2013-02-19 23:11:41 +01:00
parent 3a8a4635d7
commit 671ba32e5a
2 changed files with 2 additions and 2 deletions

@ -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

@ -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