Base item

From which all other item documents inherit from.

Hierarchy

Constructors

  • Parameters

    • Rest ...args: [data?: ItemDataConstructorData, context?: Context<ActorPF>]

    Returns ItemBasePF

Accessors

  • get isActive(): boolean
  • Is the item is fully functional.

    This returns composite result of if the item is equipped, has quantity, is not disabled, is not out of charges, etc. and is not representative if the item can be set active or not via setActive.

    Returns boolean

    See

    activeState

    Abstract

Methods

  • Fetch item name

    Parameters

    • Optional forcePlayerPerspective: boolean = false

      If true, return value players see.

    Returns string

  • Set item's active state.

    Parameters

    • active: boolean

      Active state

    • Optional context: object

      Optional update context

    Returns Promise<ItemBasePF>

    • Update promise if item type supports the operation.

    Abstract

    Throws

    • If item does not support the operation.
  • Internal

    Update item child links with supplements.

    Parameters

    • items: Item[]
    • supplements: Map<string, object>
    • context: any

    Returns Promise<undefined | ItemPF[]>

  • Internal

    Parameters

    • items: object[]

      Array of item data

    • context: object

    Returns Map<string, any>

  • Item create dialog.

    Parameters

    • data: object = {}

      Initial form data

    • Optional context: {
          options: undefined | object;
          pack: undefined | null | string;
          parent: undefined | null | Actor;
      } = {}

      Additional options.

      • options: undefined | object

        Dialog context options.

      • pack: undefined | null | string

        Pack ID parameter passed to Item.create() options

      • parent: undefined | null | Actor

        Parent parameter passed to Item.create() options

    Returns Promise<null | Item>

    Synchronized with Foundry VTT v11.315

Generated using TypeDoc