Add piston sounds
This commit is contained in:
parent
0e5ecc7624
commit
7cec4c5b7a
4 changed files with 14 additions and 0 deletions
|
@ -64,6 +64,11 @@ local piston_remove_pusher = function (pos, node)
|
|||
if pushername == pistonspec.pusher then --make sure there actually is a pusher (for compatibility reasons mainly)
|
||||
minetest.remove_node(pusherpos)
|
||||
core.check_for_falling(pusherpos)
|
||||
minetest.sound_play("piston_retract", {
|
||||
pos = pos,
|
||||
max_hear_distance = 20,
|
||||
gain = 0.3,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -77,6 +82,11 @@ local piston_on = function (pos, node)
|
|||
minetest.add_node(pos, {param2 = node.param2, name = pistonspec.onname})
|
||||
minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher})
|
||||
mesecon:mvps_process_stack(stack)
|
||||
minetest.sound_play("piston_extend", {
|
||||
pos = pos,
|
||||
max_hear_distance = 20,
|
||||
gain = 0.3,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
BIN
mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_extend.ogg
Normal file
BIN
mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_extend.ogg
Normal file
Binary file not shown.
BIN
mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_retract.ogg
Normal file
BIN
mods/ITEMS/REDSTONE/mesecons_pistons/sounds/piston_retract.ogg
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue