Hygiene B4c: clean dedup helpers (knockback, bakers, editor rig)

- KnockbackUtil.Stamp: shared knockback-stamp used by AbilityFireSystem + MeleeComboSystem (guard + planar normalize + write; speed passed in).
- BakerStructureExt: AddPlacedStructure/AddDamageable extensions on Baker<T>; rewired Turret/Structure/Harvester/Conveyor/Fabricator bakers (baked data + serialized fields unchanged).
- EnemyPrefabBakeExt.AddEnemyPrefabPool: shared prefab-buffer bake for ZoneEnemyDirector/WaveDirector authoring (fields stay flat — no serialization change).
- Editor AnimRigUtil (HasParam + root-yaw overlay clip) shared by PlayerRigTools/EnemyRigTools; EnemyRigTools.MakeMat now GUID-preserving (CopySerialized over existing) — the composite AnimatorController copy left as-is with a caveat comment.

466/466 EditMode tests pass, 0 warnings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-08 21:26:23 -07:00
parent e27a495530
commit 21a4c71413
19 changed files with 189 additions and 121 deletions
@@ -24,19 +24,11 @@ namespace ProjectM.Authoring
public override void Bake(StructureAuthoring authoring)
{
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
AddComponent(entity, new PlacedStructure
{
Type = authoring.Kind,
Cell = default,
NextTick = 0u,
LastProcessedTick = 0u,
});
this.AddPlacedStructure(entity, authoring.Kind);
// EB-1: Wall/Pylon are damageable + destructible AI targets (a wall soaks Husk strikes that would
// otherwise hit a turret). DamageEvent buffer MUST exist or an AI strike crashes at ECB playback.
// No HitRadius -> ProjectileDamageSystem ignores them (no friendly projectile fire).
AddComponent(entity, new Health { Current = authoring.MaxHp, Max = authoring.MaxHp });
AddBuffer<DamageEvent>(entity);
AddComponent<Destructible>(entity);
this.AddDamageable(entity, authoring.MaxHp);
}
}
}