Skip to content

LaneRegistry beta ​

Class of @v12-engine/client/common

ts
export declare class LaneRegistry

The lanes known, by kind: the client's own and the game's (kit.lanes). One of a kind already there takes its place, so a game may replace a built-in

Members ​

constructor ​

ts
constructor(lanes?: Iterable<AnyLane>);

Constructs a new instance of the LaneRegistry class

add ​

ts
add(lane: AnyLane): void;

Registers a lane under its kind, replacing one of that kind

get ​

ts
get(kind: string): LaneDef | undefined;

Returns the lane of a kind, or undefined when none is registered

has ​

ts
has(kind: string): boolean;

Whether a lane of that kind is registered

kinds ​

ts
kinds(): string[];

Returns the kinds of every registered lane, in the order they were added

list ​

ts
list(): LaneDef[];

Every lane, in the order they were added: how the editor lists them