OrderInits beta
Interface of @v12-engine/engine
export interface OrderInitsWhat 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:
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
attack: Pick<OrderParams, 'target' | 'facing'>;What a attack order is given (Order.init): the target to attack and the facing to keep
attackGround
attackGround: Pick<OrderParams, 'point' | 'target'>;What a attackGround order is given (Order.init): the point to attack and optionally an entity there
attackMove
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
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
board: Pick<OrderParams, 'target'>;What a board order is given (Order.init): the transport to board
build
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
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
construct: Pick<OrderParams, 'target'>;What a construct order is given (Order.init): the unfinished building to work on
dropItem
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
follow: Pick<OrderParams, 'target'>;What a follow order is given (Order.init): the entity to follow
followPath
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
harvest: Pick<OrderParams, 'target'>;What a harvest order is given (Order.init): the resource entity to gather from
hold
hold: Pick<OrderParams, 'facing'>;What a hold order is given (Order.init): facing: which way to face while holding
load
load: Pick<OrderParams, 'target'>;What a load order is given (Order.init): the unit for a transport to load
move
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
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
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
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
repair: Pick<OrderParams, 'target'>;What a repair order is given (Order.init): the building to repair
return
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
unload: Pick<OrderParams, 'point'>;What a unload order is given (Order.init): the point to unload the cargo at