Polishes
This commit is contained in:
@@ -23,6 +23,7 @@ namespace ProjectM.Authoring
|
||||
[Min(1)] public int PeriodTicks = 30;
|
||||
[Tooltip("EB-2: 1 = ledger-fed (consume the input from the shared ledger; no conveyor). 0 = M7 MachineInput chain.")]
|
||||
public byte InputFromLedger = 1;
|
||||
[Min(1f)] public float MaxHp = 120f;
|
||||
|
||||
private class FabricatorBaker : Baker<FabricatorAuthoring>
|
||||
{
|
||||
@@ -46,6 +47,14 @@ namespace ProjectM.Authoring
|
||||
InputFromLedger = authoring.InputFromLedger,
|
||||
});
|
||||
AddBuffer<MachineInput>(entity);
|
||||
// EB-1 parity (DR-032): machines can die. Without Health this baker left the Fabricator OUT of
|
||||
// the EnemyAISystem fortress-aggro snapshot entirely (its query keys on Health) — an invulnerable
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user