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
This commit is contained in:
shenlei
2026-09-11 22:06:48 +09:00
co-authored by Claude Opus 5
parent 374d4165d8
commit f39a55fdd5
66 changed files with 9189 additions and 951 deletions
+33 -13
View File
@@ -28,6 +28,7 @@ var anim: Node # Metin2AnimPlayer
var _dir := ""
var _motions := {} # MOTION_NAME(String) -> 绝对 .msa 路径
var _state := ""
var _last_resolution := {}
var _audio: Node
var _sound_instances: Array = []
var _sound_frame := -1
@@ -125,8 +126,10 @@ func set_anim_state(s: String) -> void:
if s == _state or anim == null:
return
_state = s
var msa := _motion_for(s)
_last_resolution = resolve_motion(s)
var msa := String(_last_resolution.path)
if msa == "":
# 旧客户端 GetMotionKey 失败时 SetLoopMotion/InterceptMotion 直接返回:保留当前动作。
return
anim.set("loop", s in ["wait", "walk", "run"])
anim.set("anim_path", msa)
@@ -136,7 +139,35 @@ func set_anim_state(s: String) -> void:
# the selected .msa before playback lets the test distinguish a real action
# from a silent "keep the previous animation" fallback.
func get_motion_path(state: String) -> String:
return _motion_for(state)
return String(resolve_motion(state).path)
## requested_state / motion / path / fallback_reason。fallback_reason:
## "" 首选动作名命中
## "client_alias:<NAME>" 本客户端的同类动作别名(如 run -> WALK
## "motlist_missing:<file>" motlist 未列出,按目录里的 <name>.msa 兜底
## "reference_keep_current_motion" 资源没有任何候选动作;与旧客户端一致保留当前动作
func resolve_motion(state: String) -> Dictionary:
var names: Array = STATE_MOTIONS.get(state, [])
var out := {"requested_state": state, "motion": "", "path": "", "fallback_reason": ""}
for mo: String in names:
if _motions.has(mo):
out.motion = mo
out.path = String(_motions[mo])
if mo != String(names[0]):
out.fallback_reason = "client_alias:" + mo
return out
for mo: String in names:
var p := _dir.path_join(mo.to_lower() + ".msa")
if FileAccess.file_exists(p):
out.motion = mo
out.path = p
out.fallback_reason = "motlist_missing:" + p.get_file()
return out
out.fallback_reason = "reference_keep_current_motion"
return out
func last_motion_resolution() -> Dictionary:
return _last_resolution.duplicate()
func _process(_delta: float) -> void:
if _audio == null or anim == null or _sound_instances.is_empty() or not anim.has_method("get_time") \
@@ -194,17 +225,6 @@ func _folder_candidates(proto: Node, race: int) -> Array:
out.append(c)
return out
func _motion_for(state: String) -> String:
for mo: String in STATE_MOTIONS.get(state, []):
if _motions.has(mo):
return _motions[mo]
# 兜底:目录里有 <mo>.msa 直接用
for mo: String in STATE_MOTIONS.get(state, []):
var p := _dir.path_join(mo.to_lower() + ".msa")
if FileAccess.file_exists(p):
return p
return _motions.get("WAIT", "")
func _load_motlist() -> void:
var ml := _dir.path_join("motlist.txt")
if not FileAccess.file_exists(ml):
+15 -1
View File
@@ -47,6 +47,7 @@ var _slots := [] # 当前页 UI[{btn, cd, lbl, icon, grade}]
var _state := [] # 36 个服务端槽:[{kind, id, cd_end:float}]
var _skill_cooldowns := {} # skill identity survives slot moves/restores within this UI session
var _page := 0
var _last_activation_reserved := false # 最近一次激活落到 __ReserveUseSkill(射程外)
var _move_from := -1
var _mobile_mode := false
@@ -194,6 +195,17 @@ func _activate_slot(slot: int, screen_direction: Vector2) -> void:
elif not PlayerSkill.is_silent_code(fishing_result):
skill_rejected.emit(int(s.id), fishing_result)
return
if code == "RESERVED":
# __ProcessEnemySkillTargetRange:射程外不发施法,蓄力技未预约时先
# __SendUseSkill(slot, 0),再 __ReserveUseSkill 交给 NetPlay 趋近。
_last_activation_reserved = true
if net_play and net_play.has_method("reserve_use_skill"):
var already: bool = net_play.has_method("is_use_skill_reserved") \
and bool(net_play.is_use_skill_reserved(global))
if bool(gate.get("charge", false)) and not already and client.has_method("use_skill"):
client.use_skill(int(s.id), 0)
net_play.reserve_use_skill(int(gate.get("target_vid", 0)), global, float(gate.get("range_cm", 0)))
return
if code == "TOGGLE_OFF":
if client.has_method("use_skill"):
client.use_skill(int(s.id), 0)
@@ -284,8 +296,10 @@ func activate_reserved(global_slot: int) -> bool:
var s: Dictionary = _state[global_slot]
if s.kind != "skill" or s.id == 0 or _now() < s.cd_end:
return false
_last_activation_reserved = false
activate(local)
return true
# 再次落到射程外时新预约已建立,不能让 NetPlay 把它当作已消费清掉。
return not _last_activation_reserved
# client.get_skills() 里该技能的当前等级(quickbar 施法时算 target_count 用)。
func _skill_level(sid: int) -> int: