From cd355befdf9c1b11c31a91684255a77dae445af8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 24 Jul 2017 21:26:49 +0200 Subject: [PATCH] Add placement sound for lily pad --- mods/ITEMS/mcl_flowers/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 0c1ab8bf4..6e365b659 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -353,8 +353,13 @@ minetest.register_node("mcl_flowers:waterlily", { (minetest.get_item_group(nodename, "frosted_ice") > 0)) and (def_above.buildable_to and minetest.get_item_group(node_above, "liquid") == 0) then if not minetest.is_protected(pos, player_name) then - minetest.set_node(pos, {name = "mcl_flowers:waterlily", - param2 = math.random(0, 3)}) + minetest.set_node(pos, {name = "mcl_flowers:waterlily", param2 = math.random(0, 3)}) + local idef = itemstack:get_definition() + + if idef.sounds and idef.sounds.place then + minetest.sound_play(idef.sounds.place, {pos=above, gain=1}) + end + if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end