From 1929516a3bcfbb8c427d3de8cf22599e09e6d924 Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Fri, 30 Oct 2026 04:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A1=E2=91=A0T4(=E7=BB=84=E5=90=88?= =?UTF-8?q?=E6=A0=B9=E6=B3=A8=E5=86=8C=E9=9D=A2=E6=89=B9):=20=E4=B8=83?= =?UTF-8?q?=E5=88=AB=E5=90=8D/=E6=8E=A5=E7=BC=9D=E6=88=90=E5=91=98(=5Fseed?= =?UTF-8?q?=5Fedit/board=5Fview/ap=5Fbar/=5Frow=5Fqueue/=5Fmodals/=5Fsettl?= =?UTF-8?q?ement=5Fstop=5Fpending/=5Fdeferred=5Fmodal)+=E5=85=AD=E8=BD=AC?= =?UTF-8?q?=E5=8F=91=E6=96=B9=E6=B3=95+=5Fflush=5Frow=5Fqueue=20=E5=85=A8?= =?UTF-8?q?=E6=95=B0=E9=80=80=E5=BD=B9;main=5Fui=5Fbuild=20=E4=B8=89?= =?UTF-8?q?=E8=B5=8B=E5=80=BC=E8=A1=8C=E5=88=A0;=5Fsync=5Fstatus=5Fentry?= =?UTF-8?q?=20=E5=88=A4=E7=A9=BA=E5=8F=A5=20root.=5Fmodals=E2=86=92root.ui?= =?UTF-8?q?.modals.flow(shot=5Fprobe=20=E7=8A=B6=E6=80=81=E8=A7=92?= =?UTF-8?q?=E6=A0=87=E7=BC=BA=E5=A4=B1=E8=AF=AF=E6=8A=A5=E6=A0=B9=E5=9B=A0?= =?UTF-8?q?);main.gd=20=E7=B1=BB=E5=8F=98=E9=87=8F=E7=BB=88=E6=80=8115;ren?= =?UTF-8?q?der=20golden+probe=5Fgate=E5=85=A8=E6=AE=B5+=E5=86=92=E7=83=9F+?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=B5=8B=E8=AF=95+=E4=BA=94=E5=A5=97?= =?UTF-8?q?=E4=BB=B6=E5=85=A8=E7=BB=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/presentation/main.gd | 71 +------------------------- game/presentation/main_overlay_flow.gd | 6 +-- game/presentation/main_ui_build.gd | 3 -- 3 files changed, 5 insertions(+), 75 deletions(-) diff --git a/game/presentation/main.gd b/game/presentation/main.gd index aca4d108..9540e8c6 100644 --- a/game/presentation/main.gd +++ b/game/presentation/main.gd @@ -46,7 +46,6 @@ var _debug_entry := false # 调试会话门控(缺省 false=发布态 var ui: UiRegistry # 界面注册面(ui_registry.gd——界面句柄/层序合同/模态编排句柄的单点宿主) var _confirm_consumer := "" # 确认弹窗消费方状态量(契约 3 编排——open 前设、分派后清) var _confirm_consumer_slot := 0 # 消费方附随槽号(delete_slot 消费方专用) -var _seed_edit: LineEdit # 探针兼容别名(本体=ui.modals.debug_overlay.seed_edit;T4 随改址退役) # 调试模式编排(单场/连续两层——状态机与战斗生命周期归 debug_session.gd,本类只接线与出 UI) var _debug = null @@ -56,51 +55,9 @@ var _treasure_ui = null # 秘宝两步交互(treasur var _bonus = null # 三选一与替换子交互(curio_interact_controller.gd——本类只接线与回调注入) var _camp_pres = null # 营地/商店投影(camp_shop_presenter.gd——本类只接线、探针缝保缝转发) -# 探针兼容别名(本体已迁注册面——board_view=ui.battle.board_zone.board_view、ap_bar=ui.battle.board_zone.ap_bar;T4 随改址退役) -var board_view: BoardView -var ap_bar: ApBarView - -# 排播队列只读委托面(探针/测试读 main._row_queue——与 RowPacer 队列共享同一 Array 引用) -var _row_queue: Array[Variant]: - get: - return ui.screens.row_pacer.pending_rows() - var settings_store # 系统级设置独立存储(音量/全屏/减动效) -var _modals = null # 模态层级状态机(=ui.modals.flow.stack——探针 _list 登记序断言缝;T4 退役) var _tune_sim = null # 调试浮窗批量模拟控制器(tune_sim_controller.gd) -# 结算框挂起态属性化(探针/冒烟直读写接缝语义零变化——读=armed,写=arm/disarm;计时器随会话住 -# run_scope.settlement_stop_timer) -var _settlement_stop_pending: bool: - get: - return run_scope.settlement_stop_timer.is_armed() if run_scope != null else false - set(v): - if run_scope == null: - return - if v: - run_scope.settlement_stop_timer.arm() - else: - run_scope.settlement_stop_timer.disarm() - -# 锁期点击重放(v3.1):延迟一帧重入唯一动作通道——此刻队列空锁已解,按普通动作受理 -#(局面在演播期无变化:逻辑先行、演播只是回放——点击语义保真;_row_queue=RowPacer 委托面, -# 排播泵本体在 row_pacer.gd)。 -var _deferred_modal: Control: # 演播后开窗挂起只读视图(t17_defer_probe 挂起态断言缝;本体归 ui.modals.flow) - get: - return ui.modals.flow._deferred if ui != null and ui.modals.flow != null else null - - -# 演播后排窗(伤害过程演完才切结算窗口):排播队列在播=挂起,演播完边沿 -# (_on_pump_ended 派发)再开——旧路径 _open_modal 前置 flush 会把击杀轮的伤害/死亡演出 -# 同帧倒掉(「直接跳战斗胜利」缺陷本体)。队列空=立即开(行为同旧路径)。 -func _open_modal_after_playback(m: Control) -> void: - ui.modals.flow.open_after_playback(m) # 演播后排窗挂起编排归 ModalFlow - - -# 演播完边沿派发(row_pacer.pump_ended 注入口——先开挂起 modal,后锁期点击重放): -func _on_pump_ended() -> void: - ui.modals.flow.pump_ended() # 派发编排归 ModalFlow(重放经注入 Callable 回本类) - func _replay_locked_click() -> void: if run_scope.locked_click.is_empty() or not ui.screens.row_pacer.pending_rows().is_empty(): @@ -154,25 +111,6 @@ func _fatal_screen(msg: String) -> void: MainUiBuild.fatal_screen(self, msg) -# ==================== 模态 overlay 层级管理(pattern 6 / 缺陷⑤——状态机归 modal_stack.gd) ==================== - - - -func _open_modal(m: Control) -> void: - ui.modals.flow.open(m) # 挂起兜底/排播排空/遮挡记账/开侧同步编排归 ModalFlow - -func _close_modal(m: Control) -> void: - ui.modals.flow.close(m) # 关闭恢复+关侧同步归 ModalFlow(同上) - -func _on_modal_closed(m: Control) -> void: - ui.modals.flow.close(m) - - -func _input_locked() -> bool: - # 模态/非战斗期棋盘输入锁(判据编排归 ModalFlow.locks_input:互斥域随层登记 - # [non_locking=调试浮窗]+ 三例外经查询 Callable 注入;本函数留探针缝) - return ui.modals.flow.locks_input() - # ==================== 冒险模式入口(唯一试玩入口)==================== func _start_adventure_from_menu() -> void: @@ -391,11 +329,6 @@ func pace_delay_for(prev_seg: String, next_seg: String) -> float: return ui.screens.row_pacer.pace_delay_for(prev_seg, next_seg) -# 强制排空(模态开启前调用——明细回看/停点覆盖层/终局面所见明细带恒完整;pacing_queue_test 直读) -func _flush_row_queue() -> void: - ui.screens.row_pacer.flush() - - func _on_round_started(ri: int) -> void: # 轮首分隔行随排播队列走(落在前轮各行之后——带序正确);轮横幅即轮切换时刻发射 #(view 内判减动效=静态化变体)。减动效快路=分隔行同帧直落(不跳过——consume_now 复用 @@ -590,7 +523,7 @@ func _on_board_action(cell: Vector2i, kind: String) -> void: # 结算演播期棋盘冻结(v3 口径——不可点/不可移/不可挖): # 锁面=排播队列活跃(纯队列判据;排播泵尾迹窗口不可作演播中标志——见 row_pacer._process 注)。 # 队列排空即解锁、无状态残留;HUD 按钮不在锁面(停手/明细回看各自通路,开启前 - # _flush_row_queue 自行排空)。 + # 开层前排空钩子(flow.flush_rows——模态开启前明细带恒完整)。 # **点击不丢弃**(v3.1——「卡死」体感根因):锁期点击缓存最后一次,演播完边沿 # (_process 泵 _was_pumping 分支)自动重放——玩家操作零丢失、体感=「演播一停动作就生效」。 if not ui.screens.row_pacer.pending_rows().is_empty(): @@ -715,7 +648,7 @@ func _is_settling() -> bool: # 判据若只跟逻辑态,演播期棋盘会提前恢复可挖观感=「没意识到在结算演出」感知缺口根源; # 演播期维持去饱和+禁挖光(结算中语义),放完自然回挖掘认知。判据=纯队列(排播泵尾迹 # 窗口不可作演播中标志——row_pacer._process 注)。battle 收尾演播例外: - # overlay 开启即 _flush_row_queue 排空,视觉随队列空同步交接结算框。 + # overlay 开启经 flow.flush_rows 钩子排空,视觉随队列空同步交接结算框。 # 相位取数经 presentation_snapshot 成文面——禁 settlement.action_economy 链式穿透)。 if run_scope.settlement == null or not run_scope.settlement.is_battle_live(): return not ui.screens.row_pacer.pending_rows().is_empty() diff --git a/game/presentation/main_overlay_flow.gd b/game/presentation/main_overlay_flow.gd index 3b04a504..57950565 100644 --- a/game/presentation/main_overlay_flow.gd +++ b/game/presentation/main_overlay_flow.gd @@ -85,8 +85,8 @@ static func _on_save_select_load(root: Variant, slot: int) -> void: static func _on_save_select_delete(root: Variant, slot: int) -> void: root._confirm_consumer = "delete_slot" root._confirm_consumer_slot = slot - root.ui.modals.flow.open(root.confirm_dialog) # 模态栈单口(显示编排/挂起兜底/遮挡记账——与其余覆盖层同口) - root.confirm_dialog.open("删除存档位 %d?删除后该档不可恢复。" % slot, "删除", "取消") + root.ui.modals.flow.open(root.ui.modals.confirm_dialog) # 模态栈单口(显示编排/挂起兜底/遮挡记账——与其余覆盖层同口) + root.ui.modals.confirm_dialog.open("删除存档位 %d?删除后该档不可恢复。" % slot, "删除", "取消") @@ -106,7 +106,7 @@ static func _on_status_badge_pressed(root: Variant) -> void: # 地图屏角标=随屏;置灰=登记册上除地图屏自身外任一层开着(防「看得见点不着」态)。 # 调用面=模态开合单口与屏级互斥口(凡影响开态/屏态的路径必经其一)。 static func _sync_status_entry(root: Variant) -> void: - if root.ui.modals.status_panel == null or root._modals == null or root.ui.battle.board_zone == null or root.ui.modals.level_screen == null: + if root.ui.modals.status_panel == null or root.ui.modals.flow == null or root.ui.battle.board_zone == null or root.ui.modals.level_screen == null: return var map_on: bool = root.ui.modals.level_screen.visible root.ui.battle.board_zone.status_badge.visible = root.run_scope.level_active and not map_on diff --git a/game/presentation/main_ui_build.gd b/game/presentation/main_ui_build.gd index bcf0ce3c..b535fb7c 100644 --- a/game/presentation/main_ui_build.gd +++ b/game/presentation/main_ui_build.gd @@ -45,8 +45,6 @@ static func _build_screens(root: Variant) -> void: root.ui.battle.log_view = root.ui.screens.adventure_screen.log_view root.ui.battle.info_panel = root.ui.screens.adventure_screen.info_panel root.ui.battle.board_zone = root.ui.screens.adventure_screen.board_zone - root.board_view = root.ui.screens.adventure_screen.board_view # 探针兼容别名(= ui.battle.board_zone.board_view;T4 退役) - root.ap_bar = root.ui.screens.adventure_screen.ap_bar # 探针兼容别名(= ui.battle.board_zone.ap_bar;T4 退役) root.ui.battle.settlement_fx = root.ui.screens.adventure_screen.settlement_fx root.ui.modals.level_screen = root.ui.screens.adventure_screen.level_screen @@ -240,7 +238,6 @@ static func _build_modal_flow(root: Variant) -> void: root._sync_status_entry() # 关闭恢复角标可点态(无残留——同源口径) root._sync_debug_overlay() # 他层关闭复活浮窗时同步刷新(关后自动恢复语义配套) root.ui.modals.flow.replay_click = root._replay_locked_click - root._modals = root.ui.modals.flow.stack # 探针 _list 登记序断言缝(ui_struct 登记序=z 序纪律断言) # 视觉层合同装配(唯一事实源=LAYER_CONTRACT:树序+登记序同源派生——改序只改合同表) root.ui.apply_layer_contract(root) root._tune_sim = TuneSimController.new(root.db, root.ui.modals.debug_overlay, int(root.db.combat.hero.max_hp))