FoliageStyleDef beta
Interface of @v12-engine/engine
export interface FoliageStyleDefWhat a style of grass or bushes is to the rules: a value of a layer's cells (CellLayerValue.foliage), said in the game's code, in its data.json (GameData.cellLayers, every map) or in a map (GameMap.definitions, that map alone), each over the one before field by field. Plain data, every field: the editor writes it. What a value does not say is the layer's (FoliageLayerOptions.style), then what each field says it is when left out
Members
burns
burns?: number;How many seconds a cell of it burns before it is burnt: 6 when left out
conceals
conceals?: boolean;Whether it hides who stands in it from the teams that have nobody in the same patch (ConcealmentOptions): no when left out
concealsTaller
concealsTaller?: boolean;Whether it hides what is taller than it stands (height): yes when left out. With false, a unit taller than the grass is seen over it (FoliageConceal.heightOf)
flammable
flammable?: number;How easily it catches fire from a burning cell beside it, 0 (never: a firebreak) to 1 (as dry grass): 0 when left out, and nothing burns
fuel
fuel?: number;How hot it burns: how much likelier than 1 a burning cell of it is to light those beside it. 1 when left out
grows
grows?: number;Seconds it takes to grow back once it starts by itself (regrows): hiding as it grows, whole at the end. 10 when left out
height
height?: number;How tall it stands to the rules, in cells: what concealsTaller is measured against, 1 when left out. How it is drawn is the look's own height
regrows
regrows?: number | false;Seconds after it was burnt, cut or flattened that it starts to grow back by itself; false for never (until regrow). Never when left out
speed
speed?: number;How fast one on foot goes through it, as a multiplier of its speed (as CellLayerDef.speed, for this value alone): the layer's speed when left out, and 1 where the layer says none either
trample
trample?: 'none' | 'crush';What walking over it does to it, to the rules: crush lays it flat for good (flattened, which hides nobody) under those the layer says (FoliageLayerOptions.tramples); none when left out. How it bends on the screen and stands up again is the look's (FoliageLook.walked)
walkable
walkable?: boolean;Whether one on foot may walk through it: yes when left out. A hedge nothing goes through with false: the ways go round it as round a wall, whatever its state (a burnt hedge still stops, until its style is changed). Painted or cleared in play, the navigation's tiles it reaches are cut again: a few milliseconds a call on a big map, so not a call a tick