Keep dialogue portrait slot stable

This commit is contained in:
2026-06-20 00:33:06 +09:00
parent 84cdbd1ea5
commit b5625b7a27
4 changed files with 25 additions and 7 deletions

View File

@@ -3288,6 +3288,22 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
if scene.dialogue_text_label == null or scene.dialogue_text_label.text != "「군령을 전하라.」":
failures.append("dialogue text should render as a concise quotation scroll")
scene._hide_dialogue_panel()
var narrator_lines := scene._normalized_dialogue_lines([{"text": "성채 위로 먼지가 올랐다."}])
if narrator_lines.is_empty():
failures.append("dialogue normalization should keep narration lines without a speaker")
else:
var portrait_index_before_narration: int = scene.dialogue_row.get_children().find(scene.dialogue_portrait_panel)
scene.active_dialogue_lines = narrator_lines
scene.active_dialogue_index = 0
scene._render_dialogue_line()
if scene.dialogue_portrait_panel == null or not scene.dialogue_portrait_panel.visible:
failures.append("speakerless narration should keep the dialogue portrait slot visible")
if scene.dialogue_portrait_label == null or scene.dialogue_portrait_label.text != "기록":
failures.append("speakerless narration should show a stable record placeholder")
var portrait_index_after_narration: int = scene.dialogue_row.get_children().find(scene.dialogue_portrait_panel)
if portrait_index_after_narration != portrait_index_before_narration:
failures.append("speakerless narration should not move the portrait slot")
scene._hide_dialogue_panel()
var enemy_lines := scene._normalized_dialogue_lines([{"speaker": "Wen Chou", "text": "전진!"}])
if enemy_lines.is_empty() or str((enemy_lines[0] as Dictionary).get("speaker", "")) != "문추":
failures.append("dialogue normalization should localize enemy speaker names")