API: chem
Function: readMetabolicState()
lifecycle-kit
lifecycle-kit / chem / readMetabolicState
Function: readMetabolicState()
readMetabolicState(
raw):MetabolicState
Defined in: chem/metabolism.ts:296
Read a metabolic state that was persisted as JSON.
koota traits hold flat values, so the state lives as a string on the Metabolism trait. A malformed or absent record falls back to a newborn rather than throwing, so an old save loads into the new system instead of bricking — and so a caller reading mass never has to handle a parse error to answer "how big is it".
Parameters
raw
string | undefined
