Add battle turn audio cues
This commit is contained in:
@@ -13,6 +13,7 @@ func _init() -> void:
|
||||
_check_scene_post_move_scrolled_view_positioning(failures)
|
||||
_check_scene_post_move_menu_tracks_map_scroll(failures)
|
||||
_check_scene_input_audio_cues(failures)
|
||||
_check_scene_turn_notice_audio_cues(failures)
|
||||
_check_scene_post_move_text_fit(failures)
|
||||
_check_scene_post_move_blocked_command_labels(failures)
|
||||
_check_scene_post_move_tactic_picker_flow(failures)
|
||||
@@ -84,6 +85,8 @@ func _check_deferred_move_events(failures: Array[String]) -> void:
|
||||
func _check_auto_end_turn_prompt_flow(failures: Array[String]) -> void:
|
||||
var scene = BattleSceneScript.new()
|
||||
scene._create_hud()
|
||||
scene._create_audio()
|
||||
scene.title_sfx_enabled = true
|
||||
if not scene.state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
|
||||
failures.append("could not load opening battle for auto end turn prompt")
|
||||
scene.free()
|
||||
@@ -115,11 +118,18 @@ func _check_auto_end_turn_prompt_flow(failures: Array[String]) -> void:
|
||||
if str(unit.get("team", "")) == BattleStateScript.TEAM_PLAYER and bool(unit.get("alive", true)) and bool(unit.get("deployed", true)) and bool(unit.get("controllable", true)):
|
||||
unit["acted"] = true
|
||||
unit["moved"] = true
|
||||
scene.recent_sfx_keys.clear()
|
||||
scene._update_hud()
|
||||
if not scene.auto_end_turn_prompt_panel.visible:
|
||||
failures.append("auto end turn prompt should appear once every controllable ally has acted")
|
||||
if not scene._is_input_locked():
|
||||
failures.append("auto end turn prompt should lock board input while visible")
|
||||
if not scene.recent_sfx_keys.has("menu_confirm"):
|
||||
failures.append("auto end turn prompt should play a confirmation cue when it first appears: %s" % str(scene.recent_sfx_keys))
|
||||
scene.recent_sfx_keys.clear()
|
||||
scene._update_hud()
|
||||
if not scene.recent_sfx_keys.is_empty():
|
||||
failures.append("auto end turn prompt should not repeat audio while already visible: %s" % str(scene.recent_sfx_keys))
|
||||
|
||||
if not scene._handle_cancel_input():
|
||||
failures.append("right-click cancel should dismiss the auto end turn prompt")
|
||||
@@ -142,6 +152,30 @@ func _check_auto_end_turn_prompt_flow(failures: Array[String]) -> void:
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_scene_turn_notice_audio_cues(failures: Array[String]) -> void:
|
||||
var scene = BattleSceneScript.new()
|
||||
scene._create_hud()
|
||||
scene._create_audio()
|
||||
scene.title_sfx_enabled = true
|
||||
|
||||
scene.recent_sfx_keys.clear()
|
||||
scene._on_log_added("적군 차례가 열렸습니다.")
|
||||
if not scene.recent_sfx_keys.has("guard_block"):
|
||||
failures.append("enemy turn notice should play a warning cue: %s" % str(scene.recent_sfx_keys))
|
||||
|
||||
scene.recent_sfx_keys.clear()
|
||||
scene._on_log_added("아군 차례가 열렸습니다.")
|
||||
if not scene.recent_sfx_keys.has("menu_confirm"):
|
||||
failures.append("player turn notice should play a confirmation cue: %s" % str(scene.recent_sfx_keys))
|
||||
|
||||
scene.title_sfx_enabled = false
|
||||
scene.recent_sfx_keys.clear()
|
||||
scene._on_log_added("아군 차례가 열렸습니다.")
|
||||
if not scene.recent_sfx_keys.is_empty():
|
||||
failures.append("disabled SFX should suppress turn notice audio: %s" % str(scene.recent_sfx_keys))
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_scene_post_move_menu_flow(failures: Array[String]) -> void:
|
||||
var scene = BattleSceneScript.new()
|
||||
scene._create_hud()
|
||||
@@ -320,6 +354,7 @@ func _check_scene_input_audio_cues(failures: Array[String]) -> void:
|
||||
var scene = BattleSceneScript.new()
|
||||
scene._create_hud()
|
||||
scene._create_audio()
|
||||
scene.title_sfx_enabled = true
|
||||
if not scene.state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
|
||||
failures.append("could not load opening battle for input audio cues")
|
||||
scene.free()
|
||||
|
||||
Reference in New Issue
Block a user