Files
mtgodot-poc/project/print_server_address.gd
T
shenleiandClaude Opus 5 f39a55fdd5 feat(playable): 首个 Mac 联网内测版 STB-01 soak 工具与发布状态文档
- 新增 script/playable_soak.sh:先做 soak 配置/资源校验,无 --allow-gameplay
  只校验不启动客户端;N(>=10) 次独立正常退出运行 + 墙钟 soak,失败即停止后续
  运行并记 BLOCKED;写本批次 release-manifest.json 后聚合
- run_client_gate.sh:确认的故障代理对所有 suite 启动(共享场景的退出运行也经代理);
  soak 超时下限只约束 soak 客户端(validate_soak 增加 soak_client 参数)
- 新增本地 127.0.0.1 故障代理、RSS 采样/内存判定、窗口/指标/流程模块及其测试
- forest_mob_render_test 输出 PASS/FAIL 标记,供 rendering_batch_test.sh 识别
- 新增 docs/FIRST-MAC-PLAYABLE-STATUS.md:如实记录 PASS/BLOCKED、已知问题与环境需求
- .gitignore 排除本地场景配置、凭据文件与运行输出

离线回归:rendering_batch_test.sh failures=0,playable_gate_test.sh PASS,
node 夹具测试 PASS。未联网运行,未重建候选包。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ft3kXpNdLbKEfg5uDLfqVF
2026-09-11 22:06:48 +09:00

36 lines
1.5 KiB
GDScript

extends SceneTree
## Prints the address AppFlow would connect to, resolved through the same
## ServerInfo (built-in default + res://serverlist.txt). Used by
## script/live_smoke_test.sh so the port precheck can never drift from the
## client connect target. Never opens a connection or reads credentials.
##
## env: MT_SERVER_INDEX (default 0), MT_SERVER_CHANNEL (default: the first
## channel listed for that server, matching the login screen default).
## stdout: one line "SERVER_ADDRESS {json}". exit 2 when unresolvable.
const ServerInfoRes = preload("res://net/serverinfo.gd")
func _init() -> void:
var serverinfo := ServerInfoRes.new()
serverinfo.load_file("res://serverlist.txt")
var index := int(OS.get_environment("MT_SERVER_INDEX")) if OS.has_environment("MT_SERVER_INDEX") else 0
var server: Dictionary = serverinfo.server(index)
if server.is_empty():
printerr("SERVER_ADDRESS: server index %d is not in serverinfo" % index)
quit(2)
return
var channels: Array = server.get("channels", [1])
var channel := int(channels[0]) if not channels.is_empty() else 1
if OS.has_environment("MT_SERVER_CHANNEL"):
channel = int(OS.get_environment("MT_SERVER_CHANNEL"))
if not channels.has(channel):
printerr("SERVER_ADDRESS: channel %d is not listed for server %d" % [channel, index])
quit(2)
return
var address: Dictionary = serverinfo.address(index, channel)
address["server_index"] = index
address["channel"] = channel
print("SERVER_ADDRESS " + JSON.stringify(address))
quit(0)