Implement playable Mac client and rendering validation

This commit is contained in:
shen
2026-09-11 14:58:22 +08:00
parent 1ab68bd06e
commit 374d4165d8
233 changed files with 6546 additions and 284 deletions
+14
View File
@@ -266,6 +266,8 @@ func _run() -> void:
var qb: Node = Quickbar.new()
get_root().add_child(qb)
qb.setup(fc, st, ui, func() -> Node: return pl)
var cast_targets: Array = []
qb.skill_cast_started.connect(func(sid: int, vid: int): cast_targets.append([sid, vid]))
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")
@@ -274,12 +276,24 @@ func _run() -> void:
_ck(fc.skill_uses.size() == 1 and fc.skill_uses[0] == [1, 2000],
"quickbar slot 0 -> use_skill(skill 1, selected target)")
_ck(fc.casts.size() == 1, "quickbar slot 0 -> cast_skill once")
_ck(cast_targets == [[1, 2000]], "successful cast publishes resolved visual target")
if fc.casts.size() == 1:
_ck(int(fc.casts[0][0]) == st.motion_idx_of(1), "cast used skill 1's motion_idx")
# 冷却中不再施放
qb.activate(0)
_ck(fc.skill_uses.size() == 1, "on cooldown -> no second use_skill")
_ck(fc.casts.size() == 1, "on cooldown -> no second cast")
qb.assign(1, "skill", 1, false)
qb.activate(1)
_ck(fc.casts.size() == 1, "same skill in another slot shares cooldown")
fc.quickslots = [{"pos": 0, "type": 2, "ref": 1}, {"pos": 1, "type": 2, "ref": 1}]
qb.restore_from_server()
qb._process(0.0)
_ck(qb._slots[0].cd.visible and qb._slots[1].cd.visible, "server slot refresh preserves cooldown overlays")
qb.activate(0)
_ck(fc.casts.size() == 1, "server refresh cannot reset skill cooldown")
fc.quickslots = [] # restore this fixture's original server state for later UI cases
qb._clear(1)
# GC_SKILL_COOLTIME_END 提前解锁
fc.skill_cooldown_end.emit(1)
qb.activate(0)