AuthoritativeStep
A step on a world that decides outcomes: a room’s, or a game played
alone. A system with no runsOn receives one, and
if (step.authoritative) narrows a SystemStep to it. It is the
Authority every outcome function takes first, dealDamage(step, target, damage), and a call that only the room may make, such as a
knockback through pushCharacter from a system that is not a predicted system,
takes it too.
Extends
Section titled “Extends”NumberedStep.Authority
Properties
Section titled “Properties”| Property | Modifier | Type | Description |
|---|---|---|---|
[authorityBrand] |
readonly |
true |
- |
[entityAuthorityBrand] |
readonly |
true |
- |
authoritative |
readonly |
true |
True: this world decides outcomes, as isAuthoritative says. |
deltaSeconds |
public |
number |
The step’s length, which every caller passes as fixedStepSeconds. |
input? |
public |
StepInput |
What the characters under the client’s authority read. Left out where the caller steers none, as a room’s server does: each character keeps what she was last sent. |
moverRecords? |
public |
readonly MoverRecords[] |
Where the movers keep this step’s calls: one list an entity, the one whose entity names it, holding a record for each of its first four mover calls. A re-run call takes its record in place of sweeping where nothing the call reads has changed, and a page keeps one list for each entity of her set on each step it may re-run. Left out, the movers keep none. |
pushes? |
public |
boolean |
On a re-run, whether a character pushes a dynamic body she walks into, as the world’s own step does: a client’s replay, which does not rewind the body, leaves it. |
rerunEntities? |
public |
readonly Entity[] |
The entities a re-run steps: her page’s predicted set, as the room’s last word names it, re-run together after a correction. Only the predicted systems run on such a step, each once a tick over every entity of the set and nothing else, and input is left out: each steps on the InputTrait it holds. Left out on the world’s step. |
tick |
readonly |
number |
The room’s tick the step is for: on a room, its own step; on her page, the tick her page leads the room on, a replayed step the tick it first ran on; in a game with no room, its own step, from 0. |
world |
readonly |
World |
The world the step runs on: what a hook that receives a step, such as onPlayerJoin(step, player), reads its world from. |