Files
gplan-2/game/smoke/config_fatal_probe.gd
T

23 lines
972 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VERTICAL SLICE - NOT FOR PRODUCTION
# 验证问题:运行期数据致命通道是否成立(2026-09-18 用户拍板——进度坐标越域记 Fatal 级日志后进程退出,退出码 1)
# 运行:Godot_console.exe --headless --path . --script res://smoke/config_fatal_probe.gd
# 预期:进程以退出码 1 终止;打印 FAIL 行或退出码 0 即致命通道未生效。
extends SceneTree
var _frames := 0
func _initialize() -> void:
var db = load("res://core/config_db.gd").new()
root.add_child(db) # 入树——autoload 同款生命周期
db.load_tables("res://data/tables", false)
db.resolve_enemy_rowset(0, 0) # 越域:关卡序号 <1 → Fatal,quit(1) 排队帧末退出
print("FATAL-PROBE — Fatal 已记,等待帧末退出(退出码应为 1)")
func _process(_delta: float) -> bool:
_frames += 1
if _frames > 5:
print("FATAL-PROBE FAIL — 5 帧内未退出,致命通道未生效")
quit(0)
return true
return false