标识符面:flag_*→seal_ 族(含 Godot 信号 flag_judged→seal_judged 与连接/回调同名、 FACTS 两键 flags_count→seals_count/dug_under_flag→dug_under_seal 全链、 .tres 键名与 schema .gd 同批同步);显式豁免零改动=size_flags_*(Godot 布局属性)+_fatal_flag。 中文面:金币→GP(金币袋→GP 袋)/插旗→封印/雷格→危险格/惩罚格→危险格/旗→封印·封印印记族, game/ 内 *.gd/.tres/.md/.json 四类禁用词与 flag 双双零命中(V1/V4)。 守卫字面量不动(被检查的禁字不是使用):smoke_all V21 零「雷/旗」检查面、 ui_font_asset_test 字形集攻/雷/旗/封 保持原断言逻辑。 代拍板:板面单字槽 glyph「旗」→「封」(禁字纪律+单字位宽,消费面四处同名随动)。 素材换代(2026-10-18 用户裁案甲):assets/art/board/flag_seal.png→seal_mark.png(素材不入 git, 盘上改名+导入重刷),代码两处 res:// 字符串+COL_FLAG/CURSOR_FLAG 常量同步, 闸件四处随批(run_all_gates.sh/render_gate.sh/golden_baseline_refresh.sh/path_check.py)。 anchor.json 键名手改,重锚与改前改后 diff 随本卡收口(同裁案甲)。 基线读数(改前,主区 ed2dfaf6):冒烟 1151 检查 0 失败/单元 34 套全绿/探针 --click 存量红仅 screen_flow_probe(user:// 断点污染在册已知项)。 改后同批读数(本 worktree):冒烟 1151 检查 0 失败/探针 --click 同一存量红、其余全绿。
85 lines
3.4 KiB
GDScript
85 lines
3.4 KiB
GDScript
## VERTICAL SLICE - NOT FOR PRODUCTION
|
|
## 格态语义图例模态(自持 open/close 开关)。
|
|
class_name LegendOverlay
|
|
extends Control
|
|
|
|
signal closed
|
|
|
|
const ENTRIES := [
|
|
["#C9AF83", "完整覆尘地砖", "未开格——左键挖开(1AP,须相邻)· 右键封印(1AP)"],
|
|
["#B39A78", "碎裂裸土", "已开 0 格——可通行,左键移动(免费)"],
|
|
["#000000", "封印", "封印印记(呈现名·不能拔)——轮末自动判定标中;插错可左键直接挖开(安全格零奖励、危险格吃挖雷惩罚)"],
|
|
["#2e86de", "小人", "探险者——8 向相邻未开格常驻微光 = 可挖域"],
|
|
["#F0A828", "金徽章", "已开格奖励身份 icon(封印之下、数值之上,不进数字区)"],
|
|
["#F0A828", "九徽章解码", "攻=攻击 · 守=护甲 · 爆=爆裂 · 医=回复 · 弱=削弱 · 穿=穿刺 · 魔=魔法 · 行=行动点 · 金=GP(打磨包 2026-09-29 入列)"],
|
|
["#33261B", "状态槽空态", "无状态效果时槽位隐藏,数据框上移补位——非异常"],
|
|
]
|
|
|
|
var _panel: PanelContainer
|
|
|
|
|
|
var _rap_cost := -1 # <0 = 不渲染 RAP 行(打磨包 2026-09-29——构造参数注表值,禁字面量)
|
|
|
|
|
|
func _init(rap_cost: int = -1) -> void:
|
|
_rap_cost = rap_cost
|
|
var shell := UiKit.modal_shell(self, Color(UiKit.DIM, 0.55), Vector2(520, 0), 6, true,
|
|
UiKit.panel_skinned(Vector4(12, 10, 12, 10))) # 石板皮(T2;缺位回退 flat)
|
|
_panel = shell.panel
|
|
(shell.dim as ColorRect).gui_input.connect(_on_dim_gui_input)
|
|
var box: VBoxContainer = shell.box
|
|
var title := UiKit.label("图例 · 格态",UiKit.FS_SUB, true, UiKit.INK_TITLE) # 亮底墨字(§7.2 数据素面)
|
|
box.add_child(title)
|
|
box.add_child(HSeparator.new())
|
|
for e in ENTRIES:
|
|
var row := HBoxContainer.new()
|
|
row.add_theme_constant_override("separation", 8)
|
|
var chip := ColorRect.new()
|
|
chip.custom_minimum_size = Vector2(18, 18)
|
|
chip.color = Color(e[0])
|
|
row.add_child(chip)
|
|
var lab := UiKit.label("%s —— %s" % [e[1], e[2]], 13, false, UiKit.INK_LABEL) # 亮底墨字(§7.2 数据素面)
|
|
lab.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
|
lab.custom_minimum_size = Vector2(440, 0)
|
|
row.add_child(lab)
|
|
box.add_child(row)
|
|
box.add_child(HSeparator.new())
|
|
# RAP 行(打磨包 2026-09-29——表值驱动,禁字面量:刷新代价读行动经济表)
|
|
if _rap_cost >= 0:
|
|
var rap_row := HBoxContainer.new()
|
|
rap_row.add_theme_constant_override("separation", 8)
|
|
var rap_chip := ColorRect.new()
|
|
rap_chip.custom_minimum_size = Vector2(18, 18)
|
|
rap_chip.color = UiKit.GOLD # 同 #F0A828——金徽章同源单点(T4 裸色收口)
|
|
rap_row.add_child(rap_chip)
|
|
var rap_lab := UiKit.label("RAP 储备行动点 —— 停手时剩余 AP 转存;弃图刷新消耗 RAP−%d(旧板封印作废,AP 保留继续挖)" % _rap_cost,UiKit.FS_HINT, false, UiKit.INK_LABEL)
|
|
rap_lab.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
|
rap_lab.custom_minimum_size = Vector2(440, 0)
|
|
rap_row.add_child(rap_lab)
|
|
box.add_child(rap_row)
|
|
box.add_child(HSeparator.new())
|
|
var close_btn := UiKit.button("关闭")
|
|
close_btn.pressed.connect(close)
|
|
box.add_child(close_btn)
|
|
visible = false
|
|
|
|
|
|
func is_open() -> bool:
|
|
return visible
|
|
|
|
|
|
func open() -> void:
|
|
visible = true
|
|
|
|
|
|
func close() -> void:
|
|
if not visible:
|
|
return
|
|
visible = false
|
|
closed.emit()
|
|
|
|
|
|
func _on_dim_gui_input(ev: InputEvent) -> void:
|
|
if ev is InputEventMouseButton and ev.pressed:
|
|
close()
|