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:
@@ -21,13 +21,7 @@ namespace ProjectM.Authoring
|
||||
public override void Bake(TurretAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent(entity, new PlacedStructure
|
||||
{
|
||||
Type = StructureType.Turret,
|
||||
Cell = default,
|
||||
NextTick = 0u,
|
||||
LastProcessedTick = 0u,
|
||||
});
|
||||
this.AddPlacedStructure(entity, StructureType.Turret);
|
||||
AddComponent(entity, new Turret
|
||||
{
|
||||
Range = authoring.Range,
|
||||
@@ -38,9 +32,7 @@ namespace ProjectM.Authoring
|
||||
// destroys a Destructible at Health<=0). The DamageEvent buffer MUST exist on the archetype or an
|
||||
// AI/turret strike crashes at ECB playback. NO HitRadius on purpose -> ProjectileDamageSystem (needs
|
||||
// Health+HitRadius) ignores structures, so player shots never friendly-fire your own turret.
|
||||
AddComponent(entity, new Health { Current = authoring.MaxHp, Max = authoring.MaxHp });
|
||||
AddBuffer<DamageEvent>(entity);
|
||||
AddComponent<Destructible>(entity);
|
||||
this.AddDamageable(entity, authoring.MaxHp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user