Skip to content

placementCells beta ​

Function of @v12-engine/engine

ts
export declare function placementCells(def: UnitTypeDef, point: Vec2, free: (cellX: number, cellZ: number) => boolean, explored?: (cellX: number, cellZ: number) => boolean): boolean[] | undefined;

Which cells of the ground a structure would cover at point are in the way, row by row from its corner (w across, d rows: siteOf's cell first): taken (free says no), or not explored (explored says no, where it is asked). What a preview draws cell by cell (RV88); placementProblem says the whole, the game's own say among it. None for a structure built on a resource, whose ground is the resource's