definePiece
definePiece(
name,options?):PieceHandle
Declares a piece players place on the grid: a prefab named name,
with every prefab option, and its slot, footprint, height, whether it
stands on the ground and its variants. One with model and no view
is drawn by the kit, in one batch with every copy of its model. One
with no collider takes a box that fits its slot, sized by the grid
of the plugin that lists it. As Valheim’s Piece and a GridMap’s
item. Throws for a footprint or a height that is not a whole number of
cells from 1, and a wall whose depth is not 1.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
options |
DefinePieceOptions |