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

    Class CurrencyTransfer

    Hierarchy

    • HandlebarsApplication<this> & ApplicationV2<
          RenderContext,
          Configuration,
          RenderOptions,
          this,
      >
      • CurrencyTransfer
    Index

    Constructors

    • Parameters

      • source: {} = {}
      • dest: {} = {}
      • options: {} = {}

      Returns CurrencyTransfer

    Properties

    constructor: typeof CurrencyTransfer
    dest: {}
    source: {}
    DEFAULT_OPTIONS: {
        actions: {
            sendAll: (
                ...this: any,
                event: PointerEvent,
                target: HTMLElement,
            ) => void;
            sendNone: (...this: any, event: PointerEvent, target: HTMLElement) => void;
        };
        classes: string[];
        form: {
            handler: (
                ...this: any,
                event: SubmitEvent,
                form: HTMLFormElement,
                formData: FormDataExtended,
            ) => void;
        };
        id: string;
        position: { width: number };
        tag: string;
        window: { icon: string };
    } = ...
    PARTS: { footer: { template: string }; form: { template: string } } = ...

    Accessors

    • get promise(): Promise<any>

      Returns Promise<any>

    • get title(): string

      A convenience reference to the title of the Application window.

      Returns string

    • get order(): ("gp" | "cp" | "pp" | "sp")[]

      Order of coin types, descending in value

      Returns ("gp" | "cp" | "pp" | "sp")[]

    Methods

    • Initialize configuration options for the Application instance. The default behavior of this method is to intelligently merge options for each class with those of their parents.

      • Array-based options are concatenated
      • Inner objects are merged
      • Otherwise, properties in the subclass replace those defined by a parent

      Parameters

      • options: any

        Options provided directly to the constructor

      Returns any

      Configured options for the application instance

    • Parameters

      • config: object
      • event: Event

      Returns void

    • Parameters

      • options: any

      Returns void

    • Parameters

      • partId: any
      • context: any
      • options: any

      Returns Promise<any>

    • Protected

      Commit Send

      Parameters

      • ...this: any
      • event: SubmitEvent
      • form: HTMLFormElement
      • formData: FormDataExtended

      Returns void

    • Internal Alpha

      Parameters

      • event: DragEvent

        Drag event

      • dropData: object

        Drop data

      • target: Actor<"base" | ModuleSubType> | Item<"base" | ModuleSubType>

        Target document

      Returns Promise<void>

    • Error message handler

      Parameters

      • i18nKey: string

      Returns undefined

    • Protected

      Send All

      Parameters

      • ...this: any
      • event: PointerEvent
      • target: HTMLElement

      Returns void

    • Protected

      Send None

      Parameters

      • ...this: any
      • event: PointerEvent
      • target: HTMLElement

      Returns void

    • Convert totalAmount to object

      Parameters

      • limit: object

        currency object containing max number of coins. Falsey values will assume infinity

      • totalAmount: number | object

        currency as gold pieces. If provided as a currency object, will convert to gold

      Returns boolean | object

      false if failed, currency object containing new amounts on conversion success

    • Transfer an amount of currency to a valid document

      Parameters

      • sourceDoc: Document

        ActorPF or ItemPF with currency

      • destDoc: Document

        ActorPF or ItemPF with currency

      • amount: number | object

        currency object containing transferred amount. Undefined keys will be assumed to be zero. Providing just a number will assume just gold

      • sourceAlt: boolean = false

        Use alt currency on source

      • destAlt: boolean = false

        Use alt currency on destination

      • OptionalallowConversion: number = false

        Attempts to make change with sourceDoc's currency limit

      Returns Promise<boolean | object>

      false if failed, object containing amount transferred on success

    • Initialize transfer and wait for it to finish

      Parameters

      • source: any
      • dest: any
      • options: any

      Returns Promise<void>