Replace dasher-pack with unified animation-pack using original Blender bone names

This commit is contained in:
2026-06-15 14:28:26 +08:00
parent 9dd3c59edf
commit 844ec194cb
297 changed files with 28680 additions and 1884 deletions
+24 -29
View File
@@ -247,10 +247,7 @@ func _ready():
# Visible to all human players. Green for local player, Red for others.
var pointer = get_node_or_null("CharacterPointer")
# === Dasher animations are loaded statically via player.tscn ext_resource ===
# The dasher-pack.tres AnimationLibrary is referenced on the AnimationPlayer
# node as a second library ("dasher-pack"). See tools/convert_dasher_animations.gd
# and tools/build_dasher_pack.gd to regenerate the .tres from the source .glb files.
# === All animations loaded from animation-pack (built from animation-0.glb) ===
if pointer:
pointer.visible = true
@@ -376,9 +373,7 @@ func _init_floor_spawn_anchor():
floor_spawn_top.reparent(floor_spawn_anchor, false)
func _load_dasher_animations():
# Deprecated: dasher animations are now loaded statically via the
# dasher-pack.tres AnimationLibrary referenced on the AnimationPlayer node
# in player.tscn. Keep this stub for backward compatibility / no-op.
# Deprecated: dasher animations merged into animation-pack.
pass
@onready var floor_spawn_bot: AnimatedSprite3D = $floor_spawn_bot
@@ -651,7 +646,7 @@ const ANIMATION_SPEED: float = 2.0
func play_walk_animation() -> void:
"""Play walking animation at increased speed."""
if is_carrying_tekton and anim_player and anim_player.has_animation("dasher-pack/dasher_hold"):
if is_carrying_tekton and anim_player and anim_player.has_animation("animation-pack/holding_1"):
return # Let dasher_hold keep playing
if anim_player and anim_player.has_animation("animation-pack/walk_forward"):
anim_player.play("animation-pack/walk_forward", -1, ANIMATION_SPEED)
@@ -673,7 +668,7 @@ func play_special_animation() -> void:
func play_idle_animation() -> void:
"""Play idle animation at normal speed."""
if is_carrying_tekton and anim_player and anim_player.has_animation("dasher-pack/dasher_hold"):
if is_carrying_tekton and anim_player and anim_player.has_animation("animation-pack/holding_1"):
return # Let dasher_hold keep playing
if anim_player and anim_player.has_animation("animation-pack/idle"):
anim_player.play("animation-pack/idle")
@@ -973,10 +968,10 @@ func apply_stagger(duration: float = 1.5):
# Play knock VFX sequence on the receiver
_play_knock_vfx()
if anim_player and anim_player.has_animation("dasher-pack/dasher_getting_hit"):
anim_player.play("dasher-pack/dasher_getting_hit")
if anim_player.has_animation("dasher-pack/dasher_stun"):
anim_player.queue("dasher-pack/dasher_stun")
if anim_player and anim_player.has_animation("animation-pack/getting_hit_1"):
anim_player.play("animation-pack/getting_hit_1")
if anim_player.has_animation("animation-pack/stun_1"):
anim_player.queue("animation-pack/stun_1")
# Set immunity (3 seconds as requested)
immunity_timer = 3.0
@@ -2415,10 +2410,10 @@ func sync_snatch_tekton(carrier_path: NodePath, tekton_path: NodePath):
is_charged_strike = false
SfxManager.play("pick_up_tekton_roaming")
if anim_player and anim_player.has_animation("dasher-pack/dasher_take"):
anim_player.play("dasher-pack/dasher_take")
if anim_player.has_animation("dasher-pack/dasher_hold"):
anim_player.queue("dasher-pack/dasher_hold")
if anim_player and anim_player.has_animation("animation-pack/pickup_1"):
anim_player.play("animation-pack/pickup_1")
if anim_player.has_animation("animation-pack/holding_1"):
anim_player.queue("animation-pack/holding_1")
# Visual feedback for the victim
if carrier.has_method("sync_bump"):
@@ -2431,10 +2426,10 @@ func sync_snatch_tekton(carrier_path: NodePath, tekton_path: NodePath):
func sync_grab_tekton(tekton_path: NodePath):
var tekton = get_node_or_null(tekton_path)
if tekton:
if anim_player and anim_player.has_animation("dasher-pack/dasher_take"):
anim_player.play("dasher-pack/dasher_take")
if anim_player.has_animation("dasher-pack/dasher_hold"):
anim_player.queue("dasher-pack/dasher_hold")
if anim_player and anim_player.has_animation("animation-pack/pickup_1"):
anim_player.play("animation-pack/pickup_1")
if anim_player.has_animation("animation-pack/holding_1"):
anim_player.queue("animation-pack/holding_1")
carried_tekton = tekton
self.is_carrying_tekton = true
@@ -2482,8 +2477,8 @@ func throw_tekton():
@rpc("any_peer", "call_local", "reliable")
func sync_throw_tekton(target_pos: Vector2i):
if anim_player and anim_player.has_animation("dasher-pack/dasher_put"):
anim_player.play("dasher-pack/dasher_put")
if anim_player and anim_player.has_animation("animation-pack/put_1"):
anim_player.play("animation-pack/put_1")
if carried_tekton:
var tekton = carried_tekton
carried_tekton = null
@@ -2567,8 +2562,8 @@ func drop_tekton():
@rpc("any_peer", "call_local", "reliable")
func sync_drop_tekton():
if anim_player and anim_player.has_animation("dasher-pack/dasher_put"):
anim_player.play("dasher-pack/dasher_put")
if anim_player and anim_player.has_animation("animation-pack/put_1"):
anim_player.play("animation-pack/put_1")
if carried_tekton:
var tekton = carried_tekton
carried_tekton = null
@@ -2606,8 +2601,8 @@ func update_active_player_indicator():
@rpc("any_peer", "call_local", "unreliable")
func sync_bump(target_pos: Vector2i, is_soft: bool = false):
"""Visual attack 'bump' or collision animation."""
if not is_soft and anim_player and anim_player.has_animation("dasher-pack/dasher_hit"):
anim_player.play("dasher-pack/dasher_hit")
if not is_soft and anim_player and anim_player.has_animation("animation-pack/hit_1"):
anim_player.play("animation-pack/hit_1")
# Always return to LOGICAL position to prevent character drift!
var original_pos = grid_to_world(current_position)
var target_world = grid_to_world(target_pos)
@@ -2654,8 +2649,8 @@ func knock_tekton():
@rpc("any_peer", "call_local", "reliable")
func sync_knock_tekton(tekton_path: NodePath):
if anim_player and anim_player.has_animation("dasher-pack/dasher_hit"):
anim_player.play("dasher-pack/dasher_hit")
if anim_player and anim_player.has_animation("animation-pack/hit_1"):
anim_player.play("animation-pack/hit_1")
var tekton = get_node_or_null(tekton_path)
if tekton:
# Intensity 2.0 for knock (drops 200% tiles) + Shrink/Recover