libram
    Preparing search index...

    Class MenuItem<T>

    Type Parameters

    • T
    Index

    Constructors

    • Construct a new menu item, possibly with extra properties. Items in MenuItem.defaultOptions have intelligent defaults.

      Type Parameters

      • T

      Parameters

      • item: Item

        Item to add to menu.

      • options: MenuItemOptions<T> = {}

        Options for this menu item

        • organ

          Designate item as belonging to a specific organ.

        • size

          Override item organ size. Necessary for any non-food/booze/spleen item.

        • maximum

          Maximum uses remaining today, or "auto" to check dailyusesleft Mafia property.

        • additionalValue

          Additional value (positive) or cost (negative) to consider with item, e.g. from buffs.

        • effect

          Effect associated with this menu item (pocket wish effect, sweet synthesis effect, pill keeper potion extension)

        • mayo

          Which mayo to use before item (ignored if mayo clinic is not installed or item is not a food)

        • note

          Any note to track information about item, to be used later

      Returns MenuItem<T>

    Properties

    additionalValue?: number
    data?: T
    effect?: Effect
    item: Item
    maximum?: number
    mayo?: Item
    organ?: "food" | "booze" | "spleen item"
    priceOverride?: number
    size: number
    defaultPriceFunction: (item: Item) => number = ...

    Methods

    • Type Parameters

      • T

      Returns Map<
          Item,
          Partial<
              {
                  additionalValue: number;
                  data: T;
                  effect: Effect;
                  maximum: number
                  | "auto";
                  mayo: Item;
                  organ: "food" | "booze" | "spleen item";
                  priceOverride: number;
                  size: number;
                  useRetrievePrice: boolean;
              },
          >,
      >