mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-21 06:55:14 +02:00
Add placement sounds to scaffolding (#4872)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4872 Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land> Co-authored-by: SmokeyDope <smokey@tilde.team> Co-committed-by: SmokeyDope <smokey@tilde.team>
This commit is contained in:
parent
9d2e42165f
commit
94a0a0c008
1 changed files with 8 additions and 0 deletions
|
@ -318,6 +318,10 @@ minetest.register_node(SCAFFOLDING_NAME, {
|
|||
if wdir == 1 then
|
||||
if (anode == "air" or minetest.registered_nodes[anode].buildable_to) and not mcl_bamboo.is_protected(pointed.above, placer) then
|
||||
minetest.set_node(pointed.above, { name = SCAFFOLDING_NAME, param2 = 0 })
|
||||
minetest.sound_play({name="default_wood_footstep", gain=1}, {
|
||||
pos = pos,
|
||||
max_hear_distance = 16,
|
||||
}, true)
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
itemstack:take_item(1)
|
||||
end
|
||||
|
@ -355,6 +359,10 @@ minetest.register_node(SCAFFOLDING_NAME, {
|
|||
|
||||
-- okay, we're good. place the node and take the item unless we are in creative mode.
|
||||
minetest.set_node(pos, node)
|
||||
minetest.sound_play({name="default_wood_footstep", gain=1}, {
|
||||
pos = pos,
|
||||
max_hear_distance = 16,
|
||||
}, true)
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
itemstack:take_item(1)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue