()
| 125 | // so species renames and SPECIES-array edits can't break stored companions, |
| 126 | // and editing config.companion can't fake a rarity. |
| 127 | export function getCompanion(): Companion | undefined { |
| 128 | const stored = getGlobalConfig().companion |
| 129 | if (!stored) return undefined |
| 130 | const { bones } = roll(companionUserId()) |
| 131 | // bones last so stale bones fields in old-format configs get overridden |
| 132 | return { ...stored, ...bones } |
| 133 | } |
| 134 | |
| 135 |
no test coverage detected