diff --git a/homedecor/copyright.txt b/homedecor/copyright.txt index 99b3f1ce..fa4892f0 100644 --- a/homedecor/copyright.txt +++ b/homedecor/copyright.txt @@ -13,4 +13,6 @@ Licenses: http://freesound.org/people/guitarguy1985/sounds/69384/ * For the book sound, Public Domain by mckinneysound's on http://www.freesfx.co.uk/ http://www.freesfx.co.uk/sfx/book?p=3 +* For the phone ring, Public Domain by andyt's on http://www.freesfx.co.uk/ + http://www.freesfx.co.uk/sfx/phone?p=5 * For all images and everything else, WTFPL. diff --git a/homedecor/electronics.lua b/homedecor/electronics.lua index dfb8174d..b67b29a5 100644 --- a/homedecor/electronics.lua +++ b/homedecor/electronics.lua @@ -140,3 +140,15 @@ homedecor.register("telephone", { collision_box = tel_cbox, }) +minetest.register_abm({ + nodenames = "homedecor:telephone", + interval = 30, + chance = 10, + action = function(pos, node) + minetest.sound_play("homedecor_telephone_ringing", { + pos = pos, + gain = 1.0, + max_hear_distance = 10 + }) + end +}) diff --git a/homedecor/sounds/homedecor_telephone_ringing.ogg b/homedecor/sounds/homedecor_telephone_ringing.ogg new file mode 100644 index 00000000..8272ab1f Binary files /dev/null and b/homedecor/sounds/homedecor_telephone_ringing.ogg differ