Skip to content

BurningOptions beta ​

Interface of @v12-engine/engine

ts
export interface BurningOptions extends BurnsDef

What the burning pack is made with (burningPack): what burns, how (the defaults of BurnsDef, under what a type says), whether fire passes from one thing to the next, what it does to those who stand by, and how much may burn

Members ​

burns ​

ts
burns?: (world: World, entity: Entity) => boolean | BurnsDef | undefined;

What burns, and how, in code: true (as its type and the pack say), a BurnsDef over those, or false. Where it says nothing, its type's burns; where that says nothing, what can be felled (fellable: trees)

damage ​

ts
damage?: number;

Damage a second to units on the ground within damageReach of a burning thing, by whoever lit it (the first of those about it, in order of their ids): none when left out. Dealt twice a second, each unit on a turn of its own

damageReach ​

ts
damageReach?: number;

How far its heat hurts, edge to edge, in cells: 1 when left out

damageType ​

ts
damageType?: DamageType;

The type that damage is dealt as: magic when left out

lightsFoliage ​

ts
lightsFoliage?: boolean | readonly string[];

Whether a burning thing may set alight the grass about it, in a game with the foliage pack too (foliagePack): the cells under it and one cell round, of every layer of that pack, or of those named. No when left out. It passes as fire does, not at once: once a second while it burns, each cell by a chance of its own (0.2 for a style of flammable 1 in still, dry air, likelier downwind), asked of the game (foliageIgnite, cause: 'burning'), under the most that may burn there (FoliageFire.maxBurning). What caught is set alight at the end of this pack's turn, and tries nothing before its own next turn. The other way is that pack's to say (FoliageFire.lights)

maxBurning ​

ts
maxBurning?: number;

The most things that burn at once: past it, nothing more catches until something has burnt down. 2000 when left out

spread ​

ts
spread?: BurningSpread | boolean;

Whether a burning thing lights what burns about it (BurningSpread): true for the defaults. Never when left out