Add more node sounds for ocean plants

This commit is contained in:
Wuzzy 2019-12-17 21:43:30 +01:00
parent b81396c03f
commit 5c953b1dc0
2 changed files with 21 additions and 1 deletions

View file

@ -56,6 +56,10 @@ local function coral_on_place(itemstack, placer, pointed_thing)
node_under.param2 = node_under.param2 + 8
end
minetest.set_node(pos_under, node_under)
local def_node = minetest.registered_nodes[node_under.name]
if def_node.sounds then
minetest.sound_play(def_node.sounds.place, { gain = 0.5, pos = pos_under })
end
if not (minetest.settings:get_bool("creative_mode")) then
itemstack:take_item()
end