LocalLaboratory (Distribution Spot)

Overview

A lightweight, per-region Distribution Spot. Generates revenue and contributes supply each tick based on a configurable local production atom. Implements TickBehavior and IRuntimeSaveable with a minimal save payload (header only).

Serialized Atoms

  • FloatVariable moneyPerUnit
  • FloatVariable currentMoney
  • FloatVariable localLabProduction

Runtime

  • Region region — assigned by the region that owns this Distribution Spot.

Tick

  • Adds money: currentMoney += min(localLabProduction, region.LocalDemand) * moneyPerUnit.
  • Increments region supply: region.SupplyPerTick += localLabProduction.

Save / Load

  • OnSave — writes a standard header with PrefabType="LocalLaboratory" and the Region name as RegionId.
  • OnLoad — reads header, re-parents under the Region GameObject by name, and sets region. No extra fields are persisted.

Notes

  • No routes or upgrades are managed here; use Laboratory for networked production.