Files
Project-M/Assets/_Project/Scripts/Simulation/Economy/ResourceFieldSpawner.cs
T
kronic 7460ab9d1c Docs: hygiene sweep — stale/misattributed doc-comments + CLAUDE.md example
- Repoint CLAUDE.md testing example from the deleted HeartbeatSystemTests to HealthApplyDamageSystemTests.
- Stale deleted-system refs: ResourceFieldSpawner/ClutterFieldSpawner(+Authoring) now cite RoomFieldSystem (was ExpeditionFieldSystem); BuildPlaceRequest drops the deleted RegionTransitRequest from its 'mirrors' list.
- Stale package version: 'Netcode 1.13.2' -> 'Netcode 1.x' in ProjectileClassificationSystem + BuildPlaceRequest.
- WorldCollisionComponents: remove the duplicated EnvironmentMask summary line; FeelConfig: fix the mangled 'is hitmap)' sentence.

Comment/doc only; compiles clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 23:54:44 -07:00

32 lines
1.3 KiB
C#

using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// Baked singleton holding the resource-node ghost prefab + field shape. RoomFieldSystem reads it to
/// scatter <see cref="Count"/> nodes within <see cref="Radius"/> of the expedition region origin on each
/// Expedition phase entry (seeded by the cycle number). Mirrors <see cref="StorageSpawner"/>.
/// </summary>
public struct ResourceFieldSpawner : IComponentData
{
/// <summary>Baked resource-node ghost prefab to instantiate.</summary>
public Entity Prefab;
/// <summary>Number of nodes to scatter per expedition.</summary>
public int Count;
/// <summary>Scatter radius (world units) around the expedition region origin.</summary>
public float Radius;
}
/// <summary>
/// Server-only bookkeeping for <see cref="ProjectM.Server.RoomFieldSystem"/>, attached at runtime beside the
/// baked spawner singleton (the BaseFieldRuntime idiom): the <c>RunRuntime.RoomEpoch</c> this system last seeded,
/// int-equality-compared so each room's field scatters exactly once. NOT replicated; session-scoped.
/// </summary>
public struct RoomFieldState : IComponentData
{
public int LastSpawnedRoomEpoch;
}
}