fix: 装备属性面板避让逻辑 + 多项功能更新

- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧
- inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域
- 包含其他累积的功能开发和测试文件
This commit is contained in:
shen
2026-09-21 16:38:59 -07:00
parent 1522a8a1a1
commit c93894313a
5498 changed files with 4558004 additions and 1442 deletions
+7 -2
View File
@@ -20,6 +20,11 @@ class FakeAnim extends Node:
var time_scale := 1.0
var playing := true
var blend_time := 0.15
# PlayerView uses these timing accessors to decide whether an explicit loop
# request may interrupt a one-shot. A zero-duration stub means the clip is
# already at its boundary, matching the test's manual playback_finished.emit().
func get_duration() -> float: return 0.0
func get_time() -> float: return 0.0
func get_motion_data() -> Dictionary: return {}
const MSM := "ScriptType CharacterModelScript\nGroup AttachingData\n{\n\tGroup AttachingData00\n\t{\n\t\tAttachingDataType 0\n\t\tIsAttaching 0\n\t\tGroup CollisionData\n\t\t{\n\t\t\tCollisionType 3\n\t\t\tGroup SphereData\n\t\t\t{\n\t\t\t\tSphereDataCount 1\n\t\t\t\tGroup SphereData00\n\t\t\t\t{\n\t\t\t\t\tRadius %.1f\n\t\t\t\t\tPosition 0.0 0.0 %.1f\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"
@@ -51,7 +56,7 @@ func _init() -> void:
func _run() -> void:
var root := ProjectSettings.globalize_path("user://hit_view_test")
var gen := root.path_join("general")
for n in ["wait", "run", "attack", "attack_1", "damage", "damage_1", "damage_2", "damage_3",
for n in ["wait", "run", "skill", "attack", "attack_1", "damage", "damage_1", "damage_2", "damage_3",
"damage_flying", "falling_stand", "back_damage_flying", "back_falling_stand"]:
_touch(gen.path_join(n + ".msa"))
for n in ["combo_01", "combo_02", "attack"]:
@@ -115,7 +120,7 @@ func _run() -> void:
_ck(anim.anim_path == atk_path and pv._hit.shake_left > 0.0, "isLock (attack) -> shake only, no damage motion")
pv._process(0.05)
var off: Vector3 = model.position
_ck(absf(off.x) <= 0.09 and absf(off.y) <= 0.09 and absf(off.z) <= 0.09,
_ck(absf(off.x) <= 0.091 and absf(off.y) <= 0.091 and absf(off.z) <= 0.091,
"ShakeProcess offset within rand()%%10 cm, got %s" % off)
pv._process(0.2)
_ck(model.position == Vector3.ZERO, "shake over -> model back on its ground offset, got %s" % model.position)