From d7d5d779854cc32b88e11e8b442d73dcc414b117 Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sat, 20 Jun 2026 06:12:24 +0900 Subject: [PATCH] Use generated panels for target markers --- scripts/scenes/battle_scene.gd | 36 ++++++++++++++++++++++------ tools/smoke_post_move_action_flow.gd | 10 ++++++++ tools/smoke_visual_assets.gd | 6 +++++ 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 164d084..1737af4 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -5884,8 +5884,14 @@ func _draw_target_selection_markers() -> void: draw_rect(rect.grow(-3.0), Color(color.r, color.g, color.b, 0.18)) draw_rect(rect.grow(-6.0), color, false, 2.2) _draw_tile_marker("target", rect, Color(1.0, 1.0, 1.0, 0.72)) - draw_rect(marker_rect, Color(0.025, 0.028, 0.034, 0.88)) - draw_rect(marker_rect, color, false, 1.4) + _draw_generated_badge_panel( + marker_rect, + color, + Color(0.025, 0.028, 0.034, 0.66), + str(marker.get("panel", _target_marker_panel_key())), + 0.08, + 1.2 + ) _draw_target_marker_label(font, marker_rect, str(marker.get("text", "표")), color, str(marker.get("icon", ""))) @@ -5915,8 +5921,15 @@ func _draw_auto_attack_origin_marker(marker: Dictionary, target_color: Color, fo draw_rect(origin_rect.grow(-8.0), Color(move_color.r, move_color.g, move_color.b, 0.17)) draw_rect(origin_rect.grow(-10.0), move_color, false, 1.8) _draw_tile_marker("move", origin_rect, Color(1.0, 1.0, 1.0, 0.56)) - draw_rect(marker_rect, Color(0.025, 0.028, 0.034, 0.86)) - draw_rect(marker_rect, move_color, false, 1.2) + var origin_panel_key := str(marker.get("origin_panel", marker.get("panel", _target_marker_panel_key()))) + _draw_generated_badge_panel( + marker_rect, + move_color, + Color(0.025, 0.028, 0.034, 0.64), + origin_panel_key, + 0.08, + 1.0 + ) _draw_target_marker_label(font, marker_rect, "진", move_color, "move") @@ -6006,6 +6019,10 @@ func _unit_board_panel_key() -> String: return "hud_jade" +func _target_marker_panel_key() -> String: + return "hud_jade" + + func _target_selection_marker_entries() -> Array[Dictionary]: if basic_attack_targeting: return _attack_target_marker_entries() @@ -6042,7 +6059,8 @@ func _attack_target_marker_entries() -> Array[Dictionary]: "target_id": str(target.get("id", "")), "text": marker_text, "kind": marker_kind, - "icon": _target_preview_badge_icon_kind(marker_kind) + "icon": _target_preview_badge_icon_kind(marker_kind), + "panel": _target_marker_panel_key() }) if not basic_attack_targeting and not _has_pending_move(): _append_auto_attack_target_marker_entries(result, selected) @@ -6077,6 +6095,8 @@ func _append_auto_attack_target_marker_entries(result: Array[Dictionary], select "text": "행공", "kind": marker_kind, "icon": _target_preview_badge_icon_kind(marker_kind), + "panel": _target_marker_panel_key(), + "origin_panel": _target_marker_panel_key(), "origin": attack_origin, "requires_move": true, "damage": int(preview.get("damage", 0)), @@ -6111,7 +6131,8 @@ func _skill_target_marker_entries() -> Array[Dictionary]: "target_id": str(target.get("id", "")) if not target.is_empty() else "", "text": str(badge.get("text", "표")), "kind": marker_kind, - "icon": str(badge.get("icon", _target_preview_badge_icon_kind(marker_kind))) + "icon": str(badge.get("icon", _target_preview_badge_icon_kind(marker_kind))), + "panel": _target_marker_panel_key() }) return result @@ -6134,7 +6155,8 @@ func _item_target_marker_entries() -> Array[Dictionary]: "target_id": str(target.get("id", "")) if not target.is_empty() else "", "text": str(badge.get("text", "표")), "kind": marker_kind, - "icon": str(badge.get("icon", _target_preview_badge_icon_kind(marker_kind))) + "icon": str(badge.get("icon", _target_preview_badge_icon_kind(marker_kind))), + "panel": _target_marker_panel_key() }) return result diff --git a/tools/smoke_post_move_action_flow.gd b/tools/smoke_post_move_action_flow.gd index c80968b..5da199e 100644 --- a/tools/smoke_post_move_action_flow.gd +++ b/tools/smoke_post_move_action_flow.gd @@ -502,6 +502,8 @@ func _check_scene_post_move_attack_targeting(failures: Array[String]) -> void: failures.append("attack target markers should include only the reachable enemy: %s" % str(markers)) elif str(markers[0].get("icon", "")).strip_edges().is_empty(): failures.append("attack target markers should carry generated icon hints: %s" % str(markers)) + elif str(markers[0].get("panel", "")) != "hud_jade": + failures.append("attack target markers should carry generated panel metadata: %s" % str(markers)) scene._on_targeting_back_pressed() cao_cao = scene.state.get_unit("cao_cao") @@ -583,6 +585,10 @@ func _check_scene_enemy_click_auto_attack(failures: Array[String]) -> void: failures.append("move+attack marker should flag that movement is required: %s" % str(marker)) if str(marker.get("icon", "")).strip_edges().is_empty(): failures.append("move+attack marker should carry a generated icon hint: %s" % str(marker)) + if str(marker.get("panel", "")) != "hud_jade": + failures.append("move+attack marker should carry generated panel metadata: %s" % str(marker)) + if str(marker.get("origin_panel", "")) != "hud_jade": + failures.append("move+attack origin marker should carry generated panel metadata: %s" % str(marker)) if not found_auto_marker: failures.append("selected unit should mark enemies reachable by move+attack: %s" % str(auto_markers)) scene.hover_cell = Vector2i(4, 3) @@ -867,6 +873,8 @@ func _check_scene_post_move_tactic_picker_flow(failures: Array[String]) -> void: else: if str(tactic_markers[0].get("icon", "")).strip_edges().is_empty(): failures.append("tactic target marker should carry a generated icon hint: %s" % str(tactic_markers[0])) + if str(tactic_markers[0].get("panel", "")) != "hud_jade": + failures.append("tactic target marker should carry generated panel metadata: %s" % str(tactic_markers[0])) if str(tactic_markers[0].get("text", "")) != "퇴각": failures.append("tactic target marker should preview the deterministic KO: %s" % str(tactic_markers[0])) if str(tactic_markers[0].get("kind", "")) != "damage": @@ -967,6 +975,8 @@ func _check_scene_post_move_item_picker_flow(failures: Array[String]) -> void: else: if str(item_markers[0].get("icon", "")).strip_edges().is_empty(): failures.append("item target marker should carry a generated icon hint: %s" % str(item_markers[0])) + if str(item_markers[0].get("panel", "")) != "hud_jade": + failures.append("item target marker should carry generated panel metadata: %s" % str(item_markers[0])) if str(item_markers[0].get("text", "")) != "+20 병력": failures.append("item target marker should preview healing: %s" % str(item_markers[0])) if str(item_markers[0].get("kind", "")) != "heal": diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index 25bf863..b692621 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -3330,6 +3330,10 @@ func _check_hud_focus_text(failures: Array[String]) -> void: failures.append("Board unit nameplate and HP bar should use generated jade panel art") if scene._load_art_texture("res://art/ui/panels/panel_%s.png" % scene._unit_board_panel_key()) == null: failures.append("Board unit nameplate and HP bar should load generated panel texture") + if scene._target_marker_panel_key() != "hud_jade": + failures.append("Battlefield target markers should use generated jade panel art") + if scene._load_art_texture("res://art/ui/panels/panel_%s.png" % scene._target_marker_panel_key()) == null: + failures.append("Battlefield target markers should load generated panel texture") var board_unit_rect: Rect2 = scene._visual_rect_for_unit(cao_cao) var nameplate_rect: Rect2 = scene._unit_nameplate_rect(board_unit_rect) var hp_bar_rect: Rect2 = scene._unit_hp_bar_rect(board_unit_rect) @@ -4407,6 +4411,8 @@ func _check_counter_attack_badge_variants(failures: Array[String]) -> void: var marker_entries := scene._attack_target_marker_entries() if marker_entries.is_empty() or str(marker_entries[0].get("kind", "")) != "counter": failures.append("attack target marker should carry counter kind: %s" % str(marker_entries)) + elif str(marker_entries[0].get("panel", "")) != "hud_jade": + failures.append("attack target marker should carry generated panel metadata: %s" % str(marker_entries)) scene.basic_attack_targeting = false infantry["pos"] = Vector2i(10, 8)