Show selected unit resources as bars
This commit is contained in:
@@ -67,7 +67,10 @@ func _check_hud_reuses_status_summary(failures: Array[String]) -> void:
|
||||
scene.state.selected_unit_id = "cao_cao"
|
||||
scene.hover_cell = Vector2i(1, 6)
|
||||
scene._update_hud()
|
||||
_check_contains(failures, "selected HUD status", scene.selected_label.text, "상태: 방비 -2 (2회)")
|
||||
if scene.selected_label.text.contains("상태:"):
|
||||
failures.append("selected HUD should keep status effects in tooltip/markers, not visible text: %s" % scene.selected_label.text)
|
||||
_check_contains(failures, "selected HUD status tooltip", scene.selected_label.tooltip_text, "상태: 방비 -2 (2회)")
|
||||
_check_contains(failures, "selected HP bar status tooltip", scene.hud_unit_hp_bar.tooltip_text, "상태: 방비 -2 (2회)")
|
||||
_check_contains(failures, "hover tile tooltip status", scene.cell_info_label.tooltip_text, "상태: 방비 -2 (2회)")
|
||||
scene.state.clear_selection()
|
||||
scene._refresh_ranges()
|
||||
|
||||
@@ -3043,8 +3043,21 @@ func _check_hud_focus_text(failures: Array[String]) -> void:
|
||||
failures.append("Cao Cao HUD focus should include terrain move cost: %s" % cao_text)
|
||||
if not cao_text.contains("방비 +0"):
|
||||
failures.append("Cao Cao HUD focus should include terrain defense: %s" % cao_text)
|
||||
if not cao_summary.contains("군기: 조조") or not cao_summary.contains("병력") or cao_summary.contains("무위") or cao_summary.contains("지형 2,7"):
|
||||
failures.append("Cao Cao visible HUD summary should stay compact while tooltip keeps detail: %s" % cao_summary)
|
||||
if not cao_summary.contains("군기: 조조") or cao_summary.contains("병력") or cao_summary.contains("기력") or cao_summary.contains("무위") or cao_summary.contains("지형 2,7"):
|
||||
failures.append("Cao Cao visible HUD summary should leave resource/detail text to bars and tooltip: %s" % cao_summary)
|
||||
scene._create_hud()
|
||||
scene.battle_started = true
|
||||
scene.state.selected_unit_id = "cao_cao"
|
||||
scene.hover_cell = Vector2i(1, 6)
|
||||
scene._update_hud()
|
||||
if scene.hud_unit_hp_bar == null or int(scene.hud_unit_hp_bar.value) != int(cao_cao.get("hp", 0)) or int(scene.hud_unit_hp_bar.max_value) != int(cao_cao.get("max_hp", 1)):
|
||||
failures.append("selected HUD should expose Cao Cao HP through a resource bar")
|
||||
if scene.hud_unit_mp_bar == null or int(scene.hud_unit_mp_bar.value) != int(cao_cao.get("mp", 0)) or int(scene.hud_unit_mp_bar.max_value) != int(cao_cao.get("max_mp", 0)):
|
||||
failures.append("selected HUD should expose Cao Cao MP through a resource bar")
|
||||
if not scene.hud_unit_hp_bar.tooltip_text.contains("병력") or not scene.hud_unit_hp_bar.tooltip_text.contains("군기: 조조"):
|
||||
failures.append("selected HP bar tooltip should preserve unit detail: %s" % scene.hud_unit_hp_bar.tooltip_text)
|
||||
if scene.selected_label.text.contains("병력") or scene.selected_label.text.contains("기력"):
|
||||
failures.append("selected label should not duplicate HP/MP bars: %s" % scene.selected_label.text)
|
||||
var xiahou_dun: Dictionary = scene.state.get_unit("xiahou_dun")
|
||||
xiahou_dun["pos"] = Vector2i(4, 1)
|
||||
var forest_text := scene._unit_current_terrain_text(xiahou_dun)
|
||||
|
||||
Reference in New Issue
Block a user