Interface IProduction


public interface IProduction
Interface for interacting with production interfaces in the game.

This interface provides methods to interact with skilling interfaces such as crafting, smithing, cooking, and other production activities. It allows selecting items to produce, specifying quantities, and entering custom amounts.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    chooseOption(int index)
    Chooses a production option by its index position in the interface.
    default void
    Chooses a production option containing the specified text (case-insensitive).
    void
    Chooses a production option that matches the given predicate.
    void
    Chooses the previously selected production option.
    void
    enterAmount(int amount)
    Enters a numeric amount into the currently open input dialog.
    void
    Enters a text name into the currently open input dialog.
    int
    Gets the currently set "Make X" quantity value.
    Gets the currently selected production quantity option.
    boolean
    Checks if an input dialog for entering amounts or names is currently open.
    boolean
    Checks if a production interface is currently open.
    void
    selectItem(int itemId)
    Selects an item in the production interface by its item ID.
    void
    Selects an item in the production interface by its name.
    boolean
    selectMakeXQuantity(int quantity)
    Sets the "Make X" quantity to the specified value.
    void
    Selects the "Other" quantity option in the production interface, which allows entering a custom amount.
    boolean
    Selects a predefined production quantity option.
  • Method Details

    • isOpen

      boolean isOpen()
      Checks if a production interface is currently open.
      Returns:
      true if a production interface is open, false otherwise
    • chooseOption

      void chooseOption(Predicate<String> option)
      Chooses a production option that matches the given predicate.
      Parameters:
      option - the predicate to match against option text
    • chooseOption

      default void chooseOption(String option)
      Chooses a production option containing the specified text (case-insensitive).
      Parameters:
      option - the text to search for in option names
    • selectOtherQuantity

      void selectOtherQuantity()
      Selects the "Other" quantity option in the production interface, which allows entering a custom amount.
    • chooseOption

      void chooseOption(int index)
      Chooses a production option by its index position in the interface.
      Parameters:
      index - the zero-based index of the option to select
    • choosePreviousOption

      void choosePreviousOption()
      Chooses the previously selected production option. This is typically bound to the spacebar in the game interface.
    • isEnterInputOpen

      boolean isEnterInputOpen()
      Checks if an input dialog for entering amounts or names is currently open.
      Returns:
      true if an input dialog is open, false otherwise
    • enterAmount

      void enterAmount(int amount)
      Enters a numeric amount into the currently open input dialog.
      Parameters:
      amount - the amount to enter
    • enterName

      void enterName(String input)
      Enters a text name into the currently open input dialog.
      Parameters:
      input - the text to enter
    • selectItem

      void selectItem(String name)
      Selects an item in the production interface by its name.
      Parameters:
      name - the name of the item to select
    • selectItem

      void selectItem(int itemId)
      Selects an item in the production interface by its item ID.
      Parameters:
      itemId - the ID of the item to select
    • getMakeXQuantity

      int getMakeXQuantity()
      Gets the currently set "Make X" quantity value.
      Returns:
      the current Make X quantity
    • selectMakeXQuantity

      boolean selectMakeXQuantity(int quantity)
      Sets the "Make X" quantity to the specified value.
      Parameters:
      quantity - the quantity to set
      Returns:
      true if the quantity was successfully set, false otherwise
    • getSelectedQuantity

      ProductionQuantity getSelectedQuantity()
      Gets the currently selected production quantity option.
      Returns:
      the selected ProductionQuantity, or null if none is selected
    • selectQuantity

      boolean selectQuantity(ProductionQuantity quantity)
      Selects a predefined production quantity option.
      Parameters:
      quantity - the quantity option to select
      Returns:
      true if the quantity was successfully selected, false otherwise