add chest open/close sound
This commit is contained in:
parent
d294ddbda1
commit
73bbe5fb95
1 changed files with 7 additions and 0 deletions
|
|
@ -148,6 +148,9 @@ core.register_node("protector:chest", {
|
|||
.. "listring[current_player;main]"
|
||||
end
|
||||
|
||||
core.sound_play("default_chest_open", {
|
||||
gain = 0.3, pos = pos, max_hear_distance = 10}, true)
|
||||
|
||||
core.show_formspec(clicker:get_player_name(),
|
||||
"protector:chest_" .. core.pos_to_string(pos), formspec)
|
||||
end,
|
||||
|
|
@ -222,6 +225,10 @@ core.register_on_player_receive_fields(function(player, formname, fields)
|
|||
meta:set_string("infotext", S("Protected Chest"))
|
||||
end
|
||||
|
||||
elseif fields.quit then
|
||||
|
||||
core.sound_play("default_chest_close", {
|
||||
gain = 0.3, pos = pos, max_hear_distance = 10}, true)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue