Add locking sound

This commit is contained in:
Wuzzy 2022-08-16 09:27:15 +02:00
parent 07906961fb
commit 2158cc6da9
3 changed files with 3 additions and 0 deletions

View File

@ -12,5 +12,7 @@ Source code license: LGPLv2.1
Sound credits:
* locks_unlock.ogg: qubodup (CC0)
Source: <https://freesound.org/people/qubodup/sounds/160215/>
* locks_lock.ogg: kenneyl(CC0)
Source: <https://opengameart.org/content/50-rpg-sound-effects>
* locks_pick.1.ogg to locks_pick.4.ogg: SpaceJoe (CC0)
Source: <https://freesound.org/people/SpaceJoe/sounds/342621/>

View File

@ -205,6 +205,7 @@ local put_lock = function(itemstack, putter, pointed_thing)
end
node.name = "rp_locks:chest"
minetest.swap_node(pos, node)
minetest.sound_play({name="locks_lock",gain=0.5},{pos=pos, max_hear_distance=16}, true)
local meta = minetest.get_meta(pos)
if name ~= "" then
meta:set_string("infotext", S(INFOTEXT_OWNED, name))

Binary file not shown.