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

Hierarchy

Constructors

Properties

items: any[]

Accessors

  • get defaultOptions(): InsertKeys<{
        baseApplication: null | string;
        classes: string[];
        closeOnSubmit: boolean;
        dragDrop: ({
            dragSelector: string;
            dropSelector: string;
        } | {
            dragSelector: string;
            dropSelector: null;
        })[];
        editable: boolean;
        filters: Omit<SearchFilterConfiguration, "callback">[];
        height: null | number | "auto";
        id: string;
        left: null | number;
        minimizable: boolean;
        popOut: boolean;
        resizable: boolean;
        scale: null | number;
        scrollY: string[];
        sheetConfig: boolean;
        submitOnChange: boolean;
        submitOnClose: boolean;
        tabs: {
            contentSelector: string;
            group: string;
            initial: string;
            navSelector: string;
        }[];
        template: null | string;
        title: string;
        top: null | number;
        viewPermission: 0 | 1 | 2 | 3;
        width: number;
    }, OmitByValue<{
        classes: string[];
        dragDrop: ({
            dragSelector: string;
            dropSelector: string;
        } | {
            dragSelector: string;
            dropSelector: null;
        })[];
        scrollY: string[];
        tabs: {
            contentSelector: string;
            group: string;
            initial: string;
            navSelector: string;
        }[];
        width: number;
    }, never>>
  • Returns InsertKeys<{
        baseApplication: null | string;
        classes: string[];
        closeOnSubmit: boolean;
        dragDrop: ({
            dragSelector: string;
            dropSelector: string;
        } | {
            dragSelector: string;
            dropSelector: null;
        })[];
        editable: boolean;
        filters: Omit<SearchFilterConfiguration, "callback">[];
        height: null | number | "auto";
        id: string;
        left: null | number;
        minimizable: boolean;
        popOut: boolean;
        resizable: boolean;
        scale: null | number;
        scrollY: string[];
        sheetConfig: boolean;
        submitOnChange: boolean;
        submitOnClose: boolean;
        tabs: {
            contentSelector: string;
            group: string;
            initial: string;
            navSelector: string;
        }[];
        template: null | string;
        title: string;
        top: null | number;
        viewPermission: 0 | 1 | 2 | 3;
        width: number;
    }, OmitByValue<{
        classes: string[];
        dragDrop: ({
            dragSelector: string;
            dropSelector: string;
        } | {
            dragSelector: string;
            dropSelector: null;
        })[];
        scrollY: string[];
        tabs: {
            contentSelector: string;
            group: string;
            initial: string;
            navSelector: string;
        }[];
        width: number;
    }, never>>

Methods

  • Check if a given material is okay to be added to our materials list for the item sheet.

    Parameters

    • itemType: string

      Whether we're checking weapons or equipment

    • itemSubtype: string

      Item-specific typing to filter with

    • subType: string

      Only relevant with shields, since "other" is used in both shield and general gear

    • material: MaterialType

      The Material object from the registry that has our needed metadata

    Returns boolean

  • Private

    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

    • Optional tooltip: 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<Record<string, unknown>>>

  • Private

    Handle spawning the ActorTraitSelector application which allows a checkbox of multiple trait options

    Parameters

    • event: Event

      The click event which originated the selection

    Returns void

  • Parameters

    • alignments: any

    Returns {
        choices: {};
        values: any;
    }

    • choices: {}
      • values: any
    • Parameters

      • itemType: any
      • itemSubtype: any
      • subType: any
      • chosenMaterial: string = ""

      Returns {
          addons: any[];
          basics: {};
          materials: {};
      }

      • addons: any[]
      • basics: {}
        • materials: {}
        • Private

          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

          • html: JQuery<HTMLElement>

          Returns void

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

          Returns Promise<{
              canClassLink: boolean;
              config: config;
              document: ItemPF;
              editable: boolean;
              inContainer: boolean;
              isGM: boolean;
              item: ItemPF;
              itemType: string;
              labels: Record<string, string>;
              name: null | string;
              owned: boolean;
              owner: boolean;
              rollData: object;
              system: any;
              tag: any;
          }>

        Generated using TypeDoc