Zefram
2014-08-17 d0efa15b983f7a0a96e1a7abcdad713715dfeeeb
technic/tools/sonic_screwdriver.lua
@@ -7,6 +7,8 @@
minetest.register_tool("technic:sonic_screwdriver", {
   description = S("Sonic Screwdriver"),
   inventory_image = "technic_sonic_screwdriver.png",
   wear_represents = "technic_RE_charge",
   on_refill = technic.refill_RE_charge,
   on_use = function(itemstack, user, pointed_thing)
      -- Must be pointing to facedir applicable node
      if pointed_thing.type ~= "node" then
@@ -30,7 +32,7 @@
      if not meta1 or not meta1.charge then
         return
      end
      if meta1.charge - 100 > 0 then
      if meta1.charge >= 100 then
         minetest.sound_play("technic_sonic_screwdriver",
               {pos = pos, gain = 0.3, max_hear_distance = 10})
         local p = node.param2
@@ -63,9 +65,9 @@
minetest.register_craft({
   output = "technic:sonic_screwdriver",
   recipe = {
      {"default:diamond"},
      {"technic:battery"},
      {"technic:stainless_steel_ingot"}
      {"",                         "default:diamond",        ""},
      {"mesecons_materials:fiber", "technic:battery",        "mesecons_materials:fiber"},
      {"mesecons_materials:fiber", "moreores:mithril_ingot", "mesecons_materials:fiber"}
   }
})