Skip to content

SessionDebug beta ​

Interface of @v12-engine/engine

ts
export interface SessionDebug

What the debug tools of a client see of the simulation: an entity as the rules have it, and the events and hooks of the last seconds. Plain data, as the snapshots are, so that it works the same with a simulation somewhere else: the client says what it wants to follow, and reads what came back last

Members ​

clearLog ​

ts
clearLog(): void;

Forgets what was logged so far

inspect ​

ts
inspect(target: InspectTarget | null): void;

Follows an entity, a player or the world, or nothing. Its inspection comes back from then on

inspection ​

ts
readonly inspection: Inspection | null;

What is followed, as it stood when last heard of. Null when nothing is followed, or it is gone

listing ​

ts
listing: boolean;

Whether the list of everything in the world comes back. Off until asked for: the world can be big

log ​

ts
log(): readonly LoggedEvent[];

The events and hooks of the last seconds, oldest first

logging ​

ts
logging: boolean;

Whether the events and hooks are logged. Off until asked for: logging costs a little

set ​

ts
set(path: (string | number)[], value: number | boolean): void;

Changes a number, or a switch (a boolean), of what is followed, where its inspection shows it (InspectedSection.path and the key)

world ​

ts
readonly world: WorldListing | null;

Every player and entity of the world, out of sight, hidden and scenery too, as when last heard of. Null while not listing