The singleton registry of script call categories/trigger events. At runtime this registry is accessible as pf1.registry.scriptCalls.

Hierarchy (view full)

Constructors

Properties

The class each of this registry's content is expected to be an instance of.

_defaultData: readonly [{
    _id: "use";
    info: "PF1.ScriptCalls.Use.Info";
    itemTypes: readonly ["attack", "buff", "feat", "loot", "equipment", "implant", "consumable", "spell", "weapon"];
    name: "PF1.ScriptCalls.Use.Name";
}, {
    _id: "postUse";
    info: "PF1.ScriptCalls.PostUse.Info";
    itemTypes: readonly ["attack", "buff", "feat", "loot", "equipment", "implant", "consumable", "spell", "weapon"];
    name: "PF1.ScriptCalls.PostUse.Name";
}, {
    _id: "equip";
    info: "PF1.ScriptCalls.Equip.Info";
    itemTypes: readonly ["weapon", "equipment", "loot"];
    name: "PF1.ScriptCalls.Equip.Name";
}, {
    _id: "implant";
    info: "PF1.ScriptCalls.Implant.Info";
    itemTypes: readonly ["implant"];
    name: "PF1.ScriptCalls.Implant.Name";
}, {
    _id: "toggle";
    info: "PF1.ScriptCalls.Toggle.Info";
    itemTypes: readonly ["buff", "feat"];
    name: "PF1.ScriptCalls.Toggle.Name";
}, {
    _id: "changeQuantity";
    info: "PF1.ScriptCalls.ChangeQuantity.Info";
    itemTypes: readonly ["loot", "equipment", "weapon", "implant", "consumable", "container"];
    name: "PF1.ScriptCalls.ChangeQuantity.Name";
}, {
    _id: "changeLevel";
    info: "PF1.ScriptCalls.ChangeLevel.Info";
    itemTypes: readonly ["buff", "class"];
    name: "PF1.ScriptCalls.ChangeLevel.Name";
}] = ...

An array of data used to initialise this registry.

model: typeof ScriptCallCategory = ScriptCallCategory

The class each of this registry's content is expected to be an instance of.

Accessors

Methods

  • Returns an object of the registry's contents, with the id as key and the name as value.

    Returns {
        [id: string]: string;
    }

    The names of each value in the registry, by id

    • [id: string]: string
  • Registers a new instance of Model with the registry, using a partial of its data as the base.

    Parameters

    • namespace: string

      The namespace for which this value is registered.

    • id: string

      The unique key of the value.

    • value: object

      A Partial of the data to use as the base for the new value.

    Returns Registry<any>

    The registry itself, after the value has been registered.

    pf1.registry.damageTypes.register("my-module", "my-damage-type", {
    name: "My Damage Type",
    img: "icons/svg/damage.svg",
    category: "physical",
    });
  • Returns the contents of this registry as object, using ids as keys.

    Parameters

    • Optionalsource: boolean = false

      Whether to include the source data instead of its prepared data for each value.

    Returns {
        [id: string]: object;
    }

    The data of each value in the registry, by id

    • [id: string]: object
  • Unregisters a value from the registry, or if no id is provided, all values belonging to the namespace.

    Parameters

    • namespace: string

      The namespace for which this value is unregistered.

    • Optionalid: string

      The unique key of the value, or undefined to unregister all values belonging to the namespace.

    Returns void