Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

readPastTraits

readPastTraits(world, entity, step): Record<string, unknown> | undefined

entity’s traits at the room’s step as her screen held them: her health, a game’s own shield, any trait the stream carries. Her page takes each send’s traits as it lands and draws toward it, so between two sends they are the second’s, as readSentZones reads a target’s zones; the last send’s for a step past it, and the oldest’s within a second for a step older than any. Undefined in a world with no sends, such as a page’s, and for an entity that send did not hold. A copy: the stream diffs its next send against the dump itself.

Parameter Type
world World
entity Entity
step number

Record<string, unknown> | undefined