From 4056e99d4cefc09cfa0a8952576fb64cf01dca89 Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Fri, 2 Oct 2026 18:51:13 +0800 Subject: [PATCH] =?UTF-8?q?t17=5Fdefer=5Fprobe=20=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3=E6=94=B9=E7=9C=9Ftimestamp=EF=BC=88=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=A2=99=E4=B8=8A=E6=97=B6=E9=92=9F=E7=B2=BE=E7=A1=AE=E5=88=B0?= =?UTF-8?q?=E6=AF=AB=E7=A7=92=EF=BC=89=E2=80=94=E2=80=94AP=E7=94=A8?= =?UTF-8?q?=E5=AE=8C/=E8=A7=A6=E5=8F=91=E7=BB=93=E7=AE=97/=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=87=BA=E7=8E=B0=E4=B8=89=E6=97=B6=E5=88=BB+?= =?UTF-8?q?=E7=9B=B8=E5=B7=AEms=EF=BC=9B=E6=97=A7=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E7=B3=BB=E7=A7=92=E8=A1=A8=E8=AE=A1=E6=95=B0=E8=AF=AF=E7=A7=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/smoke/t17_defer_probe.gd | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/game/smoke/t17_defer_probe.gd b/game/smoke/t17_defer_probe.gd index e785039c..1837d9b7 100644 --- a/game/smoke/t17_defer_probe.gd +++ b/game/smoke/t17_defer_probe.gd @@ -51,7 +51,9 @@ func _ready() -> void: # 直挖至击杀胜利(settle_batch 真实管线——step_row 信号→排播队列,与点击路径同链) var ms = main.settlement.minesweeper var guard := 200 - var t_ap_out := -1 # 时间戳⓪:AP 用完/停手——行动经济翻 Waiting 的那一帧(轮末结算触发点) + var t_ap_out := -1 # AP 用完/停手帧 + var ap_clock := "" # 墙上时钟时间戳 + var settle_clock := "" while guard > 0 and String(main.settlement.battle_result) == "": guard -= 1 var plan = load("res://smoke/auto_player.gd").choose_dig(ms) @@ -64,6 +66,8 @@ func _ready() -> void: ms.settle_batch([{"action": "dig", "cell": plan.dig_cell}]) if t_ap_out < 0 and main.settlement.action_economy.phase != "Active": t_ap_out = Time.get_ticks_msec() + ap_clock = _clock_ms() + settle_clock = ap_clock # 触发结算与 AP 用完同帧(核心同步)——同一墙上时刻 await get_tree().process_frame if String(main.settlement.battle_result) != "victory": _fail("战斗未胜利(result='%s')" % str(main.settlement.battle_result)) @@ -83,9 +87,11 @@ func _ready() -> void: while not main._end_overlay.is_open() and waited < 20.0: await get_tree().process_frame waited += get_process_delta_time() - var t_popup := Time.get_ticks_msec() # 时间戳②:终局面可见帧 - print("[t17_defer] AP用完/触发结算=%d ms · 结算行入队完成=%d ms(两者相差 %d ms——核心同步架构同帧)· 弹窗出现=%d ms(距触发结算 %d ms = 逐行演播时长,行数 %d)" % [ - t_ap_out, t_settle, t_settle - t_ap_out, t_popup, t_popup - t_ap_out, _played_rows]) + var t_popup := Time.get_ticks_msec() + var popup_clock := _clock_ms() # 弹窗出现:墙上时钟时间戳 + print("[t17_defer] AP点用完: %s" % ap_clock) + print("[t17_defer] 触发结算: %s(与 AP 用完同帧——核心同步,相差 0ms)" % settle_clock) + print("[t17_defer] 弹窗出现: %s(距触发结算 %d ms = 逐行演播时长,行数 %d)" % [popup_clock, t_popup - t_ap_out, _played_rows]) if not main._end_overlay.is_open(): _problems.append("排播放完后终局面未开(%.1fs——演播完边沿派发失守)" % waited) if _problems.is_empty(): @@ -97,6 +103,11 @@ func _ready() -> void: get_tree().quit(2) +func _clock_ms() -> String: + var unix := Time.get_unix_time_from_system() + return "%s.%03d" % [Time.get_datetime_string_from_system(), int(fmod(unix, 1.0) * 1000.0) % 1000] + + func _fail(why: String) -> void: print("[t17_defer] FAIL — " + why) get_tree().quit(2)