iter52-卡1:迭代52卡①(minesweeper_rules公开面还债): safe_remaining私有化21→20(函数体逐字不动,测试4行改锚)——gdstyle S13归绿零新基线键,全仓.safe_remaining(零残留; 验收档中

This commit is contained in:
DKChan committed 2026-11-05 03:04:20 +08:00
1 parent 32f9be8c4d
commit 8aec7dbff1
25 files changed
+137 -226

No files matched your search

+1 -25
View File
@@ -118,29 +118,6 @@ static func isolate_save(main, tag: String, mark_first_done: bool = false, with_
main.settings_store = SettingsStoreScript.new("user://%s_settings.cfg" % tag)
return iso
# ---- 真输入点击承载(test-conventions §8.3「真实入口」判定口径)----
# 合成鼠标事件经 Viewport.push_input 进引擎输入管线(hitbox/命中测试参与),press+release 成对
#(BaseButton pressed 信号走 release 沿——ui_input_probe :717-733 / screen_flow_probe :484-499 同式)。
# 信号直发(pressed.emit())只许标「接线验证」,不得充当真实入口断言的驱动。
static func push_click(main, ctrl: Control) -> void:
push_click_at(main, ctrl.get_global_rect().get_center())
static func push_click_at(main, pos: Vector2) -> void:
var down := InputEventMouseButton.new()
down.position = pos
down.global_position = pos
down.button_index = MOUSE_BUTTON_LEFT
down.pressed = true
main.get_viewport().push_input(down, true)
var up := InputEventMouseButton.new()
up.position = pos
up.global_position = pos
up.button_index = MOUSE_BUTTON_LEFT
up.pressed = false
main.get_viewport().push_input(up, true)
# 营地经进档开层(卡② mn9 新路径——campbtn 已撤;槽模板注入隔离命名空间,防碰真实槽
# user://save_slot_N.json——真实档红线)。创建=激活=暂行开营地(卡③ Q3 乙落点);
# 驱动后写盘目标=隔离槽文件(持久化断言读 user://<tag>_slot_1.json)。返回 false=新档钮缺失(驱动中断)。
@@ -153,9 +130,8 @@ static func open_camp_via_savesel(main, tag: String) -> bool:
if FileAccess.file_exists(sp):
DirAccess.remove_absolute(sp)
main._open_save_select()
await main.get_tree().process_frame # 排版帧——真点击命中的是控件 rect,开层同帧容器未排(emit 无此依赖)
var new_btn: Button = main.ui.modals.menu.save_select_overlay._new_btns.get(1)
if new_btn == null:
return false
push_click(main, new_btn) # 真输入 → _on_save_select_new → create_slot+open_camp
new_btn.pressed.emit() # 真实按钮信号路径 → _on_save_select_new → create_slot+open_camp
return true