Pathfinder 1e for Foundry VTT
    Preparing search index...

    Override and extend the core ItemSheet implementation to handle game system specific item types

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _activeEdits: Record<string, string> = {}
    _warnedAppV1: boolean = true
    EDIT_TRACKING: string[] = ...

    Which fields to track edits for

    Accessors

    • get template(): string

      Return a dynamic reference to the HTML template path used to render this Item Sheet

      Returns string

      • Template path
    • get defaultOptions(): InsertKeys<
          {},
          {
              classes: readonly ["pf1", "sheet", "item"];
              dragDrop: readonly [
                  { dragSelector: "li.action-part"; dropSelector: ".tab.details" },
                  { dragSelector: ".tab.changes li.change"; dropSelector: null },
                  {
                      dragSelector: ".tab.links .item-name";
                      dropSelector: ".tab.links .tab[data-group='links']";
                  },
              ];
              scrollY: readonly [".tab", ".buff-flags", ".editor-content"];
              tabs: readonly [
                  {
                      contentSelector: "section.primary-body";
                      group: "primary";
                      initial: "description";
                      navSelector: "nav.tabs[data-group='primary']";
                  },
                  {
                      contentSelector: "section.links-body";
                      group: "links";
                      initial: "children";
                      navSelector: "nav.tabs[data-group='links']";
                  },
                  {
                      contentSelector: "section.description-body";
                      group: "description";
                      initial: "identified";
                      navSelector: "nav.tabs[data-group='description']";
                  },
              ];
              width: 800;
          },
      >

      Returns InsertKeys<
          {},
          {
              classes: readonly ["pf1", "sheet", "item"];
              dragDrop: readonly [
                  { dragSelector: "li.action-part"; dropSelector: ".tab.details" },
                  { dragSelector: ".tab.changes li.change"; dropSelector: null },
                  {
                      dragSelector: ".tab.links .item-name";
                      dropSelector: ".tab.links .tab[data-group='links']";
                  },
              ];
              scrollY: readonly [".tab", ".buff-flags", ".editor-content"];
              tabs: readonly [
                  {
                      contentSelector: "section.primary-body";
                      group: "primary";
                      initial: "description";
                      navSelector: "nav.tabs[data-group='primary']";
                  },
                  {
                      contentSelector: "section.links-body";
                      group: "links";
                      initial: "children";
                      navSelector: "nav.tabs[data-group='links']";
                  },
                  {
                      contentSelector: "section.description-body";
                      group: "description";
                      initial: "identified";
                      navSelector: "nav.tabs[data-group='description']";
                  },
              ];
              width: 800;
          },
      >

      foundry.utils.mergeObject(super.defaultOptions, {
      template: "templates/sheets/item-sheet.html",
      width: 500,
      closeOnSubmit: false,
      submitOnClose: true,
      submitOnChange: true,
      resizable: true,
      baseApplication: "ItemSheet",
      id: "item",
      secrets: [{parentSelector: ".editor"}]
      })

    Methods

    • Protected

      Allow non-GM to drag&drop actions and items (for containers) to this sheet.

      Returns boolean

    • By default, returns true only for GM

      Parameters

      • selector: any

      Returns boolean

    • Protected

      Toggle inline display of an item's summary/description by expanding or hiding info div

      Parameters

      • event: ClickEvent<HTMLElement, any, any, any>

        The click event on the item

      Returns Promise<void>

    • Internal

      Parameters

      • event: Event

        Click event

      • Optionaltooltip: boolean = false

        Is this event from locked tooltip?

      Returns undefined

    • Internal

      Handle dropping content-linkable data to <textarea> or text <input>

      Parameters

      • event: DragEvent

      Returns Promise<undefined | Partial<AnyObject>>

    • Protected

      Extend the parent class _updateObject method to ensure that damage ends up in an Array

      Parameters

      • event: any
      • formData: any

      Returns Promise<unknown>

    • Activate listeners for interactive item sheet events

      Parameters

      • jq: JQuery<HTMLElement>

      Returns void

    • Prepare item sheet data Start with the base item data and extending with additional properties for rendering.

      Returns Promise<
          {
              actor: null
              | ActorPF;
              canClassLink: boolean;
              config: config;
              cssClass: string;
              data: any;
              document: ItemPF;
              editable: boolean;
              embedded: boolean;
              inContainer: boolean;
              isGM: boolean;
              item: ItemPF;
              itemType: string;
              labels: Record<string, string>;
              name: string;
              owned: boolean;
              owner: boolean;
              rollData: object;
              system: SystemOfType<"base" | ModuleSubType>;
              tag: any;
          },
      >