Skip to content

IdSource beta ​

Class of @v12-engine/editor

ts
export declare class IdSource

The ids of what is made on a map, kind by kind: each starts past the highest the map has (ID_SPREAD past it at most), and goes up by one with each that is made

Members ​

constructor ​

ts
constructor(map: GameMap, spread: number, rng: Rng);

Constructs a new instance of the IdSource class

next ​

ts
next(kind: IdKind): number;

An id for one of a kind, taken

peek ​

ts
peek(kind: IdKind): number;

The id the next one of a kind will have, not taken