Map Updates

This commit is contained in:
2026-06-04 21:49:03 -07:00
parent 16b01bec38
commit 15bc1022ee
43 changed files with 4054 additions and 62 deletions
@@ -17,6 +17,10 @@ namespace ProjectM.Simulation
public const byte Harvester = 2;
public const byte Fabricator = 3;
public const byte Conveyor = 4;
// World-pass structural/cosmetic build-out (additive; these byte values keep PlacedStructure.Type's
// [GhostField] serializer identical — no re-bake of existing ghosts). Do NOT reuse 2-4 (M7 automation).
public const byte Wall = 5;
public const byte Pylon = 6;
}
/// <summary>
@@ -0,0 +1,33 @@
using Unity.Entities;
using Unity.NetCode;
namespace ProjectM.Simulation
{
/// <summary>
/// Destructible "Blight clutter" scattered across the expedition frontier — an ownerless INTERPOLATED ghost
/// (region-tagged Expedition; the <see cref="ResourceNode"/> 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 <see cref="ScrapPerHit"/> of
/// <see cref="ScrapResourceId"/> (a small trickle — "juice + minor scrap", no gating) into the GLOBAL
/// resource ledger and decrements <see cref="Remaining"/>; the clutter despawns at &lt;= 0.
/// <see cref="Remaining"/>/<see cref="Variant"/> are [GhostField] so clients can show depletion + pick a smash
/// visual; <see cref="ScrapResourceId"/>/<see cref="ScrapPerHit"/> are baked, server-only. Distinct from
/// <see cref="ResourceNode"/> so it carries its own visuals, scatter density and client "clear" feedback while
/// reusing the exact, tunnel-safe harvest hit-test.
/// </summary>
public struct BlightClutter : IComponentData
{
/// <summary>Remaining hit-points; the clutter despawns when this reaches 0.</summary>
[GhostField] public int Remaining;
/// <summary>Visual variant id (the client picks a mesh/tint; round-robined by the field spawner).</summary>
[GhostField] public byte Variant;
/// <summary>Scrap resource yielded per hit (baked; server-only) — see <see cref="ResourceId"/> (Biomass).</summary>
public byte ScrapResourceId;
/// <summary>Scrap units yielded per projectile hit (baked; server-only).</summary>
public float ScrapPerHit;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: dd7823b664bb48e4e89d64439997d147
@@ -0,0 +1,24 @@
using Unity.Entities;
namespace ProjectM.Simulation
{
/// <summary>
/// Baked singleton holding the Blight-clutter ghost prefab + field shape. ExpeditionFieldSystem reads it
/// (alongside <see cref="ResourceFieldSpawner"/>) to scatter <see cref="Count"/> clutter ghosts within
/// <see cref="Radius"/> of the expedition origin on the SAME empty-&gt;occupied epoch edge as the resource
/// field (seeded distinctly so clutter and nodes don't co-locate), and clears them on occupied-&gt;empty.
/// OPTIONAL — if the singleton is absent, ExpeditionFieldSystem simply skips clutter. Mirrors
/// <see cref="ResourceFieldSpawner"/>; carries no transform.
/// </summary>
public struct ClutterFieldSpawner : IComponentData
{
/// <summary>Baked Blight-clutter ghost prefab to instantiate.</summary>
public Entity Prefab;
/// <summary>Number of clutter pieces to scatter per expedition.</summary>
public int Count;
/// <summary>Scatter radius (world units) around the expedition region origin.</summary>
public float Radius;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 22d21ff4c74c22443ba94c88db9ec099