diff --git a/data/scenarios/001_yellow_turbans.json b/data/scenarios/001_yellow_turbans.json index 516dc67..cda70e0 100644 --- a/data/scenarios/001_yellow_turbans.json +++ b/data/scenarios/001_yellow_turbans.json @@ -715,6 +715,8 @@ "type": "unit_reaches_tile", "team": "player", "label": "북숲 보급고", + "show_marker": true, + "marker_kind": "supply", "pos": [ 4, 2 @@ -755,6 +757,8 @@ "type": "unit_reaches_tile", "team": "player", "label": "마을 보급", + "show_marker": true, + "marker_kind": "supply", "cells": [ [ 6, diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 6a45b8a..196d867 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -4769,9 +4769,7 @@ func _draw_minimap_event_markers() -> void: if typeof(cell) != TYPE_VECTOR2I or not state.is_inside(cell): continue var marker_rect := _minimap_marker_rect(cell, 1.05, 4.8, 7.0) - draw_rect(marker_rect, Color(0.020, 0.014, 0.010, 0.84)) - draw_rect(marker_rect.grow(-1.0), _minimap_event_marker_fill_color(kind)) - draw_rect(marker_rect, _minimap_marker_outline_color(), false, 1.0) + _draw_minimap_event_marker_shape(marker_rect, kind) func _minimap_marker_rect(cell: Vector2i, scale: float = 1.0, min_size: float = 4.0, max_size: float = 8.0) -> Rect2: @@ -4793,6 +4791,62 @@ func _minimap_event_marker_fill_color(kind: String) -> Color: return Color(color.r, color.g, color.b, 0.90) +func _minimap_event_marker_shape(kind: String) -> String: + var normalized_kind := kind.strip_edges().to_lower() + if normalized_kind == "supply": + return "circle" + if normalized_kind == "tactic": + return "triangle" + if normalized_kind == "gold": + return "diamond" + return "square" + + +func _draw_minimap_event_marker_shape(marker_rect: Rect2, kind: String) -> void: + var shape := _minimap_event_marker_shape(kind) + var fill := _minimap_event_marker_fill_color(kind) + var outline := _minimap_marker_outline_color() + var center := marker_rect.get_center() + var radius := marker_rect.size.x * 0.50 + if shape == "circle": + draw_circle(center, radius * 1.08, outline) + draw_circle(center, radius * 0.72, fill) + elif shape == "triangle": + var points := PackedVector2Array([ + Vector2(center.x, marker_rect.position.y), + Vector2(marker_rect.end.x, marker_rect.end.y), + Vector2(marker_rect.position.x, marker_rect.end.y) + ]) + var inner := PackedVector2Array([ + Vector2(center.x, marker_rect.position.y + marker_rect.size.y * 0.22), + Vector2(marker_rect.end.x - marker_rect.size.x * 0.22, marker_rect.end.y - marker_rect.size.y * 0.16), + Vector2(marker_rect.position.x + marker_rect.size.x * 0.22, marker_rect.end.y - marker_rect.size.y * 0.16) + ]) + draw_colored_polygon(points, outline) + draw_colored_polygon(inner, fill) + draw_polyline(PackedVector2Array([points[0], points[1], points[2], points[0]]), outline, 0.7) + elif shape == "diamond": + var diamond := PackedVector2Array([ + Vector2(center.x, marker_rect.position.y), + Vector2(marker_rect.end.x, center.y), + Vector2(center.x, marker_rect.end.y), + Vector2(marker_rect.position.x, center.y) + ]) + var inner_diamond := PackedVector2Array([ + Vector2(center.x, marker_rect.position.y + marker_rect.size.y * 0.18), + Vector2(marker_rect.end.x - marker_rect.size.x * 0.18, center.y), + Vector2(center.x, marker_rect.end.y - marker_rect.size.y * 0.18), + Vector2(marker_rect.position.x + marker_rect.size.x * 0.18, center.y) + ]) + draw_colored_polygon(diamond, outline) + draw_colored_polygon(inner_diamond, fill) + draw_polyline(PackedVector2Array([diamond[0], diamond[1], diamond[2], diamond[3], diamond[0]]), outline, 0.7) + else: + draw_rect(marker_rect, Color(0.020, 0.014, 0.010, 0.84)) + draw_rect(marker_rect.grow(-1.0), fill) + draw_rect(marker_rect, outline, false, 1.0) + + func _minimap_marker_outline_color() -> Color: return Color(UI_PARCHMENT_TEXT.r, UI_PARCHMENT_TEXT.g, UI_PARCHMENT_TEXT.b, 0.88) diff --git a/tools/smoke_chapter_one_polish.gd b/tools/smoke_chapter_one_polish.gd index 5257a15..b892298 100644 --- a/tools/smoke_chapter_one_polish.gd +++ b/tools/smoke_chapter_one_polish.gd @@ -240,6 +240,7 @@ func _check_minimap_navigation_contract(failures: Array[String]) -> void: "_minimap_marker_rect", "_minimap_objective_marker_fill_color", "_minimap_event_marker_fill_color", + "_minimap_event_marker_shape", "_draw_minimap_objective_markers", "_draw_minimap_event_markers" ]: @@ -307,6 +308,14 @@ func _check_minimap_navigation_contract(failures: Array[String]) -> void: failures.append("minimap event marker should be visible") if not has_event_marker: failures.append("opening map should expose minimap side-event markers") + if scene._minimap_event_marker_shape("supply") != "circle": + failures.append("minimap supply markers should use a distinct circular shape") + if scene._minimap_event_marker_shape("tactic") != "triangle": + failures.append("minimap tactic markers should use a distinct triangular shape") + if scene._minimap_event_marker_shape("gold") != "diamond": + failures.append("minimap gold markers should use a distinct diamond shape") + if scene._minimap_event_marker_shape("event") != "square": + failures.append("minimap generic event markers should fall back to a square shape") var min_offset: Vector2 = scene._clamped_board_scroll_offset(Vector2(-9999.0, -9999.0)) var top_left_offset: Vector2 = scene._board_scroll_offset_for_minimap_position(map_rect.position)