mwg API
    Preparing search index...

    Interface Ingredient

    What one recipe ingredient consumes. id is the simple case: one exact item, or any of several. category asks for any item of a kind ("any herb plus any runestone"), matching the category an item's definition carries. matches is the escape hatch when neither fits. Give exactly one of the three.

    interface Ingredient {
        category?: string;
        id?: string | readonly string[];
        matches?: (item: InventoryItem) => boolean;
        quantity: number;
    }
    Index
    category?: string

    any item whose category is this

    id?: string | readonly string[]

    one exact item id, or any of several

    matches?: (item: InventoryItem) => boolean

    full control: an item this returns true for

    quantity: number

    how many items matching this the recipe needs