CanPlace beta
Interface of @v12-engine/engine
ts
export interface CanPlaceWhether a structure may be placed. cancel(reason) refuses it, with what the player is told
Members
cancel
ts
cancel(reason?: MessageRef): void;Stops it. The reason is what the player is told, where this hook tells them (reason)
cancelled
ts
cancelled: boolean;Whether a handler has refused the placing; set by cancel()
def
ts
readonly def: UnitTypeDef;The unit type of the structure to be placed
player
ts
readonly player?: PlayerId;Who would build it. Left out when the engine asks for itself
reason
ts
reason?: MessageRef;What the player is told of why it was refused
site
ts
readonly site: Rect;The ground it would cover