forked from MineClone5/MineClone5
Add piston sounds
This commit is contained in:
parent
0e5ecc7624
commit
7cec4c5b7a
|
@ -12,6 +12,7 @@ sfan5: coding, textures
|
||||||
temperest: coding, textures
|
temperest: coding, textures
|
||||||
Jordach: Sounds for the noteblock
|
Jordach: Sounds for the noteblock
|
||||||
minerd247: Some textures
|
minerd247: Some textures
|
||||||
|
suzenako: Piston sounds
|
||||||
...other contributors
|
...other contributors
|
||||||
|
|
||||||
This is a mod for minetest-c55.
|
This is a mod for minetest-c55.
|
||||||
|
@ -22,3 +23,6 @@ You can remove modules of this mod by deleting the mesecons_*
|
||||||
folders in the minetest-mod-mesecons directory.
|
folders in the minetest-mod-mesecons directory.
|
||||||
|
|
||||||
Mod dependencies: none
|
Mod dependencies: none
|
||||||
|
|
||||||
|
Code license: LGPLv3 or later
|
||||||
|
Media license: CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0/>
|
||||||
|
|
|
@ -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)
|
if pushername == pistonspec.pusher then --make sure there actually is a pusher (for compatibility reasons mainly)
|
||||||
minetest.remove_node(pusherpos)
|
minetest.remove_node(pusherpos)
|
||||||
core.check_for_falling(pusherpos)
|
core.check_for_falling(pusherpos)
|
||||||
|
minetest.sound_play("piston_retract", {
|
||||||
|
pos = pos,
|
||||||
|
max_hear_distance = 20,
|
||||||
|
gain = 0.3,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
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(pos, {param2 = node.param2, name = pistonspec.onname})
|
||||||
minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher})
|
minetest.add_node(np, {param2 = node.param2, name = pistonspec.pusher})
|
||||||
mesecon:mvps_process_stack(stack)
|
mesecon:mvps_process_stack(stack)
|
||||||
|
minetest.sound_play("piston_extend", {
|
||||||
|
pos = pos,
|
||||||
|
max_hear_distance = 20,
|
||||||
|
gain = 0.3,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue