grinder, recycler: sounds

master
rnd1 2016-04-27 11:37:54 +02:00
parent f08a8be4dc
commit 3a9dbb6834
4 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -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

BIN
sounds/grinder.ogg Normal file

Binary file not shown.

BIN
sounds/recycler.ogg Normal file

Binary file not shown.