iter44-卡1:卡①(组合根注册面批): ui_registry+三域容器建件·main.gd 49→15·全消费面改址main.ui.*·四闸主证行为零变化
This commit is contained in:
1 parent
14054d9dfb
commit
d2b36e59cb
41 files changed
+1073
-1070
No files matched your search
@@ -50,10 +50,10 @@ func _ready() -> void:
|
||||
# 其余任意两屏同时为真=互斥失守。
|
||||
func _screen_seals() -> Dictionary:
|
||||
return {
|
||||
"菜单": main._start_overlay != null and main._start_overlay.visible,
|
||||
"营地": main.camp_overlay != null and main.camp_overlay.visible,
|
||||
"菜单": main.ui.screens.start_overlay != null and main.ui.screens.start_overlay.visible,
|
||||
"营地": main.ui.modals.camp_overlay != null and main.ui.modals.camp_overlay.visible,
|
||||
"冒险": main.run_scope != null and main.run_scope.is_adventure,
|
||||
"终局": main._end_overlay != null and main._end_overlay.visible,
|
||||
"终局": main.ui.modals.end_overlay != null and main.ui.modals.end_overlay.visible,
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ func _frames(n: int = 2) -> void:
|
||||
func _step_boot_menu() -> void:
|
||||
_expect_exclusive("①boot", "菜单")
|
||||
_expect_adventure_seal("①boot", false)
|
||||
if main.debug_overlay != null and main.debug_overlay.visible:
|
||||
if main.ui.modals.debug_overlay != null and main.ui.modals.debug_overlay.visible:
|
||||
_problems.append("①boot:调试浮窗 boot 自动开(菜单优先失守)")
|
||||
|
||||
|
||||
@@ -117,10 +117,10 @@ func _step_menu_to_camp() -> void:
|
||||
|
||||
# ---- ③ 营地 → 菜单(回退路径:营地关闭发自覆盖层自身信号)----
|
||||
func _step_camp_back_to_menu() -> void:
|
||||
if main.camp_overlay == null:
|
||||
if main.ui.modals.camp_overlay == null:
|
||||
_problems.append("③营地→菜单:营地覆盖层句柄缺失")
|
||||
return
|
||||
main.camp_overlay.closed.emit()
|
||||
main.ui.modals.camp_overlay.closed.emit()
|
||||
await _frames()
|
||||
main._on_save_select_closed() # 关闭被栈还原的选档层(动线序中间态——卡④ 换代点)
|
||||
await _frames()
|
||||
@@ -133,22 +133,22 @@ func _step_camp_back_to_menu() -> void:
|
||||
func _step_save_select_open_back() -> void:
|
||||
ProbeUiUtil.isolate_save(main, "smoke_screen_flow_savesel", false, false, true)
|
||||
main.save_manager.slots.attach_slot_template("user://smoke_screen_flow_savesel_slot_%d.json")
|
||||
var esb: Button = ProbeUiUtil.find_button(main._start_overlay, "进入存档", "prefix")
|
||||
var esb: Button = ProbeUiUtil.find_button(main.ui.screens.start_overlay, "进入存档", "prefix")
|
||||
if esb == null:
|
||||
_problems.append("[savesel] mn3 进入存档钮缺失(卡② 交付物)")
|
||||
return
|
||||
esb.pressed.emit() # 真实按钮信号路径 → _open_save_select(卡② mn3 点击链——卡③ 直调中间态就此闭环)
|
||||
await get_tree().process_frame
|
||||
var seals := _screen_seals()
|
||||
if not main.save_select_overlay.visible or not seals_check_single(seals):
|
||||
_problems.append("[savesel] sl10 开层后屏级互斥失守(选档=%s)" % str(main.save_select_overlay.visible))
|
||||
var back_btn: Button = ProbeUiUtil.find_button(main.save_select_overlay, "返回", "prefix")
|
||||
if not main.ui.modals.save_select_overlay.visible or not seals_check_single(seals):
|
||||
_problems.append("[savesel] sl10 开层后屏级互斥失守(选档=%s)" % str(main.ui.modals.save_select_overlay.visible))
|
||||
var back_btn: Button = ProbeUiUtil.find_button(main.ui.modals.save_select_overlay, "返回", "prefix")
|
||||
if back_btn == null:
|
||||
_problems.append("[savesel] sl10 返回钮缺失(页壳顶条)")
|
||||
else:
|
||||
back_btn.pressed.emit()
|
||||
await get_tree().process_frame
|
||||
if main.save_select_overlay.visible or not main._start_overlay.visible:
|
||||
if main.ui.modals.save_select_overlay.visible or not main.ui.screens.start_overlay.visible:
|
||||
_problems.append("[savesel] sl10 返回后选档未隐藏或开始层未恢复(关闭链失守)")
|
||||
# ESC 语境:再开选档→合成 ESC 键→层不关、流程零扰动(ESC 不属选档语境——零实现断言)
|
||||
main._open_save_select()
|
||||
@@ -159,7 +159,7 @@ func _step_save_select_open_back() -> void:
|
||||
ev.pressed = true
|
||||
main.get_viewport().push_input(ev, true)
|
||||
await get_tree().process_frame
|
||||
if not main.save_select_overlay.visible:
|
||||
if not main.ui.modals.save_select_overlay.visible:
|
||||
_problems.append("[savesel] sl10 ESC 关闭了选档层(选档语境 ESC 应不响应——卡⑤ 范围外)")
|
||||
main._on_save_select_closed()
|
||||
await get_tree().process_frame
|
||||
@@ -171,7 +171,7 @@ func seals_check_single(f: Dictionary) -> bool:
|
||||
for k in f:
|
||||
if bool(f[k]):
|
||||
on += 1
|
||||
if main.save_select_overlay.visible:
|
||||
if main.ui.modals.save_select_overlay.visible:
|
||||
on += 1 # 选档自身计入(调用点已开层)
|
||||
return on == 1
|
||||
|
||||
@@ -184,25 +184,25 @@ func _step_menu_to_adventure() -> void:
|
||||
_expect_adventure_seal("④菜单→冒险", true)
|
||||
if main.run_scope != null and main.run_scope.adventure == null:
|
||||
_problems.append("④菜单→冒险:冒险实例未建立(入口停点未达)")
|
||||
if main.level_screen != null and not main.level_screen.visible:
|
||||
if main.ui.modals.level_screen != null and not main.ui.modals.level_screen.visible:
|
||||
_problems.append("④菜单→冒险:入口停点未落在关卡地图屏(level_screen 不可见)")
|
||||
|
||||
|
||||
# ---- ⑤ 冒险内屏切换:关卡地图屏 ⇄ 战斗屏(屏内两态,屏级仍独占)----
|
||||
func _step_level_to_battle_and_back() -> void:
|
||||
if not main.level_screen.visible:
|
||||
if not main.ui.modals.level_screen.visible:
|
||||
_problems.append("⑤冒险内切换:前置不在关卡地图屏")
|
||||
return
|
||||
main._exit_level_screen()
|
||||
await _frames()
|
||||
if main.level_screen.visible:
|
||||
if main.ui.modals.level_screen.visible:
|
||||
_problems.append("⑤冒险内切换:退出关卡屏后 level_screen 仍可见")
|
||||
if main._battle_root != null and not main._battle_root.visible:
|
||||
if main.ui.screens.battle_root != null and not main.ui.screens.battle_root.visible:
|
||||
_problems.append("⑤冒险内切换:战斗屏未接手(battle_root 不可见)")
|
||||
_expect_exclusive("⑤冒险内切换(关卡→战斗)", "冒险")
|
||||
main._enter_level_screen()
|
||||
await _frames()
|
||||
if not main.level_screen.visible:
|
||||
if not main.ui.modals.level_screen.visible:
|
||||
_problems.append("⑤冒险内切换:回到关卡地图屏失败")
|
||||
_expect_exclusive("⑤冒险内切换(战斗→关卡)", "冒险")
|
||||
|
||||
@@ -215,16 +215,16 @@ func _step_abandon_to_end() -> void:
|
||||
main._on_abandon_requested()
|
||||
await _frames(4)
|
||||
_expect_exclusive("⑥放弃→终局", "终局")
|
||||
if main._end_overlay != null and not main._end_overlay.visible:
|
||||
if main.ui.modals.end_overlay != null and not main.ui.modals.end_overlay.visible:
|
||||
_problems.append("⑥放弃→终局:终局覆盖层未开")
|
||||
|
||||
|
||||
# ---- ⑦ 终局 → 菜单(终局出口返回开始界面)----
|
||||
func _step_end_back_to_menu() -> void:
|
||||
if main._end_overlay == null or not main._end_overlay.visible:
|
||||
if main.ui.modals.end_overlay == null or not main.ui.modals.end_overlay.visible:
|
||||
_problems.append("⑦终局→菜单:前置不在终局")
|
||||
return
|
||||
main._end_overlay.continue_pressed.emit()
|
||||
main.ui.modals.end_overlay.continue_pressed.emit()
|
||||
await _frames(3)
|
||||
_expect_exclusive("⑦终局→菜单", "菜单")
|
||||
if main.run_scope != null and main.run_scope.is_adventure:
|
||||
|
||||
Reference in new issue
Block a user