Skip to content
Snippets Groups Projects
Commit c33c1bb1 authored by Peter Nerlich's avatar Peter Nerlich
Browse files

improve salad pick to break on use without destroying any blocks

parent a0f0a70b
No related branches found
No related tags found
No related merge requests found
local break_immediately = {times = {[3] = 0.01}, uses = 1, leveldiff = 0, maxlevel = 0}
minetest.register_tool("kif_custom:pick_salad", {
description = "Pickaxe from questionable quality",
description = "Pickaxe of questionable quality",
inventory_image = "kif_custom_tool_picksalad.png",
tool_capabilities = {
max_drop_level = 0,
groupcaps = {
crumbly = break_immediately,
cracky = break_immediately,
snappy = break_immediately,
choppy = break_immediately,
fleshy = break_immediately,
explody = break_immediately,
oddly_breakable_by_hand = break_immediately,
},
},
stack_max = 1,
sound = {breaks = "kif_custom_salad_splotch"},
on_use = function(itemstack, user, pointed_thing)
if user ~= nil then
minetest.sound_play({
name = "kif_custom_salad_splotch",
}, {
object = user
})
end
return ItemStack()
end
})
minetest.register_craft({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment