From 0a23b8aa751b2461addc34be30eb33489cd9d31f Mon Sep 17 00:00:00 2001 From: Wickedness Date: Fri, 19 Jun 2026 12:12:10 +0900 Subject: [PATCH] Deepen ancient briefing map styling --- scripts/scenes/battle_scene.gd | 49 +++++++++++++++++++++++++++++++++- tools/smoke_visual_assets.gd | 19 +++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 46bfbc7..0b2a0af 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -844,6 +844,52 @@ func _make_seal_cluster(height: float) -> HBoxContainer: return cluster +func _make_map_lattice_overlay(size: Vector2) -> Control: + var overlay := Control.new() + overlay.name = "MapLatticeOverlay" + overlay.set_anchors_preset(Control.PRESET_FULL_RECT) + overlay.custom_minimum_size = size + overlay.mouse_filter = Control.MOUSE_FILTER_IGNORE + + var silk_wash := ColorRect.new() + silk_wash.name = "SilkMapWash" + silk_wash.set_anchors_preset(Control.PRESET_FULL_RECT) + silk_wash.color = Color(UI_SILK_WASH.r, UI_SILK_WASH.g, UI_SILK_WASH.b, 0.10) + silk_wash.mouse_filter = Control.MOUSE_FILTER_IGNORE + overlay.add_child(silk_wash) + + for fraction in [0.25, 0.50, 0.75]: + var vertical := _make_map_lattice_line(Vector2(size.x * fraction, 0.0), Vector2(1.0, size.y), 0.22) + overlay.add_child(vertical) + for fraction in [0.33, 0.66]: + var horizontal := _make_map_lattice_line(Vector2(0.0, size.y * fraction), Vector2(size.x, 1.0), 0.18) + overlay.add_child(horizontal) + + var corner_specs := [ + {"text": "魏", "pos": Vector2(4, 4)}, + {"text": "令", "pos": Vector2(size.x - 24, 4)}, + {"text": "圖", "pos": Vector2(4, size.y - 24)}, + {"text": "印", "pos": Vector2(size.x - 24, size.y - 24)} + ] + for spec in corner_specs: + var seal := _make_seal_tile(str(spec["text"]), 20) + seal.name = "MapCornerSeal" + seal.position = spec["pos"] + seal.mouse_filter = Control.MOUSE_FILTER_IGNORE + overlay.add_child(seal) + return overlay + + +func _make_map_lattice_line(position: Vector2, size: Vector2, alpha: float) -> ColorRect: + var line := ColorRect.new() + line.position = position + line.size = size + line.custom_minimum_size = size + line.color = Color(UI_INK_WASH.r, UI_INK_WASH.g, UI_INK_WASH.b, alpha) + line.mouse_filter = Control.MOUSE_FILTER_IGNORE + return line + + func _make_section_caption(text: String, width: float = 0.0) -> Control: var panel := PanelContainer.new() panel.custom_minimum_size = Vector2(width, 24) @@ -961,7 +1007,7 @@ func _make_screen_backdrop() -> ColorRect: var backdrop := ColorRect.new() backdrop.visible = false backdrop.set_anchors_preset(Control.PRESET_FULL_RECT) - backdrop.color = Color(0.026, 0.014, 0.006, 0.64) + backdrop.color = Color(0.018, 0.009, 0.004, 0.74) backdrop.mouse_filter = Control.MOUSE_FILTER_IGNORE return backdrop @@ -1493,6 +1539,7 @@ func _create_hud() -> void: briefing_camp_overview_fallback_label.add_theme_font_size_override("font_size", 18) _apply_label_style(briefing_camp_overview_fallback_label, UI_OLD_BRONZE) camp_thumbnail_stack.add_child(briefing_camp_overview_fallback_label) + camp_thumbnail_stack.add_child(_make_map_lattice_overlay(BRIEFING_CAMP_THUMBNAIL_SIZE)) briefing_camp_overview_label = Label.new() briefing_camp_overview_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index 0cafffb..3818bff 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -3110,6 +3110,8 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void: if scene.screen_backdrop == null: failures.append("ancient briefing screen should create an ink-wash backdrop") else: + if scene.screen_backdrop.color.a < 0.70: + failures.append("ink-wash backdrop should darken modern screen edges: %s" % str(scene.screen_backdrop.color)) scene.briefing_panel.visible = true scene.result_panel.visible = false scene._refresh_screen_backdrop_visibility() @@ -3117,6 +3119,11 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void: failures.append("ink-wash backdrop should appear behind briefing documents") scene.briefing_panel.visible = false scene._refresh_screen_backdrop_visibility() + var map_lattice_overlay := _find_descendant_by_name(scene.briefing_camp_overview_panel, "MapLatticeOverlay") + if map_lattice_overlay == null: + failures.append("briefing map thumbnail should carry old silk-map lattice overlay") + elif map_lattice_overlay.get_child_count() < 10: + failures.append("briefing map thumbnail should carry wash, lattice, and four seal corners") _check_seal_ribbon(failures, scene.briefing_seal_ribbon, "briefing seal ribbon") _check_seal_ribbon(failures, scene.dialogue_seal_ribbon, "dialogue seal ribbon") _check_seal_ribbon(failures, scene.result_seal_ribbon, "result seal ribbon") @@ -3364,6 +3371,18 @@ func _colors_nearly_equal(left: Color, right: Color) -> bool: ) +func _find_descendant_by_name(root: Node, node_name: String) -> Node: + if root == null: + return null + if str(root.name).begins_with(node_name): + return root + for child in root.get_children(): + var found := _find_descendant_by_name(child, node_name) + if found != null: + return found + return null + + func _check_action_button_disabled_reasons(failures: Array[String]) -> void: var scene = BattleSceneScript.new() scene.wait_button = Button.new()