mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Add placement sound to lectern
This commit is contained in:
parent
d83c6fe906
commit
2d6e1c61a2
1 changed files with 9 additions and 0 deletions
|
@ -96,6 +96,15 @@ local lectern_def = {
|
|||
local lectern_node = ItemStack(itemstack)
|
||||
-- Place the node!
|
||||
local _, success = minetest.item_place_node(lectern_node, placer, pointed_thing, fdir)
|
||||
|
||||
-- Add placement sound.
|
||||
local idef = lectern_node:get_definition()
|
||||
if success then
|
||||
if idef.sounds and idef.sounds.place then
|
||||
minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true)
|
||||
end
|
||||
end
|
||||
|
||||
if not success then
|
||||
return itemstack
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue