完善客户端功能并同步差距文档

This commit is contained in:
shenlei
2026-09-03 18:40:01 +09:00
parent f93a172296
commit 13ccb8d02d
135 changed files with 21881 additions and 1259 deletions
+6
View File
@@ -4,6 +4,7 @@
extends SceneTree
const MobView = preload("res://ui/mob_view.gd")
const Audio = preload("res://audio.gd")
var _fail := 0
func _ck(c: bool, m: String) -> void:
@@ -30,6 +31,9 @@ func _run() -> void:
return
var proto: Object = ClassDB.instantiate("Metin2Proto")
get_root().add_child(proto)
var audio: Node = Audio.new()
get_root().add_child(audio)
audio.setup(assets)
var mp := assets.path_join("locale/locale/en/mob_proto")
if not FileAccess.file_exists(mp) or not proto.call("load_mob_proto", mp):
print(" (skip: 无 mob_proto)")
@@ -42,6 +46,7 @@ func _run() -> void:
_ck(ok, "MobView.build(102 = Wolf) 成功")
if not ok:
return
mv.set_audio(audio)
_ck(mv._dir.get_file() == "wolf", "解到 wolf 目录(%s" % mv._dir)
_ck(mv.model != null and mv.model.get_class() == "Metin2Model", "Metin2Model 建好")
_ck(mv._motions.size() >= 3, "motlist.txt 解出 %d 个动作" % mv._motions.size())
@@ -55,6 +60,7 @@ func _run() -> void:
var s1: String = mv._state
mv.set_anim_state("attack")
_ck(mv._state == "attack" and s1 == "run", "set_anim_state 切换记录")
_ck(mv._sound_instances.size() > 0, "MobView attack motion loads paired .mss instances")
# 未知 race -> build 失败(返回 null 用占位)
var mv2: Node3D = MobView.new()