master
Zander Marshall 2016-09-26 09:23:17 +10:00
parent deed004c9b
commit c31d443236
1 changed files with 9 additions and 12 deletions

View File

@ -1,18 +1,15 @@
minetest.register_craftitem("stone_extracting:stone_extractor", {
minetest.register_craftitem("taillant:taillant", {
description = "The Taillant",
inventory_image = "stone_extractor.png",
after_use = function(itemstack, user, pointed_thing)
itemstack:add_wear(200)
return itemstack
end
inventory_image = "stone_extractor.png"
})
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
if puncher:get_wielded_item():get_name() == "stone_extracting:stone_extractor"
and node.name ~= "default:stone" then
minetest.add_node(pos, {name="default:cobble"})
puncher:get_inventory():add_item('main', "default:cobble")
if puncher:get_wielded_item():get_name() == "taillant:taillant"
and node.name == "default:stone" then
minetest.remove_node(pos)
minetest.add_node(pos, {name="default:cobble"})
puncher:get_inventory():add_item('main', "default:cobble")
end
end
end)
)