freemode fishing tekton autoplay + static tekton throw fix

- Added tekton_fishing_autoplay.gd: plays both GLB animations simultaneously, looped
- Attached autoplay script to 3 fishing tekton instances in freemode.tscn
- Fixed static tekton throw: faces throw direction + plays throw animation
- Fixed AnimationPlayer path in tekton.gd for static turrets
- Fixed animation names (tekton_throw_tile -> ted_bones_001|Tekton Throwing Tiles|Anima_Layer)
- Fixed static_tekton_controller.gd idle resume
- Rebuilt animation-pack.res with new animations (holding_1, put_1, stun_1, etc.)
- Fixed GutBottomPanel.tscn broken UID
This commit is contained in:
2026-06-15 18:15:39 +08:00
parent 844ec194cb
commit 5354d8b30f
25 changed files with 242 additions and 156 deletions
+30 -11
View File
@@ -418,6 +418,7 @@ func _init_managers():
movement_manager.name = "MovementManager"
add_child(movement_manager)
movement_manager.initialize(self , enhanced_gridmap)
movement_manager.movement_finished.connect(_on_movement_finished)
race_manager = load("res://scripts/managers/player_race_manager.gd").new()
race_manager.name = "RaceManager"
@@ -646,8 +647,10 @@ 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("animation-pack/holding_1"):
return # Let dasher_hold keep playing
if is_carrying_tekton:
if anim_player and anim_player.has_animation("animation-pack/holding_walk"):
anim_player.play("animation-pack/holding_walk", -1, ANIMATION_SPEED)
return
if anim_player and anim_player.has_animation("animation-pack/walk_forward"):
anim_player.play("animation-pack/walk_forward", -1, ANIMATION_SPEED)
@@ -668,11 +671,16 @@ 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("animation-pack/holding_1"):
return # Let dasher_hold keep playing
if is_carrying_tekton:
if anim_player and anim_player.has_animation("animation-pack/holding_1"):
anim_player.play("animation-pack/holding_1")
return
if anim_player and anim_player.has_animation("animation-pack/idle"):
anim_player.play("animation-pack/idle")
func _on_movement_finished() -> void:
play_idle_animation()
# =============================================================================
# Network-Synced Animation Functions
# =============================================================================
@@ -2378,6 +2386,8 @@ func grab_tekton():
if tekton:
if is_multiplayer_authority() and can_rpc():
rpc("sync_grab_tekton", tekton.get_path())
elif is_multiplayer_authority():
sync_grab_tekton(tekton.get_path())
func snatch_tekton(target_carrier: Node3D):
if not is_multiplayer_authority() or not target_carrier.is_carrying_tekton:
@@ -2387,6 +2397,8 @@ func snatch_tekton(target_carrier: Node3D):
if tekton:
if is_multiplayer_authority() and can_rpc():
rpc("sync_snatch_tekton", target_carrier.get_path(), tekton.get_path())
elif is_multiplayer_authority():
sync_snatch_tekton(target_carrier.get_path(), tekton.get_path())
@rpc("any_peer", "call_local", "reliable")
func sync_snatch_tekton(carrier_path: NodePath, tekton_path: NodePath):
@@ -2487,16 +2499,23 @@ func sync_throw_tekton(target_pos: Vector2i):
tekton.set_thrown(true)
else:
tekton.set_carried(false)
# Face tekton toward throw direction
var end_world_pos = Vector3(
target_pos.x * cell_size.x + cell_size.x * 0.5,
cell_size.y,
target_pos.y * cell_size.z + cell_size.z * 0.5
) + cell_offset
tekton.look_at(Vector3(end_world_pos.x, tekton.global_position.y, end_world_pos.z), Vector3.UP)
# Play throw animation on the tekton
if tekton.has_method("play_animation"):
tekton.play_animation("ted_bones_001|Tekton Throwing Tiles|Anima_Layer")
# Visual Arc Tween
var start_pos = tekton.global_position
# Target world position
var end_world_pos = Vector3(
target_pos.x * cell_size.x + cell_size.x * 0.5,
cell_size.y, # Floor Y
target_pos.y * cell_size.z + cell_size.z * 0.5
) + cell_offset
# end_world_pos already computed above for facing
var mid_pos = (start_pos + end_world_pos) / 2.0
mid_pos.y += 4.0 # Arc height