fix(t5-hotfix): 奖励节点三选一函数体补落——show_reward_items 在合并时丢失(worktree 内补丁断言中断未写盘+重做轮漏项;探针无路径触达奖励节点 UI 故闸绿实机炸——模拟盲区案底再+1);UiKit.button 单参签名对齐;冒烟复跑绿

This commit is contained in:
DKChan committed 2026-09-29 15:01:55 +08:00
1 parent beea5d6b06
commit 6673bbba5f
1 file changed
+26 -4
+26 -4
View File
@@ -38,10 +38,32 @@ func _init() -> void:
visible = false
func show_reward() -> void:
# 格面资源批(2026-09-15):奖励点内容随可选类道具删除悬置(功能道具渠道 P1 待拍板)——直通节点确认
_label.text = "关卡奖励点\n(节点内容待定——冒险结构/关卡节点地图 定稿批裁决)"
_btn.text = "继续"
# 奖励节点兑付(迭代 7 T5——「节点奖励=功能道具正式渠道」关卡节点地图.md:110 定稿兑现;
# 拍板②丙=三选一呈现:池 ≤3 全列(当前有效道具三件——选一即全列),池扩充后加权摇三)。
# choices = [{item_id, display_name, glyph}](组合根组装——视图纯呈现,选择经信号外发)。
# 选择前「继续」隐藏(强制选择);选择即入库存+屏收。
func show_reward_items(choices: Array) -> void:
for c in _choice_box.get_children():
c.queue_free()
if choices.is_empty():
# 池空(全未解锁/表空合法态)——直通节点确认(切片期合法空态语义保留)
_label.text = "关卡奖励点
(此行无道具可取——继续前行)"
_btn.text = "继续"
_btn.visible = true
_choice_box.visible = false
visible = true
return
_label.text = "关卡奖励点
取一件魔法道具(加入关卡背包——关卡结束清空)"
for ch in choices:
var cid := String(ch.get("item_id", ""))
var btn := UiKit.button("%s %s" % [String(ch.get("glyph", "?")), String(ch.get("display_name", ""))])
btn.custom_minimum_size = Vector2(150, 72)
btn.pressed.connect(func(): item_chosen.emit(cid))
_choice_box.add_child(btn)
_btn.visible = false # 选择前不给出口(强制三选一——构筑点语义)
_choice_box.visible = true
visible = true