Type Parameters

Hierarchy

Properties

bindable?: default | ((using: IUsableActionUsing<REQUIREMENTS>) => undefined | default)

The bindable assigned to this action, for use in action context menus (ie, right clicking on the world or an item.) Allows for a dynamically generated bindable based on what this action is using — item, doodad, etc.

clientSide?: true

Marks this usable action as only executable client-side. This disables support for "auto-use" in action slots.

displayLevel?: ActionDisplayLevel | ((using: IUsableActionPossibleUsing) => undefined | ActionDisplayLevel)

The contexts this action appears in.

  • "Always" means whenever an action of this type is shown, it will be. For example, the "item actions" menu.
  • "Direct" means whenever an action of this type is applicable to given objects, it will be. For example, a specific item's menu.
  • "Never" means it will never be shown in menus. This results in an action which is executable but never appears in menus.
execute?: undefined
forceDisplayWhenEmpty?: true
icon?: SupplierOr<false | UsableActionIconReference, [using: IUsableActionPossibleUsing, action: default<REQUIREMENTS, IUsableActionDefinition<REQUIREMENTS>>, context: UsableActionDisplayContext]>

The icon this action should have, if any.

iconLocationOnItem?: ItemDetailIconLocation

Where the icon should appear, when slotted with an item. Defaults to bottom right.

Generally, top left means "something else interacting with the slotted item" rather than "the slotted item interacting with something."
For example, "Harvest" shows in bottom right, because it's using this tool to harvest. Whereas "Repair With X" shows in top left, because it's repairing this tool.

id?: string | number
inspectTypes?: InspectType[]
onlySlotItemQuality?: true

Marks this usable action as, when slotted in the action bar on an item, the item should be ignored and instead the quality should be used. Compatible with onlySlotItemType

onlySlotItemType?: true

Marks this usable action as, when slotted in the action bar on an item, the item should be ignored and instead the type should be used. Compatible with onlySlotItemQuality

priority?: number | ((using: IUsableActionPossibleUsing) => undefined | number)

Controls the display order of this action compared to other actions. Generally you want to leave this as 0 (default) and just register your action in the correct place. Priority can be generated dynamically based on the given objects — item, doodad, etc.

Higher priority === appears first.
Lower priority === appears last.

slottable?: undefined

Whether this action can be slotted in the action bar. Defaults to true.

translate?: ((translator: UsableActionTranslator) => UsableActionTranslator)

Type declaration

useHintAction?: ActionType

A hint for the inspection system that this UA is internally using a specific action. Use tooltip filtering checks this.

Methods

  • Marks this "action" as a submenu container instead of an executable. Is a generator for the submenu.

    Parameters

    • registrar: default

      The registrar that submenu actions should be appended to.

    • using: IUsableActionUsing<REQUIREMENTS>

      What this action is using. Item, doodad, etc.

    Returns void | default

Generated using TypeDoc