Skip to content

HarvestKept beta ​

Interface of @v12-engine/engine

ts
export interface HarvestKept

What harvesting keeps through every step of it, and from one load to the next: the kind it gathers and where it last did, the resource it holds a place at (claimed, a tree, a place round a building on a resource), the building it gathers at (inPlace), the place it walks to and the one it waits at, whether it walked to its place already, the seconds to its next swing (chop: the rhythm goes on from one load to the next), the hall it brings its loads to

Members ​

at ​

ts
at?: Vec2;

Where the resource it last gathered from stands, to look for the next of its kind near

chop ​

ts
chop?: number;

Seconds to its next swing at a tree; the rhythm goes on from one load to the next

claimed ​

ts
claimed?: EntityId;

The resource whose place at it the worker holds (a tree, or a place round a building on a resource); 0 or unset when none

dropOff ​

ts
dropOff?: EntityId;

The building it last brought, or is bringing, its load to; reset to 0 after each hand-in so the closest is chosen again

inPlace ​

ts
inPlace?: EntityId;

The building of its owner's that stands on the resource it gathers, where it works round that building; 0 or unset otherwise

kind ​

ts
kind?: ResourceId;

The resource kind the worker gathers, set once it knows what it works

outOfReach ​

ts
outOfReach?: EntityId[];

The trees it walked to and could not get next to, the last few: not gone for again by this order

spot ​

ts
spot?: Vec2;

The place it walks to and works from, in front of its tree or round the building

waitSpot ​

ts
waitSpot?: Vec2;

The place it waits at, beside a mine or building with no room; cleared once it gets a place

walked ​

ts
walked?: boolean;

Whether it has already set off for its spot, so a spot someone stands on is told from one not yet walked to