EB-2: felt spend - turrets burn a shared Charge pool, ledger-fed Fabricator mints it from Ore

Mined Ore now has an ongoing sink: a ledger-fed Fabricator converts Ore->Charge
(1 Ore -> 3 Charge / 30t) and turrets spend Charge per shot, soft-failing (no
shot, no cooldown burn) when the shared pool runs dry.

- ResourceId.Charge=4 rides the existing [GhostField] StorageEntry ledger (no new wire).
- TurretFireSystem: single ledger resolve + atomic spend / soft-fail / partial-refund.
- Fabricator.InputFromLedger (byte, server-only) feeds input from the shared ledger,
  read live in-loop so two machines split a finite pool; both modes deposit to ledger.
- HudSystem: violet Charge chip + global quiet-turret cue when siege && Charge==0.
- StorageMath.TotalOf backs the affordability read; catalog re-enables the Fabricator (4 entries).

See DR-033.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 19:14:52 -07:00
parent e04cdea44f
commit 2da29783fd
10 changed files with 94 additions and 28 deletions
+1 -1
View File
@@ -901,7 +901,7 @@ MonoBehaviour:
PylonCostOre: 2
HarvesterPrefab: {fileID: 0}
HarvesterCostOre: 20
FabricatorPrefab: {fileID: 0}
FabricatorPrefab: {fileID: 3885353946372160549, guid: 8dd9baab4cbf6c04f9320ed5ed764c65, type: 3}
FabricatorCostOre: 30
ConveyorPrefab: {fileID: 0}
ConveyorCostOre: 2