mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Fix node sounds for item frames
This commit is contained in:
parent
6bcd0f8033
commit
7d228a87bf
1 changed files with 9 additions and 1 deletions
|
@ -43,7 +43,7 @@ local tpl_node = {
|
|||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
sounds = mcl_sounds.node_sound_defaults(),
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
node_placement_prediction = "",
|
||||
_mcl_hardness = 0.5,
|
||||
_mcl_blast_resistance = 0.5,
|
||||
|
@ -146,6 +146,14 @@ function tpl_node.on_construct(pos)
|
|||
inv:set_size("main", 1)
|
||||
end
|
||||
|
||||
-- hack to force the place sound to play
|
||||
function tpl_node.after_place_node(pos, placer, itemstack, pointed_thing)
|
||||
local idef = itemstack:get_definition()
|
||||
if idef and idef.sounds and idef.sounds.place then
|
||||
core.sound_play(idef.sounds.place, {pos = pos}, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- Entity functions
|
||||
function tpl_entity:set_item(itemstack, pos)
|
||||
if not itemstack or not itemstack.get_name then
|
||||
|
|
Loading…
Add table
Reference in a new issue