Vanessa Ezekowitz
2015-01-17 d6b0deb989e649e2800932d4a587c3ba9e3e24c7
technic/tools/tree_tap.lua
@@ -8,10 +8,6 @@
      if pointed_thing.type ~= "node" then
         return
      end
      local inv = user:get_inventory()
      if not inv:room_for_item("main", ItemStack("technic:raw_latex")) then
         return
      end
      local pos = pointed_thing.under
      if minetest.is_protected(pos, user:get_player_name()) then
         minetest.record_protection_violation(pos, user:get_player_name())
@@ -23,8 +19,8 @@
         return
      end
      node.name = "moretrees:rubber_tree_trunk_empty"
      inv:add_item("main", ItemStack("technic:raw_latex"))
      minetest.swap_node(pos, node)
      minetest.handle_node_drops(pointed_thing.above, {"technic:raw_latex"}, user)
      local item_wear = tonumber(itemstack:get_wear())
      item_wear = item_wear + 819
      if item_wear > 65535 then
@@ -65,11 +61,10 @@
   interval = 60,
   chance = 15,
   action = function(pos, node)
      local meta = minetest.get_meta(pos)
      if meta:get_int("placed") ~= 0 then
         return
      if minetest.find_node_near(pos, (moretrees and moretrees.leafdecay_radius) or 5, {"moretrees:rubber_tree_leaves"}) then
         node.name = "moretrees:rubber_tree_trunk"
         minetest.swap_node(pos, node)
      end
      minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"})
   end
})