Make battle unit list HP visual

This commit is contained in:
2026-06-20 10:48:21 +09:00
parent 6e4f663deb
commit 930329091d
2 changed files with 39 additions and 8 deletions

View File

@@ -4469,8 +4469,12 @@ func _check_battle_unit_list_panel(failures: Array[String]) -> void:
var ally_visible_text := _collect_child_text(scene.battle_unit_list_rows)
var ally_badge_text := _collect_descendant_text_by_name(scene.battle_unit_list_rows, "BattleUnitListBadgeLabel")
var ally_tooltips := _collect_child_tooltips(scene.battle_unit_list_rows)
if not ally_badge_text.contains("100%") or not ally_badge_text.contains("서측"):
failures.append("ally battle unit list should show compact HP percent and zone badges: %s" % ally_badge_text)
if ally_badge_text.contains("%"):
failures.append("ally battle unit list should move exact HP percent into the hover bar tooltip: %s" % ally_badge_text)
if not ally_badge_text.contains("서측"):
failures.append("ally battle unit list should show compact zone badges: %s" % ally_badge_text)
if _find_descendant_by_name(scene.battle_unit_list_rows, "BattleUnitListHpBar") == null:
failures.append("ally battle unit list should show a visual HP bar instead of inline percent text")
for class_label in ["지휘관", "기병", "보병", "궁병", "책사"]:
if ally_badge_text.contains(class_label):
failures.append("ally battle unit list should move class names into icon hover text: %s" % ally_badge_text)
@@ -4504,8 +4508,12 @@ func _check_battle_unit_list_panel(failures: Array[String]) -> void:
var enemy_visible_text := _collect_child_text(scene.battle_unit_list_rows)
var enemy_badge_text := _collect_descendant_text_by_name(scene.battle_unit_list_rows, "BattleUnitListBadgeLabel")
var enemy_tooltips := _collect_child_tooltips(scene.battle_unit_list_rows)
if not enemy_badge_text.contains("") or not enemy_badge_text.contains("%"):
failures.append("enemy battle unit list should show compact status and HP percent badges: %s" % enemy_badge_text)
if not enemy_badge_text.contains(""):
failures.append("enemy battle unit list should show compact status badges: %s" % enemy_badge_text)
if enemy_badge_text.contains("%"):
failures.append("enemy battle unit list should move exact HP percent into the hover bar tooltip: %s" % enemy_badge_text)
if _find_descendant_by_name(scene.battle_unit_list_rows, "BattleUnitListHpBar") == null:
failures.append("enemy battle unit list should show a visual HP bar instead of inline percent text")
if not enemy_badge_text.contains("성채") and not enemy_badge_text.contains("동측"):
failures.append("enemy battle unit list should show a readable zone badge instead of raw coordinates: %s" % enemy_badge_text)
for class_label in ["지휘관", "기병", "보병", "궁병", "책사"]: