Skip to content

groupRefusal beta ​

Function of @v12-engine/engine

ts
export declare function groupRefusal(registry: Pick<Registry, 'items' | 'settings'>, carried: readonly string[], item: string, uses?: readonly string[], handed?: boolean): Message | undefined;

Why one who carries these items (by id) may not take one more of an item's group (ItemDef.group), or nothing when it may: the engine's part of carryRefusal, which a screen asks too, with the game's registry alone, to say so before the buy (the shop window). uses are the parts buying it uses up: they go out as it comes in, so they are not counted. The limit is the item's own, the game's of the group (ItemSettings.groups), or 1