From 73bbe5fb95ace0bd2f9a2d21ce75013853a749ca Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 2 Jul 2025 11:20:39 +0100 Subject: [PATCH] add chest open/close sound --- chest.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chest.lua b/chest.lua index df1181a..654993b 100644 --- a/chest.lua +++ b/chest.lua @@ -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)