mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Implement tool use sounds
This commit is contained in:
parent
bbdb1929c6
commit
525fc3833c
6 changed files with 66 additions and 2 deletions
|
@ -136,6 +136,35 @@ minetest.register_tool("soundstuff:breaks", {
|
|||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool("soundstuff:punch_use", {
|
||||
description = "Punch Use Sound Tool\n"..
|
||||
"Digs cracky=3 and more\n"..
|
||||
"Makes a sound when used on node or entity",
|
||||
inventory_image = "soundstuff_node_dig.png",
|
||||
sound = {
|
||||
punch_use = { name = "soundstuff_mono", gain = 1.0 },
|
||||
},
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
cracky={times={[2]=2.00, [3]=1.20}, uses=0, maxlevel=0},
|
||||
choppy={times={[2]=2.00, [3]=1.20}, uses=0, maxlevel=0},
|
||||
snappy={times={[2]=2.00, [3]=1.20}, uses=0, maxlevel=0},
|
||||
crumbly={times={[2]=2.00, [3]=1.20}, uses=0, maxlevel=0},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_tool("soundstuff:punch_use_air", {
|
||||
description = "Punch Use (Air) Sound Tool\n"..
|
||||
"Makes a sound when used pointing at nothing",
|
||||
inventory_image = "soundstuff_node_dig.png",
|
||||
sound = {
|
||||
punch_use_air = { name = "soundstuff_mono", gain = 1.0 },
|
||||
},
|
||||
})
|
||||
|
||||
-- Plays sound repeatedly
|
||||
minetest.register_node("soundstuff:positional", {
|
||||
description = "Positional Sound Node",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue