秘宝批T7组E-2:内部标识符全族换词(inventory/unlocked/replace/overlays/slot/settlement use_aux等60+token)+存档键零触碰专项核通过(37文件六键普查零差异,点号访问零存在)+行为探针四件全绿+任务书§1.2基线回填(755/0实测)
This commit is contained in:
1 parent
f8c6db49c6
commit
cd73e62346
21 files changed
+205
-203
No files matched your search
@@ -82,7 +82,7 @@ var tex_base: Texture2D = null # ① 砖面底
|
||||
var tex_mutation: Texture2D = null # ② 变异纹带
|
||||
var tex_glyph: Texture2D = null # ③ 数字
|
||||
var tex_badge: Texture2D = null # ③' 徽章
|
||||
var tex_flag: Texture2D = null: # ④ 旗(T17 修复:槽位可运行时换装〔插旗〕——同族 facade/aux_mark
|
||||
var tex_flag: Texture2D = null: # ④ 旗(T17 修复:槽位可运行时换装〔插旗〕——同族 facade/treasure_mark
|
||||
set(v): # 均 setter 触发重绘;旧普通 var 赋值不重绘=旗插上不显示)
|
||||
if tex_flag != v:
|
||||
tex_flag = v
|
||||
@@ -98,10 +98,10 @@ var facade_strip := false: # E 格开关(BoardView paint 按「已开
|
||||
# 叠加层标记(迭代 7 T4——秘宝板级叠加层的格面呈现;派生信息层零回写):
|
||||
# "mine_reveal" = 真视格(危险红内缩框——「这格是雷」的确定决策标记,插旗照常计费);
|
||||
# "reward_preview" 格不复用本字段——预读徽章走 badge_glyph 注入(board_view refresh 注入 REWARD_BADGE 字形)
|
||||
var aux_mark := "":
|
||||
var treasure_mark := "":
|
||||
set(v):
|
||||
if aux_mark != v:
|
||||
aux_mark = v
|
||||
if treasure_mark != v:
|
||||
treasure_mark = v
|
||||
queue_redraw()
|
||||
var mutation_mark := "":
|
||||
set(v):
|
||||
@@ -213,7 +213,7 @@ func _draw() -> void:
|
||||
# ②' 变异角标(迭代 6 T6):左下角危险红三角(危险红=「开此格有代价」语义位,与雷族同源;
|
||||
# 尺寸随格边比例——灰色可辨辅助=红对砖面明度差,禁喧宾)
|
||||
# ②" 秘宝叠加层(迭代 7 T4):真视格=危险红内缩框(策略纹理——确定决策输入不喧宾)
|
||||
if aux_mark == "mine_reveal":
|
||||
if treasure_mark == "mine_reveal":
|
||||
var inset := edge * 0.14
|
||||
draw_rect(Rect2(inset, inset, edge - inset * 2.0, edge - inset * 2.0),
|
||||
Color(UiKit.RED_MINE, 0.9), false, 2.0)
|
||||
|
||||
@@ -98,8 +98,8 @@ var _minesweeper = null # 排雷玩法 只读查询引用(refresh
|
||||
var _identity_cb := Callable() # 地图战斗资源 身份解析回调(组合根注入只读面)——Vector2i → Dictionary/null
|
||||
var _mask_cb := Callable() # 地形变异 数字遮蔽回调(组合根注入只读面)——Vector2i → bool(true = 该格数字不显示)
|
||||
var _vmark_cb := Callable() # 地形变异 角标回调(迭代 6 T6 只读面)——Vector2i → String("flat_damage"=伤害型变异未开格;""=无)
|
||||
var _aux_reveal := {} # 秘宝 真视集(迭代 7 T4——Vector2i → true;组合根 set_aux_overlays 注入投影)
|
||||
var _aux_preview := {} # 秘宝 预读集(同上——未开格徽章呈现挂点)
|
||||
var _treasure_reveal := {} # 秘宝 真视集(迭代 7 T4——Vector2i → true;组合根 set_treasure_overlays 注入投影)
|
||||
var _treasure_preview := {} # 秘宝 预读集(同上——未开格徽章呈现挂点)
|
||||
var _diggable := {} # 可挖域(8 向相邻未开格)——呼吸微光作用集
|
||||
var _breath_t := 0.0
|
||||
var _contact_unit: Node2D = null # 接触带承载单元(=英雄格 CellUnit;rebuild 随清场复位)
|
||||
@@ -214,13 +214,13 @@ func set_variant_mark_resolver(cb: Callable) -> void:
|
||||
_vmark_cb = cb
|
||||
|
||||
# 秘宝叠加层投影注入(迭代 7 T4——组合根在 use 成功/三清后调;refresh 消费)
|
||||
func set_aux_overlays(reveal_cells: Array, preview_cells: Array) -> void:
|
||||
_aux_reveal.clear()
|
||||
_aux_preview.clear()
|
||||
func set_treasure_overlays(reveal_cells: Array, preview_cells: Array) -> void:
|
||||
_treasure_reveal.clear()
|
||||
_treasure_preview.clear()
|
||||
for c in reveal_cells:
|
||||
_aux_reveal[Vector2i(c)] = true
|
||||
_treasure_reveal[Vector2i(c)] = true
|
||||
for c in preview_cells:
|
||||
_aux_preview[Vector2i(c)] = true
|
||||
_treasure_preview[Vector2i(c)] = true
|
||||
refresh()
|
||||
|
||||
|
||||
@@ -791,8 +791,8 @@ func _paint_cell(c: Vector2i, hero: Vector2i) -> void:
|
||||
# ②( 秘宝叠加层(迭代 7 T4):真视格=红内缩框;预读格=奖励身份徽章(identity_resolver 既有
|
||||
# 只读面取字形——零数据复制,badge 位复用);已开格标记自然退位(refresh 逐拍重算)
|
||||
if not revealed:
|
||||
u.aux_mark = "mine_reveal" if _aux_reveal.has(c) else ""
|
||||
if _aux_preview.has(c) and glyph == "":
|
||||
u.treasure_mark = "mine_reveal" if _treasure_reveal.has(c) else ""
|
||||
if _treasure_preview.has(c) and glyph == "":
|
||||
var pid = _identity_cb.call(c) if _identity_cb.is_valid() else null
|
||||
if pid != null and REWARD_BADGE.has(String(pid.get("cell_type", ""))):
|
||||
glyph = String(REWARD_BADGE[String(pid.get("cell_type", ""))])
|
||||
|
||||
@@ -172,7 +172,7 @@ func show_result(text: String) -> void:
|
||||
visible = true
|
||||
|
||||
|
||||
# 同调位替换子态(aux_replace_presented 到达):items = [{index, item_id, display_name}](组合根
|
||||
# 同调位替换子态(treasure_replace_presented 到达):items = [{index, item_id, display_name}](组合根
|
||||
# 喂显示名)。两路出口:丢旧收新(逐件钮)/ 放弃新件——终态恒 ≤ 同调位由核心受理面保证。
|
||||
func open_replace(items: Array, incoming_name: String, holding: int, slots: int) -> void:
|
||||
_label.text = "同调位已满(%d/%d)——收下「%s」需丢弃一件已有道具,或放弃新件" % [holding, slots, incoming_name]
|
||||
|
||||
@@ -14,11 +14,11 @@ const COL_INK := UiKit.INK
|
||||
|
||||
var _atk_label: Label
|
||||
var _armor_label: Label
|
||||
signal aux_slot_clicked(handle: int) # 迭代 7 T4——槽点击(组合根消费:AP 类即用/空间类进选中态)
|
||||
signal treasure_slot_clicked(handle: int) # 迭代 7 T4——槽点击(组合根消费:AP 类即用/空间类进选中态)
|
||||
var item_slots: HBoxContainer # 秘宝槽(迭代 7 T4 接线——库存条常读+两步交互第一步)
|
||||
var _slot_panels: Array = [] # 槽 PanelContainer 引用(选中高亮/置灰重刷)
|
||||
var _selected_handle := 0 # 选中态(0=无;组合根回写维持单源)
|
||||
var _slot_handles: Array = [] # 槽位→handle 映射(set_aux_inventory 刷新)
|
||||
var _slot_handles: Array = [] # 槽位→handle 映射(set_treasure_inventory 刷新)
|
||||
var _bonus_section: VBoxContainer # 特性(预留——空态隐藏,接线归大奖励/锻造呈现批)
|
||||
var _bonus_list: VBoxContainer
|
||||
var _relic_section: VBoxContainer # 特性持有段(迭代 12 呈现补齐——空态隐藏)
|
||||
@@ -66,7 +66,7 @@ func _init() -> void:
|
||||
slot.gui_input.connect(func(ev: InputEvent):
|
||||
if ev is InputEventMouseButton and ev.pressed and ev.button_index == MOUSE_BUTTON_LEFT:
|
||||
# 空槽/越界槽点击=取消选中(handle 0);有效槽发其 handle(组合根判 AP 即用/进选中态)
|
||||
aux_slot_clicked.emit(_slot_handles[idx] if idx < _slot_handles.size() else 0))
|
||||
treasure_slot_clicked.emit(_slot_handles[idx] if idx < _slot_handles.size() else 0))
|
||||
item_slots.add_child(slot)
|
||||
_slot_panels.append(slot)
|
||||
|
||||
@@ -166,7 +166,7 @@ func _data_line() -> Label:
|
||||
# 投影行 = {handle, glyph, name, used, usable}(组合根组装:字形=道具名首字;数据源 runner 级库存只读面)。
|
||||
# 空槽=虚位;used=暗态「已用」保留占位(Used 不可逆——受理序展示语义);不可用=置灰(板级零信息);
|
||||
# selected=金框高亮(两步交互第一步的可见态)。tooltip=全名+维度语义。
|
||||
func set_aux_inventory(items: Array, selected_handle: int) -> void:
|
||||
func set_treasure_inventory(items: Array, selected_handle: int) -> void:
|
||||
_selected_handle = selected_handle
|
||||
_slot_handles.clear()
|
||||
for i in 4:
|
||||
|
||||
Reference in new issue
Block a user