generateSystem

function generateSystem
universe/src/system.ts:1606
generateSystem(rootSeed: Seed, galaxy: GalaxyId, stub: SystemStub) → StarSystem

Generate a whole system from its stub.

Two passes. Confirmed planets are issued first, in the order astronomy issued them, so their addresses never move. Projected planets then fill the rest of the system: orbital radii from a geometric progression with per-orbit jitter — the Titius-Bode-shaped spacing that falls out of real formation dynamics — with each planet's properties drawn from its own seed, so the spacing and the contents stay independent.

A projected orbit that lands on top of a confirmed one is dropped rather than moved. docs/design/galaxy.md Rule 4: projections yield to observations, and the overlap test is deliberately generous — within a factor of 1.5 in semi-major axis — because the point is to avoid two bodies visibly sharing an orbit, not to be precise about a guess. Dropping rather than nudging keeps the projection a pure function of its own seed; nudging would make planet 6 depend on what the catalog says about planet 2, which is exactly the order-dependence the whole generator is built to avoid.

rootSeedSeed
Undocumented
galaxyGalaxyId
Undocumented
stubSystemStub
Undocumented
ReturnsStarSystem