Add one-click audio recovery

This commit is contained in:
2026-06-20 04:53:52 +09:00
parent e0b4fed99d
commit 4dcb584f2c
4 changed files with 65 additions and 5 deletions

View File

@@ -122,6 +122,15 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
if persisted_scene.title_bgm_volume_percent != 45 or persisted_scene.title_sfx_volume_percent != 35:
failures.append("title settings volume values should persist into a new scene instance")
persisted_scene.free()
if scene.title_audio_reset_button == null or scene.title_audio_reset_button.text != "소리 켜기":
failures.append("title settings should expose a one-click audio recovery button")
scene._on_title_audio_reset_pressed()
if not scene.title_bgm_enabled or not scene.title_sfx_enabled:
failures.append("title audio recovery should re-enable BGM and SFX")
if scene.title_bgm_volume_percent != 100 or scene.title_sfx_volume_percent != 100:
failures.append("title audio recovery should restore audible volume defaults")
if scene.bgm_player == null or scene.bgm_player.stream == null or scene.current_bgm_key.is_empty():
failures.append("title audio recovery should leave a playable BGM stream selected")
scene._on_title_settings_back_pressed()
if scene.title_settings_panel != null and scene.title_settings_panel.visible:
failures.append("settings back should hide the title settings panel")
@@ -228,6 +237,17 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
failures.append("in-game settings toggles should update the shared settings state")
if scene.title_bgm_volume_percent != 70 or scene.title_sfx_volume_percent != 60:
failures.append("in-game settings sliders should update the shared volume state")
if scene.settings_audio_reset_button == null or scene.settings_audio_reset_button.text != "소리 켜기":
failures.append("in-game settings should expose a one-click audio recovery button")
scene._on_settings_bgm_toggled(false)
scene._on_settings_sfx_toggled(false)
scene._on_settings_bgm_volume_changed(20.0)
scene._on_settings_sfx_volume_changed(15.0)
scene._on_settings_audio_reset_pressed()
if not scene.title_bgm_enabled or not scene.title_sfx_enabled:
failures.append("in-game audio recovery should re-enable BGM and SFX")
if scene.title_bgm_volume_percent != 100 or scene.title_sfx_volume_percent != 100:
failures.append("in-game audio recovery should restore audible volume defaults")
scene._hide_settings_panel()
scene._on_new_campaign_pressed()
if not scene._is_opening_prologue_visible():