From 525fc3833c40dcca478719533a87bc7b5e285e4e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 11 Sep 2022 21:16:17 +0200 Subject: Implement tool use sounds --- games/devtest/mods/soundstuff/init.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'games/devtest/mods/soundstuff/init.lua') diff --git a/games/devtest/mods/soundstuff/init.lua b/games/devtest/mods/soundstuff/init.lua index b263a3f35..2523bd302 100644 --- a/games/devtest/mods/soundstuff/init.lua +++ b/games/devtest/mods/soundstuff/init.lua @@ -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", -- cgit v1.2.3