isAvailable beta
Function of @v12-engine/engine
ts
export declare function isAvailable(world: World, player: PlayerId, kind: 'unit' | 'upgrade', id: string): boolean;Whether a player may make a unit type or research an upgrade at all, as their race goes (UnitTypeDef.race), and then as the game's available hook says: what they may not is not on their buttons, and an order for it is refused. What it requires is another question (unlocked), asked only of what is available