Iconify prebattle prep commands

This commit is contained in:
2026-06-20 00:58:21 +09:00
parent d6029703fe
commit abeca3dbe3
3 changed files with 93 additions and 13 deletions

View File

@@ -3405,12 +3405,13 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
if not scene.briefing_objective_collapsed or scene.battle_started:
failures.append("briefing Escape should collapse conditions before starting battle")
scene.briefing_panel.visible = false
if scene.shop_button == null or scene.shop_button.text != "군상":
failures.append("briefing shop button should use sutler wording")
if scene.talk_button == null or scene.talk_button.text != "군막 회의":
failures.append("briefing talk button should use war council wording")
if scene.formation_button == null or scene.formation_button.text != "진형 배치":
failures.append("briefing formation button should use battle array wording")
_check_prep_menu_icon_button(failures, scene.chapter_button, "군기록", "campaign")
_check_prep_menu_icon_button(failures, scene.shop_button, "군상", "shop")
_check_prep_menu_icon_button(failures, scene.talk_button, "군막 회의", "talk")
_check_prep_menu_icon_button(failures, scene.armory_button, "병장고", "equip")
_check_prep_menu_icon_button(failures, scene.roster_button, "출진 명부", "unit_list")
_check_prep_menu_icon_button(failures, scene.formation_button, "진형 배치", "formation")
_check_prep_menu_icon_button(failures, scene.save_button, "전기록", "save")
if scene.shop_buy_button == null or scene.shop_buy_button.text != "사들이기":
failures.append("briefing shop buy button should avoid modern purchase wording")
if scene.shop_sell_button == null or scene.shop_sell_button.text != "내다팔기":
@@ -3853,6 +3854,20 @@ func _row_texts_contain(container: VBoxContainer, needle: String) -> bool:
return _collect_child_text(container).contains(needle)
func _check_prep_menu_icon_button(failures: Array[String], button: Button, expected_label: String, expected_icon: String) -> void:
if button == null:
failures.append("pre-battle prep button missing: %s" % expected_label)
return
if not bool(button.get_meta("icon_only", false)) or button.text != "":
failures.append("pre-battle prep button should be icon-first without visible text: %s text=%s" % [expected_label, button.text])
if button.icon == null or str(button.get_meta("command_icon", "")) != expected_icon:
failures.append("pre-battle prep button should carry a distinct icon: %s icon=%s meta=%s" % [expected_label, str(button.icon), str(button.get_meta("command_icon", ""))])
if str(button.get_meta("command_label", "")) != expected_label:
failures.append("pre-battle prep button should preserve Korean label in metadata: %s meta=%s" % [expected_label, str(button.get_meta("command_label", ""))])
if str(button.tooltip_text).strip_edges().is_empty() or not str(button.tooltip_text).contains(expected_label):
failures.append("pre-battle prep button should expose its function through hover tooltip: %s tooltip=%s" % [expected_label, str(button.tooltip_text)])
func _check_action_button_disabled_reasons(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
scene.wait_button = Button.new()