primaryMoon

function primaryMoon
universe/src/system.ts:2114
primaryMoon(planet: Body) → Body | null

The body a planet's parent-rise is taken from, or null when it has none.

The largest moon, which is the one a rise composition can rely on: it is where the picture holds still. Luna, Ganymede, Titan and Phobos are all tidally locked, so the parent sits fixed in their sky and what cycles is its phase — a rise from a moon that spins is right at the instant it is solved and is a different picture an hour later, which the composition handles by re-solving rather than by remembering.

Largest by radius rather than by mass, because the thing being chosen is a place to stand: a dense rock half the diameter of an icy one is the worse vantage whatever it weighs. A planet with nothing going round it gets null, and the panel draws a card that says so — an absent card cannot tell "this planet has no moons" from "this build forgot about it".

No surface filter here, deliberately. hasSolidSurface lives above this file in the import order, and the caller has to refuse an unstandable body anyway — Observatory.stand does, by name — so a filter here would be a second refusal that could disagree with the first.

planetBody
Undocumented
ReturnsBody | null