diff --git a/grinder.lua b/grinder.lua index 7a9ac52..5a8b425 100644 --- a/grinder.lua +++ b/grinder.lua @@ -105,6 +105,8 @@ local grinder_process = function(pos) --take 1 item from src inventory for each activation stack=stack:take_item(1); inv:remove_item("src", stack) + minetest.sound_play("grinder", {pos=pos,gain=0.5,max_hear_distance = 8,}) + fuel = fuel-def[1]; -- burn fuel meta:set_float("fuel",fuel); meta:set_string("infotext", "fuel status " .. fuel); diff --git a/recycler.lua b/recycler.lua index 65efb84..1fe381d 100644 --- a/recycler.lua +++ b/recycler.lua @@ -102,6 +102,9 @@ local recycler_process = function(pos) --take 1 item from src inventory for each activation stack=stack:take_item(1); inv:remove_item("src", stack) + minetest.sound_play("recycler", {pos=pos,gain=0.5,max_hear_distance = 8,}) + + fuel = fuel-1; -- burn fuel on succesful operation meta:set_float("fuel",fuel); meta:set_string("infotext", "fuel status " .. fuel .. ", recycling " .. meta:get_string("node")); end diff --git a/sounds/grinder.ogg b/sounds/grinder.ogg new file mode 100644 index 0000000..c0f98b2 Binary files /dev/null and b/sounds/grinder.ogg differ diff --git a/sounds/recycler.ogg b/sounds/recycler.ogg new file mode 100644 index 0000000..66630e8 Binary files /dev/null and b/sounds/recycler.ogg differ