salad_pickaxe.lua 671 Bytes
Newer Older
Peter Nerlich's avatar
Peter Nerlich committed
1

Peter Nerlich's avatar
Peter Nerlich committed
2
minetest.register_tool("fsr_custom:pick_salad", {
3
	description = "Pickaxe of questionable quality",
Peter Nerlich's avatar
Peter Nerlich committed
4
	inventory_image = "fsr_custom_tool_picksalad.png",
5
	stack_max = 1,
Peter Nerlich's avatar
Peter Nerlich committed
6
	sound = {breaks = "fsr_custom_salad_splotch"},
7
8
9
	on_use = function(itemstack, user, pointed_thing)
		if user ~= nil then
			minetest.sound_play({
Peter Nerlich's avatar
Peter Nerlich committed
10
				name = "fsr_custom_salad_splotch",
11
12
13
14
15
16
			}, {
				object = user
			})
		end
		return ItemStack()
	end
Peter Nerlich's avatar
Peter Nerlich committed
17
18
})

Peter Nerlich's avatar
Peter Nerlich committed
19
20
fsr.register_craft_if_items_exist({
    output = "fsr_custom:pick_salad",
Peter Nerlich's avatar
Peter Nerlich committed
21
22
23
24
25
26
    recipe = {
        {"farming:potato_salad", "farming:potato_salad", "farming:potato_salad"},
        {"", "default:stick", ""},
        {"", "default:stick", ""}
    }
})