From 1c66e4e6c5a3275013e4e42ac173ff2fcb0c8e16 Mon Sep 17 00:00:00 2001 From: capitalthree Date: Thu, 30 Nov 2023 19:32:18 -0600 Subject: [PATCH] do placement sound on overridden stop stone placement behavior --- rules.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rules.lua b/rules.lua index 92392c7..5cc2db4 100644 --- a/rules.lua +++ b/rules.lua @@ -262,7 +262,6 @@ end function lc_liberties.handle_placement(pos) cache = {} --minetest.chat_send_all(tostring(pos)) - --nodecore.node_sound(pos, "dug") local our_stone = check_position(pos) if our_stone:sub(1, 1) ~= "S" then @@ -349,7 +348,11 @@ function lc_liberties.handle_territory_fill(itemstack, placer, pointed_thing) local control = placer.get_player_control and placer:get_player_control() if (control and (control.aux1 or control.sneak)) then - return minetest.item_place(itemstack, placer, pointed_thing) + local ret = minetest.item_place(itemstack, placer, pointed_thing) + if (pointed_thing and pointed_thing.under) then + nodecore.node_sound(pointed_thing.under, "place") + end + return ret end if (pointed_thing and pointed_thing.under) then