Improve battle notice marker chips
This commit is contained in:
@@ -580,6 +580,12 @@ func _check_battle_start_notice_sequence(failures: Array[String]) -> void:
|
||||
failures.append("battle start notice should not expose raw grid coordinates: %s" % start_notice_text)
|
||||
if scene.objective_notice_icon_strip == null or scene.objective_notice_icon_strip.get_child_count() < 3:
|
||||
failures.append("battle start notice should use generated objective, warning, and marker icons")
|
||||
else:
|
||||
var notice_icon_tooltips := _collect_tooltips(scene.objective_notice_icon_strip)
|
||||
if not notice_icon_tooltips.contains("목표:") or not notice_icon_tooltips.contains("주의:") or not notice_icon_tooltips.contains("유인선") or not notice_icon_tooltips.contains("북숲 보급고") or not notice_icon_tooltips.contains("마을 보급"):
|
||||
failures.append("battle start notice icon hover should explain objective, risk, and tactical markers: %s" % notice_icon_tooltips)
|
||||
if _count_descendants_by_name(scene.objective_notice_icon_strip, "CommandNoticeTileMarkerImage") < 3:
|
||||
failures.append("battle start marker notice chips should layer generated map marker art behind objective/tactic/supply icons")
|
||||
scene.free()
|
||||
|
||||
|
||||
@@ -1971,3 +1977,31 @@ func _check_pixel_unit_idle_state(scene, failures: Array[String]) -> void:
|
||||
failures.append("pixel idle clock should not advance while dialogue is visible")
|
||||
scene.dialogue_panel.free()
|
||||
scene.dialogue_panel = null
|
||||
|
||||
|
||||
func _collect_tooltips(root: Node) -> String:
|
||||
var parts: Array[String] = []
|
||||
_collect_tooltips_into(root, parts)
|
||||
return "\n".join(parts)
|
||||
|
||||
|
||||
func _collect_tooltips_into(root: Node, parts: Array[String]) -> void:
|
||||
if root == null:
|
||||
return
|
||||
if root is Control:
|
||||
var tooltip := str((root as Control).tooltip_text).strip_edges()
|
||||
if not tooltip.is_empty():
|
||||
parts.append(tooltip)
|
||||
for child in root.get_children():
|
||||
_collect_tooltips_into(child, parts)
|
||||
|
||||
|
||||
func _count_descendants_by_name(root: Node, node_name: String) -> int:
|
||||
if root == null:
|
||||
return 0
|
||||
var count := 0
|
||||
for child in root.get_children():
|
||||
if child.name == node_name:
|
||||
count += 1
|
||||
count += _count_descendants_by_name(child, node_name)
|
||||
return count
|
||||
|
||||
Reference in New Issue
Block a user