Skip to content

AssembledGame beta ​

Interface of @v12-engine/engine

ts
export interface AssembledGame

A game put together with its packs (assembleGame): every list the engine runs, the packs' in it, in one place. A pack's parts come before the game's own, so that one of the game's of the same id or name takes its place; what the game leaves out of the engine's (withoutCommands, withoutOrders, withoutHooks, withoutSystems) it leaves out of its packs' too

Members ​

check ​

ts
readonly check: ((map: GameMap, registry: Registry) => MapProblem[]) | undefined;

What the game and its packs find wrong with a map, in the editor

commands ​

ts
readonly commands: readonly CommandDef[];

The packs' commands and the game's

components ​

ts
readonly components: readonly Component<unknown, unknown>[];

The components of the engine, packs and game

effects ​

ts
readonly effects: readonly EffectType[];

The packs' kinds of effects (GamePack.effects), before the game's own

events ​

ts
readonly events: readonly EventKey<unknown>[];

The events of the packs and the game

hooks ​

ts
readonly hooks: readonly HookDef[];

The hooks of the packs and the game

listeners ​

ts
readonly listeners: readonly ListenerDef[];

The listeners of the packs and the game

orders ​

ts
readonly orders: readonly OrderBehavior[];

The packs' orders and the game's

packSystems ​

ts
readonly packSystems: readonly SystemDef[];

The packs' systems, as given (made for each world, and left out by name then: withoutSystems)

replications ​

ts
readonly replications: readonly ReplicatedEvent[];

The packs' ways of telling the players of the world's events (GamePack.replications)

report ​

ts
readonly report: ((world: World, player: PlayerId) => Record<string, unknown>) | null;

The game's report of a player at the end, with each pack's beside it: none where none says

rules ​

ts
readonly rules: Rules;

The game the assembly is made of

settings ​

ts
readonly settings: RuleSettingsInit;

The game's rules with what each pack lays over them, in order

snapshotFields ​

ts
readonly snapshotFields: readonly SnapshotField[];

The packs' parts of the players' snapshots (GamePack.snapshotFields)

statFields ​

ts
readonly statFields: readonly StatField[];

The fields of stats the packs and the game add

stats ​

ts
readonly stats: readonly StatDef[];

The stats of the game: its packs' (GamePack.stats), then its own (Rules.stats)

timers ​

ts
readonly timers: readonly TimerDef[];

The timers of the packs and the game

victory ​

ts
readonly victory: SystemDef | null | undefined;

How it is won: the game's own where it says, else the last pack's that says, else the engine's (lastTeamStanding)