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(ConveyorAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent(entity, new PlacedStructure
|
||||
{
|
||||
Type = StructureType.Conveyor,
|
||||
Cell = default,
|
||||
NextTick = 0u,
|
||||
LastProcessedTick = 0u,
|
||||
});
|
||||
this.AddPlacedStructure(entity, StructureType.Conveyor);
|
||||
AddComponent(entity, new Conveyor
|
||||
{
|
||||
Direction = authoring.Direction,
|
||||
|
||||
@@ -30,13 +30,7 @@ namespace ProjectM.Authoring
|
||||
public override void Bake(FabricatorAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent(entity, new PlacedStructure
|
||||
{
|
||||
Type = StructureType.Fabricator,
|
||||
Cell = default,
|
||||
NextTick = 0u,
|
||||
LastProcessedTick = 0u,
|
||||
});
|
||||
this.AddPlacedStructure(entity, StructureType.Fabricator);
|
||||
AddComponent(entity, new Fabricator
|
||||
{
|
||||
InResourceId = authoring.InResourceId,
|
||||
@@ -52,9 +46,7 @@ namespace ProjectM.Authoring
|
||||
// machine, diverging from DR-032. Now that it IS targetable, the DamageEvent buffer must exist
|
||||
// (an AI strike appends into it; absent = ECB-playback throw) + Destructible lets
|
||||
// HealthApplyDamageSystem destroy it at 0 (occupancy auto-frees).
|
||||
AddComponent(entity, new Health { Current = authoring.MaxHp, Max = authoring.MaxHp });
|
||||
AddBuffer<DamageEvent>(entity);
|
||||
AddComponent<Destructible>(entity);
|
||||
this.AddDamageable(entity, authoring.MaxHp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,13 +22,7 @@ namespace ProjectM.Authoring
|
||||
public override void Bake(HarvesterAuthoring authoring)
|
||||
{
|
||||
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
||||
AddComponent(entity, new PlacedStructure
|
||||
{
|
||||
Type = StructureType.Harvester,
|
||||
Cell = default,
|
||||
NextTick = 0u,
|
||||
LastProcessedTick = 0u,
|
||||
});
|
||||
this.AddPlacedStructure(entity, StructureType.Harvester);
|
||||
AddComponent(entity, new Harvester
|
||||
{
|
||||
ResourceId = authoring.OutputResourceId,
|
||||
|
||||
Reference in New Issue
Block a user