Fix item wear.

This commit is contained in:
kpoppel 2013-07-04 19:19:45 +02:00
parent c7207a9cba
commit 6e4ffb4883
2 changed files with 2 additions and 2 deletions

@ -161,7 +161,7 @@ local hotbar=inv:get_list("main")
charge=meta["charge"] charge=meta["charge"]
if charge-2>0 then if charge-2>0 then
charge =charge-2; charge =charge-2;
set_RE_wear(item,charge,flashlight_max_charge) technic.set_RE_wear(item,charge,flashlight_max_charge)
meta["charge"]=charge meta["charge"]=charge
item["metadata"]=set_item_meta(meta) item["metadata"]=set_item_meta(meta)
hotbar[i]:replace(item) hotbar[i]:replace(item)

@ -38,7 +38,7 @@ minetest.register_tool("technic:sonic_screwdriver", {
charge=charge-100; charge=charge-100;
meta1["charge"]=charge meta1["charge"]=charge
item["metadata"]=set_item_meta(meta1) item["metadata"]=set_item_meta(meta1)
set_RE_wear(item,charge,sonic_screwdriver_max_charge) technic.set_RE_wear(item,charge,sonic_screwdriver_max_charge)
itemstack:replace(item) itemstack:replace(item)
end end
return itemstack return itemstack