From 367a41416bb3367f81e18afdb043cd196dd4f324 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Wed, 5 Jun 2013 16:01:11 -0400 Subject: Fix README a little and add piston sounds by suzenako, contributed by jordan4ibanez. --- mesecons_pistons/init.lua | 10 ++++++++++ mesecons_pistons/sounds/piston_extend.ogg | Bin 0 -> 7060 bytes mesecons_pistons/sounds/piston_retract.ogg | Bin 0 -> 7092 bytes 3 files changed, 10 insertions(+) create mode 100644 mesecons_pistons/sounds/piston_extend.ogg create mode 100644 mesecons_pistons/sounds/piston_retract.ogg (limited to 'mesecons_pistons') diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index 26f2040..f044d5a 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -63,6 +63,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.env:remove_node(pusherpos) + minetest.sound_play("piston_retract", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) nodeupdate(pusherpos) end end @@ -76,6 +81,11 @@ local piston_on = function (pos, node) if success then minetest.env:add_node(pos, {param2 = node.param2, name = pistonspec.onname}) minetest.env:add_node(np, {param2 = node.param2, name = pistonspec.pusher}) + minetest.sound_play("piston_extend", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) mesecon:mvps_process_stack (stack) mesecon:mvps_move_objects (np, dir, oldstack) end diff --git a/mesecons_pistons/sounds/piston_extend.ogg b/mesecons_pistons/sounds/piston_extend.ogg new file mode 100644 index 0000000..e234ad9 Binary files /dev/null and b/mesecons_pistons/sounds/piston_extend.ogg differ diff --git a/mesecons_pistons/sounds/piston_retract.ogg b/mesecons_pistons/sounds/piston_retract.ogg new file mode 100644 index 0000000..feb9f04 Binary files /dev/null and b/mesecons_pistons/sounds/piston_retract.ogg differ -- cgit v1.2.3