mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-24 00:49:34 +01:00
Noteblocks play current sound when punched
This commit is contained in:
parent
1466c87e7a
commit
c009dd2466
1 changed files with 4 additions and 1 deletions
|
@ -6,11 +6,14 @@ minetest.register_node("mesecons_noteblock:noteblock", {
|
|||
groups = {handy=1,axey=1, material_wood=1},
|
||||
is_ground_content = false,
|
||||
place_param2 = 0,
|
||||
on_rightclick = function (pos, node) -- change sound when punched
|
||||
on_rightclick = function (pos, node) -- change sound when rightclicked
|
||||
node.param2 = (node.param2+1)%24
|
||||
mesecon.noteblock_play(pos, node.param2)
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
on_punch = function (pos, node) -- play current sound when punched
|
||||
mesecon.noteblock_play(pos, node.param2)
|
||||
end,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
mesecons = {effector = { -- play sound when activated
|
||||
action_on = function (pos, node)
|
||||
|
|
Loading…
Reference in a new issue