ResourceInfo beta
Interface of @v12-engine/client
export interface ResourceInfoWhat the player has, as the top bar shows it
Members
allies
allies?: {
id: number;
name: string;
color: string;
control: boolean;
vision: boolean;
team: boolean;
}[];The player's allies still in the game, to give resources to (see the engine's give) and share with (shareWith): whether the player shares control and sight with each, and whether they are of the player's team (who sees as one already). None for who only watches
amounts
amounts: ResourceAmount[];The game's resources, in its order
players
players?: ObservedPlayer[];For who only watches (GameSession.observer): every player's, a line each, in place of their own
supplies
supplies: {
id: string;
name: string;
used: number;
cap: number;
}[];The game's other pools of supply (RuleSettings.supply.pools), in its order: what each is called, used and its cap. None in a game with none
supply
supply: boolean;Whether the game has supply (food) at all: some unit takes it up, or some building provides it
supplyCap
supplyCap: number;The most supply the player's buildings provide
supplyUsed
supplyUsed: number;Supply (food) in use: what the player's units and buildings in the making take up
upkeep
upkeep: {
tier: number;
name: string;
income: number;
};The upkeep tier the player is at: its number, its name, and the share of income kept (1 for none cut)
upkept
upkept: string[];Names of the resources upkeep cuts into. Empty for a game without upkeep, which shows none