ShadowNinja
2013-07-08 19c9a0443b17176a27329b69ee16fe28d7be6fd8
technic/flashlight.lua
@@ -1,7 +1,7 @@
-- original code comes from walkin_light mod by Echo http://minetest.net/forum/viewtopic.php?id=2621
flashlight_max_charge=30000
register_power_tool ("technic:flashlight",flashlight_max_charge)
local flashlight_max_charge=30000
technic.register_LV_power_tool ("technic:flashlight",flashlight_max_charge)
      
minetest.register_tool("technic:flashlight", {
   description = "Flashlight",
@@ -161,7 +161,7 @@
         charge=meta["charge"]
         if charge-2>0 then
          charge =charge-2;   
         set_RE_wear(item,charge,flashlight_max_charge)
         technic.set_RE_wear(item,charge,flashlight_max_charge)
         meta["charge"]=charge
         item["metadata"]=set_item_meta(meta)
         hotbar[i]:replace(item)