Vanessa Dannenberg
2018-10-31 44cb8df048e09b64214f59db73a3fd23cfe12e77
technic/tools/prospector.lua
@@ -1,6 +1,6 @@
local S = technic.getter
technic.register_power_tool("technic:prospector", 15000)
technic.register_power_tool("technic:prospector", 300000)
local function get_metadata(toolstack)
   local m = minetest.deserialize(toolstack:get_metadata())
@@ -28,9 +28,11 @@
         minetest.chat_send_player(user:get_player_name(), "Right-click to set target block type")
         return
      end
      toolmeta.charge = toolmeta.charge - charge_to_take
      toolstack:set_metadata(minetest.serialize(toolmeta))
      technic.set_RE_wear(toolstack, toolmeta.charge, technic.power_tools[toolstack:get_name()])
      if not technic.creative_mode then
         toolmeta.charge = toolmeta.charge - charge_to_take
         toolstack:set_metadata(minetest.serialize(toolmeta))
         technic.set_RE_wear(toolstack, toolmeta.charge, technic.power_tools[toolstack:get_name()])
      end
      local start_pos = pointed_thing.under
      local forward = minetest.facedir_to_dir(minetest.dir_to_facedir(user:get_look_dir(), true))
      local right = forward.x ~= 0 and { x=0, y=1, z=0 } or (forward.y ~= 0 and { x=0, y=0, z=1 } or { x=1, y=0, z=0 })
@@ -120,7 +122,7 @@
   output = "technic:prospector",
   recipe = {
      {"moreores:pick_silver", "moreores:mithril_block", "pipeworks:teleport_tube_1"},
      {"technic:brass_ingot", "technic:control_logic_unit", "technic:brass_ingot"},
      {"", "technic:brass_ingot", ""},
      {"basic_materials:brass_ingot", "technic:control_logic_unit", "basic_materials:brass_ingot"},
      {"", "technic:blue_energy_crystal", ""},
   }
})