add chest open/close sound
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user