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

readCommands

readCommands<Read>(step, handles): Iterable<ReadCommand<HandlesOf<Read>>>

The commands of handle waiting for this system, one at a time in the queue’s order, or of several handles merged in the order the room admitted them: readCommands(step, [shop.commands.buy, shop.commands.sell]). Lazy: before it yields each, it checks the command’s lifetime and her control of the entity it acts through and resolves its entity fields, and refuses it with the reason instead of yielding it when one fails, so a reader that destroys a unit while handling one command never meets the next command for that unit as live. Every command it yields is settled or deferred before the system returns; one it never yields, as after an early break, stays queued. Only the system whose entry answers the handle reads it, on the room alone by type, or for a predicted command in a predicted system on her page and on the room, which meets the commands of the step’s tick in tick order: in development, a read by any other system throws naming the entry to add.

Type Parameter
Read extends PredictedReadHandles
Parameter Type
step PredictedStep
handles Read

Iterable<ReadCommand<HandlesOf<Read>>>

readCommands<Read>(step, handles): Iterable<ReadCommand<HandlesOf<Read>>>

The commands of handle waiting for this system, one at a time in the queue’s order, or of several handles merged in the order the room admitted them: readCommands(step, [shop.commands.buy, shop.commands.sell]). Lazy: before it yields each, it checks the command’s lifetime and her control of the entity it acts through and resolves its entity fields, and refuses it with the reason instead of yielding it when one fails, so a reader that destroys a unit while handling one command never meets the next command for that unit as live. Every command it yields is settled or deferred before the system returns; one it never yields, as after an early break, stays queued. Only the system whose entry answers the handle reads it, on the room alone by type, or for a predicted command in a predicted system on her page and on the room, which meets the commands of the step’s tick in tick order: in development, a read by any other system throws naming the entry to add.

Type Parameter
Read extends RoomReadHandles
Parameter Type
step AuthoritativeStep
handles Read

Iterable<ReadCommand<HandlesOf<Read>>>