奇物批T2:运行层bonus_*→curio_*全族换词(_curio_pending/deck/taken/result/candidates+pick_curio/apply_node_curio/curio_choice_presented/curio_resolved等+两文件改名curio_interact_controller/curio_pick_overlay含.uid+CurioPickOverlay/CurioInteractController类名);T2裁点甲案自裁=五存档键引号字面量禁改(全仓对拍六形态全等);_bonus_treasure_carry按T0澄清剔除(秘宝语义);非奇物bonus语义保全(加算区bonus/price_level_bonus/attack_bonus/bp_bonus等);reward_overlay_test红转绿适配(M7 bcard换PanelContainer致c is Button恒0——改数_choice_box子节点数断言语义不变,run_all 16套全绿历史首次)
This commit is contained in:
1 parent
d4cde73976
commit
8e2694de49
17 files changed
+298
-299
No files matched your search
@@ -81,7 +81,7 @@ static func boss_name(runner, db) -> String:
|
||||
|
||||
# 三选一停点头部行(回血反馈 + 选择引导;钥石增量行不上本面——单一展示面归战斗总结结算框,
|
||||
# level-clear.md v2 禁入清单口径)
|
||||
static func bonus_pick_header(payload: Dictionary) -> String:
|
||||
static func curio_pick_header(payload: Dictionary) -> String:
|
||||
var lines: Array[String] = ["第 %d 层通过!" % int(payload.get("level_index", 0))]
|
||||
var heal := int(payload.get("heal_gained", 0))
|
||||
if heal > 0:
|
||||
|
||||
+40
-40
@@ -2,17 +2,17 @@
|
||||
# 提升三选一与替换子交互控制器(迭代 13 T4/D4——二期家族① 自 main.gd 迁出;规范 1.1 单一职责):
|
||||
# 三选一停点编排(presented→pick→confirm/refresh→resolved→continue)+ 同调位替换子态
|
||||
#(presented→chosen)+ TP0 令牌池卡片文案装配("kind|tier|relic_id" 复合键)+ 工坊显示名投影。
|
||||
# 装配纪律(ADR-0001,仿 treasure_interact_controller 先例):信号连接不在此发生——bonus_overlay
|
||||
# 装配纪律(ADR-0001,仿 treasure_interact_controller 先例):信号连接不在此发生——curio_overlay
|
||||
# 四信号与 adventure 两信号由组合根接至本类 on_* 入口;模态栈/演播后排窗/呈现刷新/终局面/
|
||||
# 推进失败 fatal 经组合根回调注入;adventure/runner 随局更替——现值回调注入;兑付写调用唯一
|
||||
# 经 adventure.pick_bonus/apply_node_bonus/resolve_bonus_replace(core 侧单口,本类零直写)。
|
||||
# 经 adventure.pick_curio/apply_node_curio/resolve_curio_replace(core 侧单口,本类零直写)。
|
||||
extends RefCounted
|
||||
|
||||
const Narrator := preload("res://presentation/battle_narrator.gd")
|
||||
|
||||
var db
|
||||
var _meta_get: Callable # () → 元进度账本现值(组合根 lambda——探针 isolate_save 换注面,迭代13 T4 实证)
|
||||
var bonus_overlay: BonusPickOverlay
|
||||
var curio_overlay: CurioPickOverlay
|
||||
var end_overlay: BattleEndOverlay
|
||||
var board_view: BoardView
|
||||
var toast: ToastStack
|
||||
@@ -27,20 +27,20 @@ var _refresh_presentations: Callable
|
||||
var _fatal_screen: Callable
|
||||
var _gp_summary: Callable # () → 战斗总结 GP 行文案(组合根 lambda——_last_gain_amount 取数面在根)
|
||||
|
||||
var _pending_bonus := {} # 三选一停点载荷暂存(迭代 10——战斗总结结算确认后开三选一面;续玩停点复用)
|
||||
var _bonus_context := "level_clear" # 三选一面上下文(level_clear=通关停点→推进下一关 / reward_node=奖励节点→回图选路)
|
||||
var _pending_curio := {} # 三选一停点载荷暂存(迭代 10——战斗总结结算确认后开三选一面;续玩停点复用)
|
||||
var _curio_context := "level_clear" # 三选一面上下文(level_clear=通关停点→推进下一关 / reward_node=奖励节点→回图选路)
|
||||
var _last_replace_items: Array = [] # 替换子态续玩重建缓存(treasure_replace_presented 载荷)
|
||||
var _last_replace_incoming := {} # 同上——incoming 记录
|
||||
|
||||
|
||||
func _init(db_ref, meta_get: Callable, bonus_overlay_ref: BonusPickOverlay, end_overlay_ref: BattleEndOverlay,
|
||||
func _init(db_ref, meta_get: Callable, curio_overlay_ref: CurioPickOverlay, end_overlay_ref: BattleEndOverlay,
|
||||
board_view_ref: BoardView, toast_ref: ToastStack, save_get: Callable,
|
||||
adventure_get: Callable, runner_get: Callable, adventure_mode_get: Callable,
|
||||
open_modal: Callable, open_modal_after_playback: Callable, close_modal: Callable,
|
||||
refresh_presentations: Callable, fatal_screen: Callable, gp_summary: Callable) -> void:
|
||||
db = db_ref
|
||||
_meta_get = meta_get
|
||||
bonus_overlay = bonus_overlay_ref
|
||||
curio_overlay = curio_overlay_ref
|
||||
end_overlay = end_overlay_ref
|
||||
board_view = board_view_ref
|
||||
toast = toast_ref
|
||||
@@ -58,12 +58,12 @@ func _init(db_ref, meta_get: Callable, bonus_overlay_ref: BonusPickOverlay, end_
|
||||
|
||||
# 停点在途判据(组合根 _on_battle_end_continue 分派面——战斗总结确认后开三选一)
|
||||
func has_pending() -> bool:
|
||||
return not _pending_bonus.is_empty()
|
||||
return not _pending_curio.is_empty()
|
||||
|
||||
|
||||
# 续玩停点恢复入口(true=已接手呈现,调用方中止后续分派)
|
||||
func resume_if_pending() -> bool:
|
||||
if _pending_bonus.is_empty():
|
||||
if _pending_curio.is_empty():
|
||||
return false
|
||||
show_pick()
|
||||
return true
|
||||
@@ -74,8 +74,8 @@ func resume_if_pending() -> bool:
|
||||
func on_presented(payload: Dictionary) -> void:
|
||||
if int(payload.get("aux_cleared", 0)) > 0:
|
||||
toast.show_toast("上关剩余 %d 件秘宝已随关卡结束清空" % int(payload.get("aux_cleared", 0)), "info") # 迭代 7 T4 清空反馈
|
||||
_pending_bonus = payload.duplicate(true)
|
||||
_bonus_context = "level_clear"
|
||||
_pending_curio = payload.duplicate(true)
|
||||
_curio_context = "level_clear"
|
||||
if bool(payload.get("replace_pending", false)):
|
||||
# 续玩:替换子交互在途中断——重建三选一面后直落替换子态(候选不重抽)
|
||||
show_pick()
|
||||
@@ -88,26 +88,26 @@ func on_presented(payload: Dictionary) -> void:
|
||||
|
||||
|
||||
# 三选一面开出(战斗总结结算确认 / 续玩停点恢复;替换在途由 treasure_replace_presented 续发直落子态)
|
||||
# 奖励节点三选一(迭代 10 追加批——与通关三选一共享同池同权重同上限;BonusPickOverlay 共用面,
|
||||
# 奖励节点三选一(迭代 10 追加批——与通关三选一共享同池同权重同上限;CurioPickOverlay 共用面,
|
||||
# 道具件满位替换子交互同构)。原「秘宝投放渠道」三选一(迭代 7 过渡形态)随批退役。
|
||||
func present_node_bonus() -> void:
|
||||
func present_node_curio() -> void:
|
||||
var adventure = _adventure_get.call()
|
||||
_bonus_context = "reward_node"
|
||||
var node_draw: Dictionary = adventure.node_bonus_candidates()
|
||||
_curio_context = "reward_node"
|
||||
var node_draw: Dictionary = adventure.node_curio_candidates()
|
||||
var node_cands: Array = node_draw.get("candidates", []) as Array
|
||||
_open_modal.call(bonus_overlay)
|
||||
bonus_overlay.open_pick(Narrator.node_bonus_header(), _bonus_card_texts(node_cands, node_draw.get("aux_detail", []) as Array))
|
||||
adventure.present_node_bonus(node_cands, node_draw.get("aux_detail", []) as Array)
|
||||
bonus_overlay.set_refresh_info(adventure.attune_refresh_left()) # 迭代 11 第①批 T5b——刷新余量投喂
|
||||
_open_modal.call(curio_overlay)
|
||||
curio_overlay.open_pick(Narrator.node_bonus_header(), _bonus_card_texts(node_cands, node_draw.get("aux_detail", []) as Array))
|
||||
adventure.present_node_curio(node_cands, node_draw.get("aux_detail", []) as Array)
|
||||
curio_overlay.set_refresh_info(adventure.attune_refresh_left()) # 迭代 11 第①批 T5b——刷新余量投喂
|
||||
|
||||
|
||||
# 三选一面开出(战斗总结结算确认 / 续玩停点恢复;替换在途由 treasure_replace_presented 续发直落子态)
|
||||
func show_pick() -> void:
|
||||
var payload: Dictionary = _pending_bonus
|
||||
_open_modal.call(bonus_overlay)
|
||||
bonus_overlay.open_pick(Narrator.bonus_pick_header(payload), _bonus_card_texts(payload.get("candidates", []) as Array, payload.get("aux_detail", []) as Array))
|
||||
var payload: Dictionary = _pending_curio
|
||||
_open_modal.call(curio_overlay)
|
||||
curio_overlay.open_pick(Narrator.curio_pick_header(payload), _bonus_card_texts(payload.get("candidates", []) as Array, payload.get("aux_detail", []) as Array))
|
||||
var adventure = _adventure_get.call()
|
||||
bonus_overlay.set_refresh_info(adventure.attune_refresh_left() if adventure != null else 0) # 迭代 11 第①批 T5b——刷新余量投喂
|
||||
curio_overlay.set_refresh_info(adventure.attune_refresh_left() if adventure != null else 0) # 迭代 11 第①批 T5b——刷新余量投喂
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
@@ -157,18 +157,18 @@ func _treasure_card_line(iid: String) -> String:
|
||||
return "%s · %s" % [String(row.get("display_name", iid)), " ".join(parts)]
|
||||
|
||||
|
||||
# 三选一刷新(迭代 11 第①批 T5b——P1 甲 X/Y 双源;通关停点经重发 bonus_choice_presented 自然重建,
|
||||
# 三选一刷新(迭代 11 第①批 T5b——P1 甲 X/Y 双源;通关停点经重发 curio_choice_presented 自然重建,
|
||||
# 节点停点在此读在途态重 present——零自动推进契约不破,停点仍在途)
|
||||
func on_refresh() -> void:
|
||||
var adventure = _adventure_get.call()
|
||||
if adventure == null:
|
||||
return
|
||||
if not adventure.refresh_bonus():
|
||||
if not adventure.refresh_curio():
|
||||
return
|
||||
if _bonus_context == "reward_node":
|
||||
var st: Dictionary = adventure.node_bonus_pending_state()
|
||||
bonus_overlay.open_pick(Narrator.node_bonus_header(), _bonus_card_texts(st.get("candidates", []) as Array, st.get("aux_detail", []) as Array))
|
||||
bonus_overlay.set_refresh_info(adventure.attune_refresh_left())
|
||||
if _curio_context == "reward_node":
|
||||
var st: Dictionary = adventure.node_curio_pending_state()
|
||||
curio_overlay.open_pick(Narrator.node_bonus_header(), _bonus_card_texts(st.get("candidates", []) as Array, st.get("aux_detail", []) as Array))
|
||||
curio_overlay.set_refresh_info(adventure.attune_refresh_left())
|
||||
|
||||
|
||||
func on_pick_confirmed(item_id: String) -> void:
|
||||
@@ -180,7 +180,7 @@ func on_pick_confirmed(item_id: String) -> void:
|
||||
var kind := parts[0]
|
||||
var tier := parts[1] if parts.size() > 1 else ""
|
||||
var rid := parts[2] if parts.size() > 2 else ""
|
||||
var ok: bool = adventure.apply_node_bonus(kind, tier, rid) if _bonus_context == "reward_node" else adventure.pick_bonus(kind, tier, rid)
|
||||
var ok: bool = adventure.apply_node_curio(kind, tier, rid) if _curio_context == "reward_node" else adventure.pick_curio(kind, tier, rid)
|
||||
if not ok:
|
||||
push_error("[bonus_interact] 三选一兑付被拒——见输出日志")
|
||||
|
||||
@@ -188,8 +188,8 @@ func on_pick_confirmed(item_id: String) -> void:
|
||||
func on_treasure_replace_presented(items: Array, incoming: Dictionary) -> void:
|
||||
_last_replace_items = items.duplicate(true)
|
||||
_last_replace_incoming = incoming.duplicate(true)
|
||||
if not bonus_overlay.visible:
|
||||
_open_modal.call(bonus_overlay) # 续玩替换在途直落——三选一面未开时先入栈(模态栈纪律)
|
||||
if not curio_overlay.visible:
|
||||
_open_modal.call(curio_overlay) # 续玩替换在途直落——三选一面未开时先入栈(模态栈纪律)
|
||||
_open_replace(items, incoming)
|
||||
|
||||
|
||||
@@ -199,29 +199,29 @@ func _open_replace(items: Array, incoming: Dictionary) -> void:
|
||||
var rec: Dictionary = it.duplicate()
|
||||
rec["display_name"] = String(item_name_lookup().get(String(rec.get("item_id", "")), String(rec.get("item_id", ""))))
|
||||
named.append(rec)
|
||||
bonus_overlay.open_replace(named, String(item_name_lookup().get(String(incoming.get("item_id", "")), String(incoming.get("item_id", "")))),
|
||||
curio_overlay.open_replace(named, String(item_name_lookup().get(String(incoming.get("item_id", "")), String(incoming.get("item_id", "")))),
|
||||
named.size(), Attunement.slots(db, _save_get.call())) # 迭代 11 第①批 T7——呈现读数源切谓词表求值(过渡键退役)
|
||||
|
||||
|
||||
func on_replace_chosen(discard: int) -> void:
|
||||
var adventure = _adventure_get.call()
|
||||
if adventure == null or not adventure.resolve_bonus_replace(discard):
|
||||
if adventure == null or not adventure.resolve_curio_replace(discard):
|
||||
push_error("[bonus_interact] 同调位替换受理被拒——见输出日志")
|
||||
|
||||
|
||||
# 兑付反馈(bonus_resolved 到达——结果行上屏,唯一出口 = 继续)
|
||||
# 兑付反馈(curio_resolved 到达——结果行上屏,唯一出口 = 继续)
|
||||
func on_resolved(result: Dictionary) -> void:
|
||||
_pending_bonus = {}
|
||||
bonus_overlay.show_result(Narrator.bonus_result_text(result))
|
||||
_pending_curio = {}
|
||||
curio_overlay.show_result(Narrator.bonus_result_text(result))
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
# 继续钮:收三选一面 → 上下文分派(通关停点=推进下一关 / 奖励节点=兑付确认回图选路——零自动推进)
|
||||
func on_continue() -> void:
|
||||
_close_modal.call(bonus_overlay)
|
||||
bonus_overlay.close_pick()
|
||||
_close_modal.call(curio_overlay)
|
||||
curio_overlay.close_pick()
|
||||
var adventure = _adventure_get.call()
|
||||
if _bonus_context == "reward_node":
|
||||
if _curio_context == "reward_node":
|
||||
var runner = _runner_get.call()
|
||||
if runner != null:
|
||||
runner.continue_after_node()
|
||||
File renamed without changes.
+19
-19
@@ -38,7 +38,7 @@ const DebugSessionScript := preload("res://presentation/debug_session.gd")
|
||||
const RowPacer := preload("res://presentation/row_pacer.gd") # 结算行排播泵(T3 拆件批)
|
||||
const TreasureInteractController := preload("res://presentation/treasure_interact_controller.gd") # 秘宝两步交互(T3 拆件批)
|
||||
const GpShadowLedgerScript := preload("res://presentation/gp_shadow_ledger.gd") # GP 影子账本(T3 拆件批)
|
||||
const BonusInteractController := preload("res://presentation/bonus_interact_controller.gd") # 三选一与替换子交互(T4/D4 拆件批)
|
||||
const CurioInteractController := preload("res://presentation/curio_interact_controller.gd") # 三选一与替换子交互(T4/D4 拆件批)
|
||||
const CampShopPresenter := preload("res://presentation/camp_shop_presenter.gd") # 营地/商店投影(T4/D4 拆件批)
|
||||
const SaveManagerScript := preload("res://core/save_manager.gd") # 存档承载(preload 避开全局类缓存时序——与 DebugSessionScript 同款)
|
||||
const MetaProgressionScript := preload("res://core/meta_progression.gd") # 元进度账本服务(元进度实现批——同 preload 纪律)
|
||||
@@ -66,7 +66,7 @@ var _settlement_stop_pending: bool: # 挂起态属性化(探针/冒烟直读
|
||||
_settlement_stop_timer.disarm()
|
||||
var _pending_candidates: Array = [] # 结算框挂起期的选路候选暂存(choices_presented 载荷)
|
||||
var _last_gain_amount := 0 # 最近一笔钱包入账(卡⑥ GP 增量取数面——wallet_changed gain 载荷)
|
||||
var bonus_overlay: BonusPickOverlay # 提升三选一覆盖层(迭代 10——level-clear.md v2 选择面承载;追加批起奖励节点共用)
|
||||
var curio_overlay: CurioPickOverlay # 提升三选一覆盖层(迭代 10——level-clear.md v2 选择面承载;追加批起奖励节点共用)
|
||||
var _start_overlay: Control
|
||||
var _end_overlay: BattleEndOverlay
|
||||
var _inter_overlay: Control
|
||||
@@ -91,7 +91,7 @@ var settlement_fx: SettlementFxView # 结算演出覆盖层(跨区弹道
|
||||
# T3 拆件批(2026-10-02)——三件迁出后的组合根持有面(职责见各类头注;装配见 _build_ui)
|
||||
var _row_pacer = null # 结算行排播泵(row_pacer.gd——本类只入队/排空/读队列)
|
||||
var _treasure_ui = null # 秘宝两步交互(treasure_interact_controller.gd——本类只接线与转发意图)
|
||||
var _bonus = null # 三选一与替换子交互(bonus_interact_controller.gd——本类只接线与回调注入)
|
||||
var _bonus = null # 三选一与替换子交互(curio_interact_controller.gd——本类只接线与回调注入)
|
||||
var _camp_pres = null # 营地/商店投影(camp_shop_presenter.gd——本类只接线、探针缝保缝转发)
|
||||
var _gp_ledger := GpShadowLedgerScript.new() # GP 冒险钱包影子账(gp_shadow_ledger.gd——wallet 事件投喂)
|
||||
|
||||
@@ -261,20 +261,20 @@ func _build_ui() -> void:
|
||||
add_child(settings_overlay)
|
||||
settings_overlay.closed.connect(_on_settings_closed)
|
||||
# 提升三选一覆盖层(迭代 10——z 序 = 节点层之上、终局层之下;确认后同拍推进)
|
||||
bonus_overlay = BonusPickOverlay.new()
|
||||
add_child(bonus_overlay)
|
||||
# 提升三选一与替换子交互(T4/D4 拆件批——迁 bonus_interact_controller.gd;本类只接线与回调注入,
|
||||
curio_overlay = CurioPickOverlay.new()
|
||||
add_child(curio_overlay)
|
||||
# 提升三选一与替换子交互(T4/D4 拆件批——迁 curio_interact_controller.gd;本类只接线与回调注入,
|
||||
# ADR-0001——模态栈/演播后排窗/呈现刷新/fatal 经回调注入,adventure/runner 现值回调)
|
||||
_bonus = BonusInteractController.new(db, func() -> Variant: return meta, bonus_overlay, _end_overlay, board_view,
|
||||
_bonus = CurioInteractController.new(db, func() -> Variant: return meta, curio_overlay, _end_overlay, board_view,
|
||||
board_zone.toast, func() -> Variant: return save_manager, func() -> Variant: return adventure,
|
||||
func() -> Variant: return runner, func() -> Variant: return _adventure_mode,
|
||||
_open_modal, _open_modal_after_playback, _close_modal, _refresh_presentations,
|
||||
_fatal_screen, func() -> String: return _gp_summary_text({"gp_dropped": _last_gain_amount}))
|
||||
bonus_overlay.pick_confirmed.connect(_bonus.on_pick_confirmed)
|
||||
bonus_overlay.replace_chosen.connect(_bonus.on_replace_chosen)
|
||||
bonus_overlay.continue_pressed.connect(_bonus.on_continue)
|
||||
bonus_overlay.refresh_requested.connect(_bonus.on_refresh)
|
||||
move_child(bonus_overlay, _end_overlay.get_index())
|
||||
curio_overlay.pick_confirmed.connect(_bonus.on_pick_confirmed)
|
||||
curio_overlay.replace_chosen.connect(_bonus.on_replace_chosen)
|
||||
curio_overlay.continue_pressed.connect(_bonus.on_continue)
|
||||
curio_overlay.refresh_requested.connect(_bonus.on_refresh)
|
||||
move_child(curio_overlay, _end_overlay.get_index())
|
||||
|
||||
var start: Dictionary = UiAssembler.build_start_overlay(self, db)
|
||||
_start_overlay = start.overlay
|
||||
@@ -329,7 +329,7 @@ func _build_ui() -> void:
|
||||
|
||||
# 模态登记(缺陷⑤纪律——登记序 = 树序:含 move_child 调位后的关卡画面/三选一终位)
|
||||
_modals = ModalStack.new()
|
||||
for m: Control in [legend_overlay, node_overlay, level_screen, bonus_overlay, _end_overlay, shop_overlay, camp_overlay, settings_overlay, confirm_dialog, debug_overlay]:
|
||||
for m: Control in [legend_overlay, node_overlay, level_screen, curio_overlay, _end_overlay, shop_overlay, camp_overlay, settings_overlay, confirm_dialog, debug_overlay]:
|
||||
_register_modal(m)
|
||||
_tune_sim = TuneSimController.new(db, debug_overlay, int(db.hero.max_hp))
|
||||
|
||||
@@ -450,8 +450,8 @@ func _wire_adventure() -> void:
|
||||
adventure.choices_presented.connect(_on_choices_presented)
|
||||
adventure.wallet_changed.connect(_on_wallet_changed)
|
||||
# 迭代 10 奖励重构批——big_reward_paid 退役,三选一信号族接线
|
||||
adventure.bonus_choice_presented.connect(_bonus.on_presented)
|
||||
adventure.bonus_resolved.connect(_bonus.on_resolved)
|
||||
adventure.curio_choice_presented.connect(_bonus.on_presented)
|
||||
adventure.curio_resolved.connect(_bonus.on_resolved)
|
||||
adventure.treasure_replace_presented.connect(_bonus.on_treasure_replace_presented)
|
||||
adventure.adventure_finished.connect(_on_adventure_finished)
|
||||
adventure.level_started.connect(_on_adventure_level_started)
|
||||
@@ -505,9 +505,9 @@ func _on_runner_node(node: Dictionary, info: Dictionary) -> void:
|
||||
_show_board_fx_for_node(t)
|
||||
log_view.append_bb(Narrator.node_banner(runner, node, t))
|
||||
elif t == "reward":
|
||||
# 奖励节点三选一(迭代 10 追加批——与通关三选一共享同池同权重同上限;BonusPickOverlay 共用面)。
|
||||
# T4/D4 拆件:呈现编排归 bonus_interact_controller.present_node_bonus(_bonus_context 随迁)。
|
||||
_bonus.present_node_bonus()
|
||||
# 奖励节点三选一(迭代 10 追加批——与通关三选一共享同池同权重同上限;CurioPickOverlay 共用面)。
|
||||
# T4/D4 拆件:呈现编排归 curio_interact_controller.present_node_curio(_curio_context 随迁)。
|
||||
_bonus.present_node_curio()
|
||||
log_view.append_bb(Narrator.reward_line())
|
||||
elif t == "rest":
|
||||
var healed: int = int(info.get("healed", 0))
|
||||
@@ -564,7 +564,7 @@ func _on_battle_end_continue() -> void:
|
||||
_close_modal(_end_overlay)
|
||||
_end_overlay.close()
|
||||
# 迭代 10——三选一停点挂起分支:战斗总结结算(Boss 胜利钥石增量行)确认后进三选一面
|
||||
if _bonus.resume_if_pending(): # T4/D4 拆件——三选一停点在途恢复入口(bonus_interact_controller)
|
||||
if _bonus.resume_if_pending(): # T4/D4 拆件——三选一停点在途恢复入口(curio_interact_controller)
|
||||
return
|
||||
# 卡⑥ 挂起分派:战斗胜利总结结算框的「下一节点」≠ 终局——进选路页(暂存候选恢复呈现)
|
||||
if _settlement_stop_pending:
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
# 同调位替换子交互。高内聚边界:文案拼装归 Narrator(组合根喂入),选择意图经信号外发;
|
||||
# 视图零核心引用。交互范式 = node_overlay choice_box 按钮族 + 选路两段式(点选→确认)复用,零新原语。
|
||||
# 状态机:pick(三卡点选→确认)→ [replace(满位 N+1 选 N)] → result(兑付反馈→继续)。
|
||||
class_name BonusPickOverlay
|
||||
class_name CurioPickOverlay
|
||||
extends Control
|
||||
|
||||
signal pick_confirmed(item_id: String)
|
||||
@@ -162,7 +162,7 @@ func selected_id() -> String:
|
||||
return _selected
|
||||
|
||||
|
||||
# 兑付反馈态(bonus_resolved 到达——结果行追加在头部之后;唯一出口 = 继续)
|
||||
# 兑付反馈态(curio_resolved 到达——结果行追加在头部之后;唯一出口 = 继续)
|
||||
func show_result(text: String) -> void:
|
||||
_label.text = _header + "\n" + text
|
||||
_choice_box.visible = false
|
||||
File renamed without changes.
@@ -19,8 +19,8 @@ var item_slots: HBoxContainer # 秘宝槽(迭代 7 T4 接线—
|
||||
var _slot_panels: Array = [] # 槽 PanelContainer 引用(选中高亮/置灰重刷)
|
||||
var _selected_handle := 0 # 选中态(0=无;组合根回写维持单源)
|
||||
var _slot_handles: Array = [] # 槽位→handle 映射(set_treasure_inventory 刷新)
|
||||
var _bonus_section: VBoxContainer # 特性(预留——空态隐藏,接线归大奖励/锻造呈现批)
|
||||
var _bonus_list: VBoxContainer
|
||||
var _curio_section: VBoxContainer # 特性(预留——空态隐藏,接线归大奖励/锻造呈现批)
|
||||
var _curio_list: VBoxContainer
|
||||
var _relic_section: VBoxContainer # 特性持有段(迭代 12 呈现补齐——空态隐藏)
|
||||
var _relic_list: VBoxContainer
|
||||
var _board_variant_section: VBoxContainer # 地形变异常驻角标(全局作用域变异首发批——空态隐藏)
|
||||
@@ -93,14 +93,14 @@ func _init() -> void:
|
||||
_board_variant_section.add_child(_board_variant_list)
|
||||
# 特性(预留):锻造/大奖励/关卡奖励节点的属性提升——中循环数据因改变战斗数学准入;
|
||||
# 与战斗内状态效果(B 区站桩,随战斗消散)分区,防「战斗结束被清」误读;空态整节隐藏
|
||||
_bonus_section = VBoxContainer.new()
|
||||
_bonus_section.add_theme_constant_override("separation", 4)
|
||||
_bonus_section.visible = false
|
||||
col.add_child(_bonus_section)
|
||||
_bonus_section.add_child(UiKit.label("特性", 16, true))
|
||||
_bonus_list = VBoxContainer.new()
|
||||
_bonus_list.add_theme_constant_override("separation", 2)
|
||||
_bonus_section.add_child(_bonus_list)
|
||||
_curio_section = VBoxContainer.new()
|
||||
_curio_section.add_theme_constant_override("separation", 4)
|
||||
_curio_section.visible = false
|
||||
col.add_child(_curio_section)
|
||||
_curio_section.add_child(UiKit.label("特性", 16, true))
|
||||
_curio_list = VBoxContainer.new()
|
||||
_curio_list.add_theme_constant_override("separation", 2)
|
||||
_curio_section.add_child(_curio_list)
|
||||
|
||||
|
||||
func set_attack(atk: int, mod_text: String) -> void:
|
||||
@@ -137,13 +137,13 @@ func set_board_variants(lines: Array) -> void:
|
||||
|
||||
# 特性列表(预留接线面):lines = 文案行数组(如「锻造 +2 攻击」)——空数组 = 整节隐藏
|
||||
func set_level_bonuses(lines: Array) -> void:
|
||||
for c in _bonus_list.get_children():
|
||||
_bonus_list.remove_child(c)
|
||||
for c in _curio_list.get_children():
|
||||
_curio_list.remove_child(c)
|
||||
c.queue_free()
|
||||
for line in lines:
|
||||
var l := UiKit.label(String(line), 16, false, COL_INK) # 字号下限(v3.5 批 B3——正文 ≥16)
|
||||
_bonus_list.add_child(l)
|
||||
_bonus_section.visible = not lines.is_empty()
|
||||
_curio_list.add_child(l)
|
||||
_curio_section.visible = not lines.is_empty()
|
||||
|
||||
|
||||
func attack_text() -> String:
|
||||
|
||||
Reference in new issue
Block a user