using Unity.Entities;
using Unity.NetCode;
namespace ProjectM.Simulation
{
///
/// Destructible "Blight clutter" scattered across the expedition frontier — an ownerless INTERPOLATED ghost
/// (region-tagged Expedition; the sibling) that clients see and smash. The
/// server-only ResourceHarvestSystem sweeps projectiles against it UNIFIED with node harvesting (so an
/// overlapping projectile is consumed exactly once — two separate sweeps would double-DestroyEntity the
/// projectile and throw at ECB playback). Each hit deposits of
/// (a small trickle — "juice + minor scrap", no gating) into the GLOBAL
/// resource ledger and decrements ; the clutter despawns at <= 0.
/// / are [GhostField] so clients can show depletion + pick a smash
/// visual; / are baked, server-only. Distinct from
/// so it carries its own visuals, scatter density and client "clear" feedback while
/// reusing the exact, tunnel-safe harvest hit-test.
///
public struct BlightClutter : IComponentData
{
/// Remaining hit-points; the clutter despawns when this reaches 0.
[GhostField] public int Remaining;
/// Visual variant id (the client picks a mesh/tint; round-robined by the field spawner).
[GhostField] public byte Variant;
/// Scrap resource yielded per hit (baked; server-only) — see (Biomass).
public byte ScrapResourceId;
/// Scrap units yielded per projectile hit (baked; server-only).
public float ScrapPerHit;
}
}