客户端问题修改

This commit is contained in:
shen
2026-09-07 14:53:36 +08:00
parent b19d5b5dd3
commit 61272b75e9
32 changed files with 1023 additions and 95 deletions
+8
View File
@@ -5,6 +5,7 @@ extends SceneTree
const SkillTable = preload("res://ui/skill_table.gd")
const SkillUI = preload("res://ui/skill_ui.gd")
const Quickbar = preload("res://ui/quickbar.gd")
const UiAssets = preload("res://ui/ui_assets.gd")
const UiManager = preload("res://ui/ui_manager.gd")
class FakeClient extends Node:
@@ -74,6 +75,11 @@ func _run() -> void:
# 列偏移修正后:skill 1 'Three-Way Cut' motion_name=samyeon motion_idx=1, ATTACK_SKILL
_ck(st.motion_idx_of(1) == 1, "skill 1 motion_idx == 1 (列偏移已修)")
_ck(String(s1.get("motion", "")) == "samyeon", "skill 1 motion_name == samyeon")
var skill_icon := UiAssets.load_tex(assets, "ETC/ymir work/ui/skill/warrior/samyeon_01.sub")
_ck(skill_icon != null, "skill 1 icon loads from .sub + shared SkillWarrior.dds")
if skill_icon:
_ck(skill_icon.get_width() == 32 and skill_icon.get_height() == 32,
"skill 1 icon region is 32x32")
_ck(st.is_attack(1), "skill 1 是 ATTACK_SKILL")
_ck(st.is_ranged(46), "skill 46 bow skill is ranged")
_ck(not st.is_ranged(1), "skill 1 melee skill is not ranged")
@@ -261,6 +267,8 @@ func _run() -> void:
get_root().add_child(qb)
qb.setup(fc, st, ui, func() -> Node: return pl)
qb.assign(0, "skill", 1)
_ck(qb._slots[0].icon.texture != null, "quickbar skill slot shows skill icon")
_ck(String(qb._slots[0].lbl.text) == "", "quickbar hides text when skill icon is available")
_ck(fc.quickslot_ops == [["add", 0, 2, 1]], "assign -> CG_QUICKSLOT_ADD slot 0")
qb.activate(0)
_ck(fc.skill_uses.size() == 1 and fc.skill_uses[0] == [1, 2000],