feat(audio): add tap handler and SFX to RoomChest

Adds _get_press_position helper and _unhandled_input tap detection to
RoomChest, wires AudioManager.play_sfx calls for chest_tap and
item_spawn events. Guards AudioManager audio load calls with Dummy
driver check so headless unit tests stay green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Steven Wroblewski
2026-05-10 20:18:16 +02:00
parent bad2fbe65f
commit a220b641ca
3 changed files with 44 additions and 0 deletions
+4
View File
@@ -50,6 +50,8 @@ func _ready() -> void:
func play_floor_music(floor: int) -> void:
if AudioServer.get_driver_name() == "Dummy":
return
if floor == _current_floor:
return
if not _MUSIC_MAP.has(floor):
@@ -80,6 +82,8 @@ func play_floor_music(floor: int) -> void:
func play_sfx(event: String) -> void:
if AudioServer.get_driver_name() == "Dummy":
return
if not _SFX_MAP.has(event):
return
var path: String = _SFX_MAP[event]