Skip to content

OrderInits beta ​

Interface of @v12-engine/engine

ts
export interface OrderInits

What each order type is given (Order.init), by type (design review E14): the engine's, and a game's own added by declaration merging, as OrderStates is:

ts
declare module '@v12-engine/engine' {
	interface OrderInits {
		'mygame.dig': { point?: Vec2 }
	}
}

Every field may be missing from what a command sends, which comes from a player: the behaviour's accepts checks what it needs

Members ​

attack ​

ts
attack: Pick<OrderParams, 'target' | 'facing'>;

What a attack order is given (Order.init): the target to attack and the facing to keep

attackGround ​

ts
attackGround: Pick<OrderParams, 'point' | 'target'>;

What a attackGround order is given (Order.init): the point to attack and optionally an entity there

attackMove ​

ts
attackMove: Pick<OrderParams, 'point' | 'facing'>;

What a attackMove order is given (Order.init): the point to advance to, fighting what it meets, and the facing at the end

attackPath ​

ts
attackPath: Pick<OrderParams, 'path' | 'towards'>;

What a attackPath order is given (Order.init): the map path to advance along, fighting, and which end (towards) to go to

board ​

ts
board: Pick<OrderParams, 'target'>;

What a board order is given (Order.init): the transport to board

build ​

ts
build: Pick<OrderParams, 'unitType' | 'point' | 'facing'>;

What a build order is given (Order.init): the unit type to build, the point and the facing of the site

cast ​

ts
cast: Pick<OrderParams, 'ability' | 'item' | 'target' | 'point' | 'to'>;

What a cast order is given (Order.init): the ability, an item to use, the target, the point and the second point (to) of a vector ability

construct ​

ts
construct: Pick<OrderParams, 'target'>;

What a construct order is given (Order.init): the unfinished building to work on

dropItem ​

ts
dropItem: Pick<OrderParams, 'item' | 'point' | 'target'>;

What a dropItem order is given (Order.init): the inventory slot to drop, and the point or the unit to drop it at

follow ​

ts
follow: Pick<OrderParams, 'target'>;

What a follow order is given (Order.init): the entity to follow

followPath ​

ts
followPath: Pick<OrderParams, 'path' | 'towards'>;

What a followPath order is given (Order.init): the map path to follow by name and which end (towards) to go to

harvest ​

ts
harvest: Pick<OrderParams, 'target'>;

What a harvest order is given (Order.init): the resource entity to gather from

hold ​

ts
hold: Pick<OrderParams, 'facing'>;

What a hold order is given (Order.init): facing: which way to face while holding

load ​

ts
load: Pick<OrderParams, 'target'>;

What a load order is given (Order.init): the unit for a transport to load

move ​

ts
move: Pick<OrderParams, 'point' | 'facing' | 'target' | 'together' | 'speedCap' | 'faces'>;

What a move order is given (Order.init): point, facing, target, together, speedCap and faces: where to, which way to face at the end, an entity to go to, group pace, a unit to keep facing on the way

patrol ​

ts
patrol: Pick<OrderParams, 'point' | 'facing'>;

What a patrol order is given (Order.init): the point to patrol to and back from, and the facing

patrolPath ​

ts
patrolPath: Pick<OrderParams, 'path' | 'towards'>;

What a patrolPath order is given (Order.init): the map path to patrol along and which end (towards) to start towards

pickUp ​

ts
pickUp: Pick<OrderParams, 'target' | 'item'>;

What a pickUp order is given (Order.init): the item on the ground to pick up (target) and the inventory slot

repair ​

ts
repair: Pick<OrderParams, 'target'>;

What a repair order is given (Order.init): the building to repair

return ​

ts
return: Pick<OrderParams, 'target'>;

What a return order is given (Order.init): the hall to hand in at; the resource to go back to when left out

unload ​

ts
unload: Pick<OrderParams, 'point'>;

What a unload order is given (Order.init): the point to unload the cargo at