feat(ux): T2 独立屏落地——RouteOverlay 升格 LevelMapScreen+组合根屏级互斥

类/文件改名 route_overlay.gd→level_map_screen.gd(RouteOverlay 退役,uid 随迁);屏底=暗幕 0.6 半透→不透明 BG_ROOT+石纹底噪(TEX_BACKDROP_STONE load_tex 守卫缺位纯色回退,spec Layout 形态升格);open_choices 进入转场 alpha 淡入 200ms(UiKit.motion;就地刷新/模态栈恢复不重放)。
组合根:_battle_root 宿主引用留存+_level_screen_active 状态+_enter/_exit_level_screen 单一出口(进屏隐战斗屏/出屏显战斗屏);_on_choices_presented 走进屏;_on_route_chosen 出屏分支;_on_adventure_finished 强制回战斗屏呈现摘要(放弃入口终局兜底)。_input_locked/模态登记序(节点层与商店层之间)不变——兑付覆盖层域内弹出的遮挡恢复语义由模态栈零改动复用。
探针机械改名 main.route_overlay→main.level_screen(ui_probe 5/ui_click_probe 4/ui_input 5/ui_tune 2 处)。坑⑤再证:新 class_name 后未刷编辑器缓存致四探针 Parse Error 超时——--editor --quit 后全绿。轻闸=冒烟 557/0+五探针 PASS。
This commit is contained in:
DKChan committed 2026-09-28 06:40:16 +08:00
1 parent 30002f85fd
commit ae2ca4ffd4
7 files changed
+78 -37

No files matched your search

+4 -4
View File
@@ -90,8 +90,8 @@ func _ready() -> void:
await get_tree().process_frame
# 停点前移批 2026-09-23:关卡开始 = 入口选路停点——press_candidate 图上命中路径选入口候选进首战(候选按钮退役 2026-09-28)
#(首格可点 AC 口径随之含入口选路一步:菜单点击 → 停点呈现 → pick → 棋盘安装)
if main.route_overlay.visible:
main.route_overlay.press_candidate(0)
if main.level_screen.visible:
main.level_screen.press_candidate(0)
await get_tree().process_frame
await get_tree().process_frame
var t_entry := Time.get_ticks_msec() - t1
@@ -113,9 +113,9 @@ func _ready() -> void:
main.node_overlay.press_continue()
_flags_placed.clear()
continue
if main.route_overlay.visible:
if main.level_screen.visible:
# 节点图选路口(零自动推进停点)——图上命中路径交替选候选(岔路使用行为;布局决策 2 改造)
main.route_overlay.press_candidate(_route_clicks % 2)
main.level_screen.press_candidate(_route_clicks % 2)
_route_clicks += 1
_flags_placed.clear()
continue
+5 -5
View File
@@ -31,8 +31,8 @@ func _ready() -> void:
# push_input 真实鼠标路径 motion+click → 悬停预承诺置位 → route_chosen 到达组合根。
# 由来=真机 bug:深层节点(L1 Boss 内容 x=802)在固定画布命中区外,press_candidate 直调
# 命中函数探针全绿、真鼠标点不中——本 case 封住输入管线,⑬封住几何拟合。
if main.route_overlay.visible:
var ro = main.route_overlay
if main.level_screen.visible:
var ro = main.level_screen
var cands: Array = main.runner.next_candidate_ids()
var nds: Array = main.runner.nodes()
var tgt := {}
@@ -56,13 +56,13 @@ func _ready() -> void:
main.get_viewport().push_input(evc, true)
await get_tree().process_frame
await get_tree().process_frame
if main.route_overlay.visible or main.runner.awaiting_choice():
_pre_fail("图上真实点击未提交选路(overlay 可见=%s 选路态=%s)" % [str(main.route_overlay.visible), str(main.runner.awaiting_choice())])
if main.level_screen.visible or main.runner.awaiting_choice():
_pre_fail("图上真实点击未提交选路(overlay 可见=%s 选路态=%s)" % [str(main.level_screen.visible), str(main.runner.awaiting_choice())])
for i in range(3):
await get_tree().process_frame
# ---- ⑬ 画布随图拟合(同 bug 的几何面回归):复刻分层公式独立推导最深节点内容 x,
# 断言画布 min 尺寸覆盖之(open_choices 每 stop 拟合——L1 单链 Boss x=70+6*122=802 曾越界)
var ro2 = main.route_overlay
var ro2 = main.level_screen
var nds2: Array = main.runner.nodes()
var layer2 := {}
var inbound2 := {}
+5 -5
View File
@@ -15,7 +15,7 @@ func _ready() -> void:
await get_tree().process_frame
var problems: Array = []
# ---- 放弃入口(2026-09-21 用户拍板——台账 119):默认隐藏(非冒险模式无冒险可放弃——开始层/调试两层)----
if main.route_overlay.abandon_btn == null or main.route_overlay.abandon_btn.visible:
if main.level_screen.abandon_btn == null or main.level_screen.abandon_btn.visible:
print("[ui_probe] FAIL — 放弃按钮默认应隐藏(非冒险模式关)")
get_tree().quit(1)
return
@@ -63,20 +63,20 @@ func _ready() -> void:
await get_tree().process_frame
# ---- 入口选路停点(停点前移批 2026-09-23:关卡开始即出节点图——level_started 后、首战前弹选路层;
# press_candidate 图上命中路径 pick 入口单候选进首战——候选按钮退役 2026-09-28)----
if not main.route_overlay.visible:
if not main.level_screen.visible:
problems.append("关卡开始未弹入口选路停点(route_overlay 应可见)")
elif main.runner == null or not main.runner.awaiting_choice() \
or main.runner.next_candidate_ids().size() != 1:
problems.append("入口停点状态失守(选路态 + 入口单候选)")
else:
main.route_overlay.press_candidate(0)
main.level_screen.press_candidate(0)
await get_tree().process_frame
await get_tree().process_frame
# ---- 放弃入口·冒险模式可见 + 战斗中按下被拒(真实按钮路径——入口挂选路停点,战斗中拒绝为防御分支)----
if main.route_overlay.abandon_btn == null or not main.route_overlay.abandon_btn.visible:
if main.level_screen.abandon_btn == null or not main.level_screen.abandon_btn.visible:
problems.append("冒险模式放弃按钮未开放(选路停点入口在案)")
else:
main.route_overlay.abandon_btn.pressed.emit()
main.level_screen.abandon_btn.pressed.emit()
await get_tree().process_frame
if main.adventure == null or String(main.adventure.state) != "running":
problems.append("首战中放弃未被拒(战斗域单事务在飞——state 应保持 running)")
+2 -2
View File
@@ -65,8 +65,8 @@ func _ready() -> void:
await get_tree().process_frame
await get_tree().process_frame
# 停点前移批 2026-09-23:关卡开始 = 入口选路停点——真实按钮路径选入口候选进首战再读呈现快照
if main.route_overlay.visible:
main.route_overlay.press_candidate(0)
if main.level_screen.visible:
main.level_screen.press_candidate(0)
await get_tree().process_frame
await get_tree().process_frame
var hero: Dictionary = main.settlement.presentation_snapshot().hero