using Unity.Entities;
using Unity.NetCode;
namespace ProjectM.Simulation
{
/// Resource-type ids for harvested materials (a byte, not an enum, per the cross-assembly enum-in-Burst hazard).
public static class ResourceId
{
/// Unused / empty sentinel (aligns with StorageMath's 0-itemId no-op).
public const byte None = 0;
/// Magic energy — powers abilities / charging.
public const byte Aether = 1;
/// Raw ore — structures / building.
public const byte Ore = 2;
/// Biomass — misc / crafting.
public const byte Biomass = 3;
}
///
/// A harvestable resource node in the procedural expedition field — an ownerless INTERPOLATED ghost
/// (region-tagged Expedition) that clients see and shoot. The server-only ResourceHarvestSystem sweeps
/// projectiles against it; each hit deposits of into
/// the GLOBAL resource ledger and decrements ; the node despawns at <= 0.
/// ResourceId/Remaining are [GhostField] so clients can tint by type and (later) show depletion;
/// HarvestPerHit is baked, server-only.
///
public struct ResourceNode : IComponentData
{
/// Which resource this node yields (see ).
[GhostField] public byte ResourceId;
/// Remaining resource units; the node despawns when this reaches 0.
[GhostField] public int Remaining;
/// Units yielded per projectile hit (baked; server-only).
public float HarvestPerHit;
}
}