Move bull ability FX into the authorable systems/fx/ library
The bull's kick/dash/slam/roll and movement particles were ~112 lines of hand-built CPUParticles3D in player.gd, bypassing the Fx system entirely (Fx.spawn had zero callers) — so Siim couldn't author them in the inspector. - Add six inspector-editable effect scenes (bull_slam/kick/dash one-shots + bull_hoof_dust/charge_trail/roll_sparks continuous); wire player.gd to Fx.spawn() / new Fx.attach(); register them + the gallery + smoke test. - Extract the coded, non-particle slam rings + kick flash into a new bull_impact_fx.gd component (bull_legs.gd pattern). - Drop 12 now-obsolete DP dust look-params (the .tscn owns the look now). - Trim god-file comment noise: rewrite an AI-placeholder barrel block to typed code, drop dead commented-out bounce/topple code, fix stale post-reorg file paths (Assets/… → art/…, PascalCase scene names → snake_case). - Document the Siim workflow in systems/fx/README.md; update CLAUDE.md. player.gd 1307 → 944 lines. Full suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CCyaJPTHCH9EDthpf4A5Sj
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
extends SceneTree
|
||||
## Bear attack-FX test. The four attack effects (crater, smash debris, left/right claw slash)
|
||||
## live in Assets/fx/Bear_FX.glb as meshes that rest at scale 0 at Siim's baked positions. The
|
||||
## live in art/fx/bear_fx.glb as meshes that rest at scale 0 at Siim's baked positions. The
|
||||
## GLB carries its own AnimationPlayer whose clips scale one mesh up at its strike frame and
|
||||
## back to 0 (self-hiding) while pinning the others at 0. bear.gd fires the matching clip on
|
||||
## each strike (see _play_fx). This asserts each clip pops its own mesh, self-hides by the end,
|
||||
|
||||
@@ -26,10 +26,16 @@ func _run() -> void:
|
||||
root.add_child(host)
|
||||
current_scene = host
|
||||
|
||||
for id: StringName in [&"blood_burst", &"slam_dust", &"spark", &"hit_flash"]:
|
||||
for id: StringName in [&"blood_burst", &"slam_dust", &"spark", &"hit_flash",
|
||||
&"bull_slam", &"bull_kick", &"bull_dash"]:
|
||||
var inst: Node = fx.call("spawn", id, Transform3D.IDENTITY, host)
|
||||
_ok(inst != null and is_instance_valid(inst), "spawns %s" % id)
|
||||
|
||||
# Continuous bull effects are held (attach), not fired-and-forgotten (spawn).
|
||||
for id: StringName in [&"bull_hoof_dust", &"bull_charge_trail", &"bull_roll_sparks"]:
|
||||
var inst: Node = fx.call("attach", id, host)
|
||||
_ok(inst != null and is_instance_valid(inst), "attaches %s" % id)
|
||||
|
||||
var missing: Node = fx.call("spawn", &"does_not_exist", Transform3D.IDENTITY, host)
|
||||
_ok(missing == null, "unknown effect returns null instead of crashing")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user