Extends TJSGameSettings with UI control for working with TJSSettingsEdit and TJSSettingsSwap components. Instead of extending TJSGameSettings simply extend TJSGameSettingsWithUI instead when creating reactive game settings that utilize the above components.

Hierarchy

Constructors

Accessors

  • get namespace(): string
  • Returns string

    Returns namespace set in constructor.

Methods

  • Returns a readable Game Settings store for the associated key.

    Parameters

    • key: string

      Game setting key.

    Returns Readable<any>

    The associated store for the given game setting key.

  • Returns a writable Game Settings store for the associated key.

    Parameters

    • key: string

      Game setting key.

    Returns Writable<any>

    The associated store for the given game setting key.

  • Returns a writable Game Settings store for the associated key.

    Parameters

    • key: string

      Game setting key.

    Returns Writable<any>

    The associated store for the given game setting key.

  • Returns an iterable for the game setting keys from existing stores.

    Parameters

    • Optionalregex: RegExp

      Optional regular expression to filter by game setting keys.

    Returns IterableIterator<string, any, any>

    Iterable iterator of game setting keys.

  • Registers a setting with TJSGameSettings and Foundry core.

    Note: The specific store subscription handler assigned to the passed in store or store created for the setting internally is returned from this function. In some cases when setting up custom stores particularly of object types with several child property stores (propertyStore) it is necessary to only update the setting store and not all subscribers to the custom store as the propertyStore instances are also subscribers to the custom store.

    This allows the custom store in the set implementation to mainly only trigger the TJSGameSettings subscriber handler on updates and not all the connected propertyStore instances.

    Parameters

    • setting: GameSetting

      A GameSetting instance to set to Foundry game settings.

    • OptionalcoreConfig: boolean

      When false this overrides the setting.options.config parameter when registering the setting with Foundry. This allows the settings to be displayed in the app itself, but removed from the standard Foundry configuration location.

    Returns Function

    The specific store subscription handler assigned to the passed in store.

  • Registers multiple settings.

    Please refer to the note in TJSGameSettings.register about the returned object of store subscriber handler functions.

    Parameters

    • settings: Iterable<GameSetting, any, any>

      An iterable list of game setting configurations to register.

    • coreConfig: boolean

      When false this overrides the setting.options.config parameter when registering the setting with Foundry. This allows the settings to be displayed in the app itself, but removed from the standard Foundry configuration location.

    Returns {
        [key: string]: Function;
    }

    An object containing all TJSGameSetting store subscriber handlers for each setting key added.