Add portrait battle unit list rows
This commit is contained in:
@@ -3744,6 +3744,16 @@ func _check_battle_unit_list_panel(failures: Array[String]) -> void:
|
||||
failures.append("ally battle unit list should include deployed officers")
|
||||
elif not _row_texts_contain(scene.battle_unit_list_rows, "조조") or not _row_texts_contain(scene.battle_unit_list_rows, "하후돈"):
|
||||
failures.append("ally battle unit list should show Cao Cao and Xiahou Dun")
|
||||
var ally_visible_text := _collect_child_text(scene.battle_unit_list_rows)
|
||||
var ally_tooltips := _collect_child_tooltips(scene.battle_unit_list_rows)
|
||||
if not ally_visible_text.contains("지휘관") or not ally_visible_text.contains("병 ") or not ally_visible_text.contains("좌 "):
|
||||
failures.append("ally battle unit list should show compact class, HP, and position badges: %s" % ally_visible_text)
|
||||
if ally_visible_text.contains("군령:") or ally_visible_text.contains("행군 4") or ally_visible_text.contains("타격 1-1"):
|
||||
failures.append("ally battle unit list rows should keep dense combat detail in hover text: %s" % ally_visible_text)
|
||||
if not ally_tooltips.contains("군세") or not ally_tooltips.contains("클릭하면 이 장수를 선택"):
|
||||
failures.append("ally battle unit list tooltips should retain selection detail: %s" % ally_tooltips)
|
||||
if not _has_descendant_texture(scene.battle_unit_list_rows):
|
||||
failures.append("ally battle unit list should show officer portrait artwork")
|
||||
|
||||
scene._on_battle_unit_list_row_pressed("cao_cao")
|
||||
var selected: Dictionary = scene.state.get_selected_unit()
|
||||
@@ -3759,6 +3769,16 @@ func _check_battle_unit_list_panel(failures: Array[String]) -> void:
|
||||
failures.append("enemy battle unit list should show living enemies")
|
||||
elif not _row_texts_contain(scene.battle_unit_list_rows, "장만성"):
|
||||
failures.append("enemy battle unit list should include the enemy commander")
|
||||
var enemy_visible_text := _collect_child_text(scene.battle_unit_list_rows)
|
||||
var enemy_tooltips := _collect_child_tooltips(scene.battle_unit_list_rows)
|
||||
if not enemy_visible_text.contains("적") or not enemy_visible_text.contains("병 ") or not enemy_visible_text.contains("좌 "):
|
||||
failures.append("enemy battle unit list should show compact status badges: %s" % enemy_visible_text)
|
||||
if enemy_visible_text.contains("군령:") or enemy_visible_text.contains("직접 명령"):
|
||||
failures.append("enemy battle unit list rows should keep dense enemy detail in hover text: %s" % enemy_visible_text)
|
||||
if not enemy_tooltips.contains("군령: 적군 군기") or not enemy_tooltips.contains("클릭하면 위치로 이동"):
|
||||
failures.append("enemy battle unit list tooltips should retain enemy detail: %s" % enemy_tooltips)
|
||||
if not _has_descendant_texture(scene.battle_unit_list_rows):
|
||||
failures.append("enemy battle unit list should show unit sprite artwork")
|
||||
scene._on_battle_unit_list_row_pressed("yellow_turban_1")
|
||||
selected = scene.state.get_selected_unit()
|
||||
if selected.is_empty() or str(selected.get("id", "")) != "cao_cao":
|
||||
@@ -3775,12 +3795,7 @@ func _check_battle_unit_list_panel(failures: Array[String]) -> void:
|
||||
func _row_texts_contain(container: VBoxContainer, needle: String) -> bool:
|
||||
if container == null:
|
||||
return false
|
||||
for child in container.get_children():
|
||||
if child is Button and str((child as Button).text).contains(needle):
|
||||
return true
|
||||
if child is Label and str((child as Label).text).contains(needle):
|
||||
return true
|
||||
return false
|
||||
return _collect_child_text(container).contains(needle)
|
||||
|
||||
|
||||
func _check_action_button_disabled_reasons(failures: Array[String]) -> void:
|
||||
|
||||
Reference in New Issue
Block a user