ActionDef beta
Interface of @v12-engine/client
export interface ActionDef<C = unknown>Something the keys or the pointer do, by name, with the keys it comes with
Members
default
default: readonly BindingLike[];The keys it comes with. The player's own take their place, all of them
family
family?: string;Actions that are one of several (the ten control groups): those next to each other with the same words here are one line of the list of keys
group
group: string;What it is listed with: camera, selection, orders, heroes, groups, interface, or a heading of the game's own
held
held?: boolean;It goes on for as long as its key is down (scrolling the view): told when pressed and when let go of, and asked with held
hint
hint?: string;More of what it does, for the list of what the keys do
id
id: string;Its name: camera.left, worker.idle, td.sell. A game's own are best said with the game's name before them
label
label: string;What it is called, on the screen of the keys and the list of what they do
pointer
pointer?: boolean;It is on a button of the pointer and not on a key: what a click on the map does
repeat
repeat?: boolean;It is done again for as long as its key is held down, as the keyboard repeats it: a step taken back, a brush made bigger. Once a press, when left out. Not for one that is held, which is told when it is let go of
run
run?: (context: C, press: ActionPress) => boolean | void;What it does, where the client does not already (its own do). False when it is not this action's to do now: the next action on the same key is asked. For one that is held, called again as it is let go of (press.down)
shift
shift?: string;What Shift held with it means, in words, for an action it means something to (after what is already ordered). Shift is then no part of its keys: with or without, the action is the same one, and is told (press.shift)
when
when?: string;When it counts, where that is not always: hero (one is selected), card (its button is on the command card), or a word of the game's own. Two actions on one key that count at different times are not in each other's way
words
words?: string;More words it is found by in a search (the editor's Ctrl+K), not shown: what else it might be called