Hierarchy

  • FormApplication
    • CurrencyTransfer

Constructors

  • Parameters

    • source: {
          actor: null;
          alt: boolean;
          amount: {};
          container: null;
      } = ...
      • actor: null
      • alt: boolean
      • amount: {}
        • container: null
      • dest: {
            actor: null;
            alt: boolean;
            amount: {};
            container: null;
        } = ...
        • actor: null
        • alt: boolean
        • amount: {}
          • container: null
        • options: {} = {}

          Returns CurrencyTransfer

        Properties

        dest: undefined | {
            actor: null;
            alt: boolean;
            amount: {};
            container: null;
        }

        Type declaration

        • actor: null
        • alt: boolean
        • amount: {}
          • container: null
          source: undefined | {
              actor: null;
              alt: boolean;
              amount: {};
              container: null;
          }

          Type declaration

          • actor: null
          • alt: boolean
          • amount: {}
            • container: null

            Accessors

            • get defaultOptions(): InsertKeys<{
                  baseApplication: null | string;
                  classes: string[];
                  closeOnSubmit: boolean;
                  dragDrop: Omit<DragDropConfiguration, "permissions" | "callbacks">[];
                  editable: boolean;
                  filters: Omit<SearchFilterConfiguration, "callback">[];
                  height: number;
                  id: string;
                  left: null | number;
                  minimizable: boolean;
                  popOut: boolean;
                  resizable: boolean;
                  scale: null | number;
                  scrollY: string[];
                  sheetConfig: boolean;
                  submitOnChange: boolean;
                  submitOnClose: boolean;
                  tabs: Omit<TabsConfiguration, "callback">[];
                  template: string;
                  title: string;
                  top: null | number;
                  width: number;
              }, OmitByValue<{
                  classes: string[];
                  height: number;
                  template: string;
                  width: number;
              }, never>>
            • Returns InsertKeys<{
                  baseApplication: null | string;
                  classes: string[];
                  closeOnSubmit: boolean;
                  dragDrop: Omit<DragDropConfiguration, "permissions" | "callbacks">[];
                  editable: boolean;
                  filters: Omit<SearchFilterConfiguration, "callback">[];
                  height: number;
                  id: string;
                  left: null | number;
                  minimizable: boolean;
                  popOut: boolean;
                  resizable: boolean;
                  scale: null | number;
                  scrollY: string[];
                  sheetConfig: boolean;
                  submitOnChange: boolean;
                  submitOnClose: boolean;
                  tabs: Omit<TabsConfiguration, "callback">[];
                  template: string;
                  title: string;
                  top: null | number;
                  width: number;
              }, OmitByValue<{
                  classes: string[];
                  height: number;
                  template: string;
                  width: number;
              }, never>>

            Methods

            • Parameters

              • _options: {} = {}

                Returns {
                    dest: undefined | {
                        actor: null;
                        alt: boolean;
                        amount: {};
                        container: null;
                    };
                    options: FormApplicationOptions;
                    source: undefined | {
                        actor: null;
                        alt: boolean;
                        amount: {};
                        container: null;
                    };
                    title: string;
                    total: any;
                }

                • dest: undefined | {
                      actor: null;
                      alt: boolean;
                      amount: {};
                      container: null;
                  }
                • options: FormApplicationOptions
                • source: undefined | {
                      actor: null;
                      alt: boolean;
                      amount: {};
                      container: null;
                  }
                • title: string
                • total: any
              • Convert totalAmount to a currency object containing

                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

                • Optional allowConversion: number = false

                  Attempts to make change with sourceDoc's currency limit

                Returns boolean | object

                false if failed, object containing amount transferred on success

              Generated using TypeDoc