Skip to content

SelectionItem beta ​

Interface of @v12-engine/client

ts
export interface SelectionItem

One of what is selected, as the panels show it

Members ​

active ​

ts
active: boolean;

Of the type the command card is about

activity ​

ts
activity: string;

What it is doing now, in words: Idle, Moving

buffs ​

ts
buffs?: BuffInfo[];

The buffs it has now

carries ​

ts
carries?: string[];

Names of what a unit of someone else carries

carrying ​

ts
carrying?: number;

How much it carries of a resource, for a worker

carryingKind ​

ts
carryingKind?: ResourceId;

Which resource it carries

carryingName ​

ts
carryingName?: string;

The name of what it carries

color ​

ts
color: string;

CSS color of the owning player

construction ​

ts
construction?: number;

0..1 while under construction

health ​

ts
health: number;

Health it has now, in points

hero ​

ts
hero?: HeroDetails;

What the hero panel shows of it, when it is a hero

icon ​

ts
icon?: string;

Its type's picture (IconSet.units)

id ​

ts
id: number;

Unique id of the entity

inventory ​

ts
inventory?: (ItemSlot | null)[];

For units of the player that can carry things. Null for empty slots

lifetime ​

ts
lifetime?: {
        left: number;
        total: number;
    };

What is left of the time it lasts, for what is gone by itself after a while

mana ​

ts
mana?: number;

Mana it has now, in points; none for a unit that has none

maxHealth ​

ts
maxHealth: number;

Health it has at most, in points

maxMana ​

ts
maxMana?: number;

Mana it has at most, in points; none for a unit that has none

name ​

ts
name: string;

The entity's name as the player reads it

own ​

ts
own: boolean;

Whether it is the player's own

ownerName ​

ts
ownerName: string;

The name of the player who owns it

pools ​

ts
pools?: PoolBar[];

Its pools beside mana (UnitTypeDef.pools: energy, fury, heat…), in their order, as its mana is shown

queue ​

ts
queue?: QueueInfo[];

What it is training, building or researching, first in line first

queueTitle ​

ts
queueTitle?: string;

What its queue's panel is headed, by what it does first: "Training", "Researching", "Upgrading to", "Reviving" (the HUD's words, without the item)

resource ​

ts
resource?: {
        amount: number;
        kind: ResourceId;
        name: string;
    };

What is left in it, for a mine or a tree

shield ​

ts
shield?: number;

What its shields still hold

stats ​

ts
stats: StatLine[];

What it is capable of, the stats that are worth a line

typeId ​

ts
typeId: string;

The entity's unit type id