From aba54ab228ed4cf2f94b4e2def447764f3727fcb Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Sat, 31 Oct 2026 15:13:32 +0800 Subject: [PATCH] =?UTF-8?q?iter46-=E5=8D=A12=EF=BC=9A=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E8=A1=8C=E6=8F=90=E6=A1=A3FS=5FHINT14+=E5=9C=B0=E5=8F=B0?= =?UTF-8?q?=E8=89=B2=E5=90=88=E5=B9=B6:=20=E9=80=80=E5=BD=B9=E4=B8=A4?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E6=94=B9=E6=8C=87BRICK/PLAZA=5FEDGE+golden?= =?UTF-8?q?=E4=B8=89=E5=BC=A00.00%=E7=95=99=E7=97=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/presentation/views/cell_base_layer.gd | 2 +- game/presentation/views/standee_body.gd | 29 ++++++++------- game/presentation/views/ui_kit.gd | 3 +- game/tests/run_all.gd | 2 +- .../standee_present_values_test.gd | 37 +++++++++++++++++-- 5 files changed, 52 insertions(+), 21 deletions(-) diff --git a/game/presentation/views/cell_base_layer.gd b/game/presentation/views/cell_base_layer.gd index c7465049..40215fc3 100644 --- a/game/presentation/views/cell_base_layer.gd +++ b/game/presentation/views/cell_base_layer.gd @@ -173,7 +173,7 @@ func _draw_south_facade(canvas: CanvasItem, rect: Rect2) -> void: var y_far := rect.size.x - far_h var y_near := y_far - near_h var y_hl := y_near - FACADE_HIGHLIGHT_PX - canvas.draw_rect(Rect2(0.0, y_hl, rect.size.x, FACADE_HIGHLIGHT_PX), UiKit.STAND_STONE_RIM, true) # 口沿高光(UiKit.STAND_STONE_RIM 并档——同值单点) + canvas.draw_rect(Rect2(0.0, y_hl, rect.size.x, FACADE_HIGHLIGHT_PX), UiKit.BRICK, true) # 口沿高光(合并归掩尘枚 BRICK——art-bible §4.1 换色合并①同值单点) canvas.draw_rect(Rect2(0.0, y_near, rect.size.x, near_h), FACADE_NEAR_COL, true) canvas.draw_rect(Rect2(0.0, y_far, rect.size.x, far_h), FACADE_FAR_COL, true) diff --git a/game/presentation/views/standee_body.gd b/game/presentation/views/standee_body.gd index a5a34489..f8c2e6e1 100644 --- a/game/presentation/views/standee_body.gd +++ b/game/presentation/views/standee_body.gd @@ -59,7 +59,8 @@ func intent_probe() -> Dictionary: # 名字行探针出口(ui_probe 呈现口径 + 本批 V6/V8 断言面:armor_icon = 绑定纹理路径〔缺位回退字形〕、 -# 几何 = 素底牌矩形与文字基线、素底色——V6 判据 = baseline_y < plinth_top_y) +# 几何 = 素底牌矩形与文字基线、素底色——V6 判据 = baseline_y < plinth_top_y; +# name_font_size = 名字行字号档实读(迭代 46 卡B——提档 FS_HINT 14 的几何单点出口)) func name_line_probe() -> Dictionary: var f := _efont() var tex := UiKit.load_tex(_armor_tex_path(st._armor)) @@ -69,7 +70,8 @@ func name_line_probe() -> Dictionary: "armor_tex_bound": tex != null, "plate": plate, "baseline_y": _name_baseline(plate).y, "plinth_top_y": _pedestal_rect().position.y, - "plate_color": UiKit.HP_BAR_BACK} + "plate_color": UiKit.HP_BAR_BACK, + "name_font_size": UiKit.FS_HINT} # ---- setter 面(presenter/组合根零改排) ---- @@ -332,15 +334,16 @@ func _name_plate_rect(f: Font, tex: Texture2D) -> Rect2: var icon_w := 24.0 if tex == null: icon_w = f.get_string_size(String(ARMOR_ICONS.get(st._armor, "◇")), - HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_CAPTION).x - var name_w := f.get_string_size(st._display_name, HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_CAPTION).x + HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT).x + var name_w := f.get_string_size(st._display_name, HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT).x var total_w := icon_w + 3.0 + name_w return Rect2((box.x - total_w - 8.0) * 0.5, box.y - 18.0 - 26.0, total_w + 8.0, 26.0) -# 名字行文字基线(牌内几何单点——图标 24px 垂直居中牌内〔中心=牌顶+13〕,12px 字形基线=中心+4) +# 名字行文字基线(牌内几何单点——图标 24px 垂直居中牌内〔中心=牌顶+13〕,14px 字形基线=中心+5 +# (0.35h 规则按字号档推导 14×0.35≈4.9→5,T0 实测校验——迭代 46 卡B §7.4 提档)) func _name_baseline(plate: Rect2) -> Vector2: - return plate.position + Vector2(4.0, 17.0) + return plate.position + Vector2(4.0, 18.0) # 绘制内容矩形(世界局部;ui_struct_probe ⑥standee「不出框+下余量≥8px」断言读数面—— @@ -362,8 +365,8 @@ func _draw() -> void: ## 地面域:椭圆落影(圣经 §6.1 地台落影压脚:方向稿椭圆 (0,0,0,70),压在地台 ## 上缘周围;24 段多边形近似椭圆,中心=台面上方 6px、横半径=台宽一半) ## + 石板地台(§6.1 近景地台独立件:TEX_STAGE_PLAZA 源 48×12 九宫格横向拉伸、顶缘受光线 2px -## 不随拉伸变形、跨三关恒定;素材缺位回退程序化三段绘制〔STAND_STONE 族方向稿取色,几何同源 -## _pedestal_rect——与 panel_skinned 缺位回退同构〕) +## 不随拉伸变形、跨三关恒定;素材缺位回退程序化三段绘制〔板身 STAND_STONE/描边 PLAZA_EDGE/ +## 顶缘线 BRICK——art-bible §4.1 换色合并①②改指目标色,几何同源 _pedestal_rect〕) func _draw_ground(f: Font) -> void: var sh_center := Vector2(box.x * 0.5, box.y - 24.0) var sh_rx := (box.x - 36.0) * 0.5 @@ -379,8 +382,8 @@ func _draw_ground(f: Font) -> void: _draw_plinth_stretched(plaza, ped) else: draw_rect(ped, UiKit.STAND_STONE, true) - draw_rect(ped, UiKit.STAND_STONE_EDGE, false, 1.0) - draw_rect(Rect2(ped.position.x, ped.position.y, ped.size.x, 2.0), UiKit.STAND_STONE_RIM, true) + draw_rect(ped, UiKit.PLAZA_EDGE, false, 1.0) + draw_rect(Rect2(ped.position.x, ped.position.y, ped.size.x, 2.0), UiKit.BRICK, true) ## 地台九宫格横向拉伸域(循环体提函数——左右 4px 端头切片 + 中段拉伸;纵向恒 12px 源档, @@ -464,13 +467,13 @@ func _draw_armor_name_line(f: Font) -> void: draw_texture_rect(tex, Rect2(baseline.x, plate.position.y + 1.0, 24.0, 24.0), false) else: var armor_txt := String(ARMOR_ICONS.get(st._armor, "◇")) - icon_w = f.get_string_size(armor_txt, HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_CAPTION).x + icon_w = f.get_string_size(armor_txt, HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT).x var col: Color = UiKit.WARM_FAINT # 轻甲 = 暖白弱化(v3.5 暗底双色墨制) match st._armor: "ward": col = UiKit.HERO_BLUE_BRIGHT # 魔法护甲 = 小人蓝亮档 "heavy": col = UiKit.GOLD_BRIGHT # 重甲 = 金族亮档 - f.draw_string(get_canvas_item(), baseline, armor_txt, HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_CAPTION, col) + f.draw_string(get_canvas_item(), baseline, armor_txt, HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT, col) f.draw_string(get_canvas_item(), baseline + Vector2(icon_w + 3.0, 0.0), st._display_name, - HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_CAPTION, UiKit.WARM) # v3.5 暗底双色墨制 + HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT, UiKit.WARM) # v3.5 暗底双色墨制 diff --git a/game/presentation/views/ui_kit.gd b/game/presentation/views/ui_kit.gd index 46d93ec3..0f8b3ec8 100644 --- a/game/presentation/views/ui_kit.gd +++ b/game/presentation/views/ui_kit.gd @@ -185,8 +185,7 @@ const TIP_BG := Color(0.16, 0.12, 0.09, 0.96) # tooltip 深底 const STAGE_BG := Color8(62, 52, 42) # B 区舞台暗底(方向稿 render_battle_screen——battle_stage_view 面板底) const BEAM_LIGHT := Color8(255, 236, 200) # B 区顶光柱暖光(用时乘 alpha 渐隐——battle_stage_view 光柱层) const STAND_STONE := Color8(150, 130, 100) # 站桩石板地台·板身(standee_body 方向稿取色) -const STAND_STONE_EDGE := Color8(90, 76, 58) # 站桩石板地台·描边 -const STAND_STONE_RIM := Color8(196, 172, 132) # 站桩石板地台·顶缘受光线 +const PLAZA_EDGE := Color8(76, 64, 56) # 小石台描边(art-bible §4.1 换色合并②合并目标——贴图已落此值,缺位回退同值) const CAMP_HEADER_BAND := Color8(110, 69, 38) # 营地柜台头带深棕 #6E4526(4-camp.png 方向稿取色;对齐 demo --wood-deep) const CAMP_ROW_PLATE := Color8(240, 230, 206) # 营地行板暖米(同上) const CAMP_BADGE_PANEL := Color8(40, 32, 24) # 营地钥石徽暗底(同上) diff --git a/game/tests/run_all.gd b/game/tests/run_all.gd index 189d106d..adc03204 100644 --- a/game/tests/run_all.gd +++ b/game/tests/run_all.gd @@ -188,7 +188,7 @@ func _suites() -> Array: {"path": "res://tests/unit/presentation/pacing_queue_test.gd", "expect": 0}, # AC⑤/T9——排空零分叉/零丢行/延迟双态 {"path": "res://tests/unit/presentation/standee_fx_sweep_test.gd", "expect": 0}, # 呈现域缺陷扫掠(d2 蓄力档/d4 庆祝句柄/d5+d8 互斥/d12 站桩按 id 解析) {"path": "res://tests/unit/presentation/tune_sim_batch_parity_test.gd", "expect": 0}, # 测速循环批双实现对拍(帧索引/运行态/进度串/stats/报告五面——信号步进 vs await 基线) - {"path": "res://tests/unit/presentation/standee_present_values_test.gd", "expect": 0}, # 战斗一屏样张批 V5–V9(血条危险红/名字行素底不压地台/徽标 FS_HINT/护甲 PNG 绑定/素材入包) + {"path": "res://tests/unit/presentation/standee_present_values_test.gd", "expect": 0}, # 战斗一屏样张批 V5–V12(血条危险红/名字行素底不压地台与提档 FS_HINT/徽标/护甲 PNG 绑定/素材入包/地台色合并退役) {"path": "res://tests/unit/presentation/reward_overlay_test.gd", "expect": 0}, # 奖励节点 UI 直验(盲区补漏) {"path": "res://tests/unit/presentation/level_map_info_fog_test.gd", "expect": 0}, # 信息迷雾——呈现显隐/Boss 豁免/详情零显示/大图拟合 {"path": "res://tests/unit/presentation/forge_workbench_test.gd", "expect": 0}, # 工作间两区六路线 UI 直验(V13 自动化前置面) diff --git a/game/tests/unit/presentation/standee_present_values_test.gd b/game/tests/unit/presentation/standee_present_values_test.gd index 144d76e4..80a9a1c2 100644 --- a/game/tests/unit/presentation/standee_present_values_test.gd +++ b/game/tests/unit/presentation/standee_present_values_test.gd @@ -1,12 +1,16 @@ # VERTICAL SLICE - NOT FOR PRODUCTION -# 战斗一屏样张批 V5–V9 断言面(2026-10-29 迭代 43)——五项实装定值的真实入口断言: +# 战斗一屏样张批 V5–V12 断言面(2026-10-29 迭代 43 立五项;2026-10-31 迭代 46 卡B 增 V10–V12)—— +# 实装定值的真实入口断言: # V5 血条填充 = 危险红(UiKit.HP_BAR_FILL 值单点 + 绘制点源码锚:全仓零 #689CE8 与零裸 # Color(0.41,0.61,0.91);条底收 HP_BAR_TRACK 常量); # V6 站桩名字行垫 HP_BAR_BACK 素底且不压地台(名字行基线 y < 地台顶 y——name_line_probe 几何出口); # V7 顺位徽标提档 UiKit.FS_HINT(值断言 + 绘制点源码锚,§7.4 清单外 11–13px 提档); # V8 护甲图标三键(light/ward/heavy)绑对应 24×24 PNG(ResourceLoader 装载结果 + name_line_probe # 绑定面); -# V9 地台件 scene_stage_plaza.png + 护甲三枚入包可加载且尺寸 48×12 / 24×24(§5.2/§5.3 工单)。 +# V9 地台件 scene_stage_plaza.png + 护甲三枚入包可加载且尺寸 48×12 / 24×24(§5.2/§5.3 工单); +# V10 名字行提档 FS_HINT 14(探针 name_font_size 实读 + 两绘制点源码锚 + FS_CAPTION 计数锚==1); +# V11 退役常量不在册 + 掩尘 BRICK 逐位 + 顶缘线/口沿高光两绘制点改指源码锚; +# V12 PLAZA_EDGE 逐位 #4C4038 + 回退描边改指源码锚。 # headless 无渲染面:像素采样以常量单点 + 源码锚 + 探针几何承载(观测面注记,验收对照表 V5 行)。 # 运行:godot --headless --path game --script res://tests/unit/presentation/standee_present_values_test.gd(expect 0) extends SceneTree @@ -48,14 +52,39 @@ func _init() -> void: Rect2(nl.plate).end.y <= float(nl.plinth_top_y) + 0.01) Kit.check("名字行素底 = HP_BAR_BACK 深档 #282220(挂载底色口径)〔样张批 V6〕", Color(nl.plate_color).to_html(false) == "282220") - Kit.check("基线读数与实装几何同源(基线 = 地台顶上方 9px 档:149 < 158)〔样张批 V6〕", - absf(float(nl.baseline_y) - 149.0) < 0.51 and absf(float(nl.plinth_top_y) - 158.0) < 0.51) + Kit.check("基线读数与实装几何同源(基线 = 地台顶上方 8px 档:150 < 158——14px 档牌顶+18)〔样张批 V6〕", + absf(float(nl.baseline_y) - 150.0) < 0.51 and absf(float(nl.plinth_top_y) - 158.0) < 0.51) # ---- V7 顺位徽标提档 FS_HINT ---- Kit.check("FS_HINT = 14(§7.4 六档)〔样张批 V7〕", UiKit.FS_HINT == 14) Kit.check("顺位徽标绘制点取 UiKit.FS_HINT(源码锚)〔样张批 V7〕", body_src.contains("HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT")) + # ---- V10 名字行提档 FS_HINT 14(迭代 46 卡B——五取值点+基线随档联动) ---- + Kit.check("名字行探针字号实读 = FS_HINT(几何单点出口 name_font_size)〔名字行 V10〕", + int(nl.name_font_size) == UiKit.FS_HINT) + Kit.check("名字与护甲两绘制点取 FS_HINT(源码锚——沿 V7 先例)〔名字行 V10〕", + body_src.contains("HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT, UiKit.WARM") + and body_src.contains("HORIZONTAL_ALIGNMENT_LEFT, -1, UiKit.FS_HINT, col")) + Kit.check("全文件 FS_CAPTION 仅剩消散提示一处(计数锚==1——三处宽度测量点强制换代)〔名字行 V10〕", + body_src.count("UiKit.FS_CAPTION") == 1) + + # ---- V11/V12 地台色合并(迭代 46 卡B——常量面载体=Script 常量表,源码锚正证改指目标色) ---- + var uikit_script: Script = load("res://presentation/views/ui_kit.gd") + var cmap: Dictionary = uikit_script.get_script_constant_map() + var cell_src := _read_source("res://presentation/views/cell_base_layer.gd") + Kit.check("退役常量不在册(STAND_STONE_RIM/STAND_STONE_EDGE 零键)〔名字行 V11〕", + not cmap.has("STAND_STONE_RIM") and not cmap.has("STAND_STONE_EDGE")) + Kit.check("掩尘 BRICK 值逐位 #C9AF83(合并目标①)〔名字行 V11〕", + UiKit.BRICK.to_html(false) == "c9af83") + Kit.check("顶缘受光线与口沿高光两绘制点改指 BRICK(源码锚)〔名字行 V11〕", + body_src.contains("ped.size.x, 2.0), UiKit.BRICK, true") + and cell_src.contains("FACADE_HIGHLIGHT_PX), UiKit.BRICK, true")) + Kit.check("PLAZA_EDGE 值逐位 #4C4038(合并目标②)〔名字行 V12〕", + UiKit.PLAZA_EDGE.to_html(false) == "4c4038") + Kit.check("回退描边绘制点改指 PLAZA_EDGE(源码锚)〔名字行 V12〕", + body_src.contains("UiKit.PLAZA_EDGE")) + # ---- V8 护甲图标三键绑 24×24 PNG ---- var armor_paths := {"light": UiKit.TEX_ARMOR_LIGHT, "ward": UiKit.TEX_ARMOR_WARD, "heavy": UiKit.TEX_ARMOR_HEAVY}