From 3792b692aafed0ce6b0092b34278ad391b9eaf27 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Wed, 6 Mar 2013 20:51:57 -0500 Subject: Digging and footstep sounds for everything that needs them! Plus, pushing buttons, punching switches, and flipping levers all make sounds. --- mesecons_walllever/init.lua | 4 ++++ mesecons_walllever/sounds/mesecons_lever.ogg | Bin 0 -> 6982 bytes 2 files changed, 4 insertions(+) create mode 100644 mesecons_walllever/sounds/mesecons_lever.ogg (limited to 'mesecons_walllever') diff --git a/mesecons_walllever/init.lua b/mesecons_walllever/init.lua index 6fc0770..df79f33 100644 --- a/mesecons_walllever/init.lua +++ b/mesecons_walllever/init.lua @@ -34,7 +34,9 @@ minetest.register_node("mesecons_walllever:wall_lever_off", { on_punch = function (pos, node) mesecon:swap_node(pos, "mesecons_walllever:wall_lever_on") mesecon:receptor_on(pos, mesecon.rules.buttonlike_get(node)) + minetest.sound_play("mesecons_lever", {pos=pos}) end, + sounds = default.node_sound_wood_defaults(), mesecons = {receptor = { rules = mesecon.rules.buttonlike_get, state = mesecon.state.off @@ -74,7 +76,9 @@ minetest.register_node("mesecons_walllever:wall_lever_on", { on_punch = function (pos, node) mesecon:swap_node(pos, "mesecons_walllever:wall_lever_off") mesecon:receptor_off(pos, mesecon.rules.buttonlike_get(node)) + minetest.sound_play("mesecons_lever", {pos=pos}) end, + sounds = default.node_sound_wood_defaults(), mesecons = {receptor = { rules = mesecon.rules.buttonlike_get, state = mesecon.state.on diff --git a/mesecons_walllever/sounds/mesecons_lever.ogg b/mesecons_walllever/sounds/mesecons_lever.ogg new file mode 100644 index 0000000..53d45c1 Binary files /dev/null and b/mesecons_walllever/sounds/mesecons_lever.ogg differ -- cgit v1.2.3