ModDef beta
Interface of @v12-engine/engine
ts
export interface ModDefA mod: changes to a game, made on top of it instead of on a copy of it. A new hero, other numbers, a rule of its own. composeGame applies mods to a game in the order they need each other, and tells about two mods that change the same thing without one knowing of the other, before anyone plays.
Members
apply
ts
apply(game: GameBuilder): void;Makes the changes, through the builder
id
ts
id: string;The mod's id, shared by every mod: others list it in requires
name
ts
name?: string;The mod's name as a list shows it; its id when left out
requires
ts
requires?: string[];The game and the mods it is made for, each id, id@1.2.3 (that version only) or id@^1.2 (that major version, from 1.2 on). The game counts as one of them, by its id and Rules.version
version
ts
version: string;major.minor.patch. Mods that need this one say which versions they work with