ClientSettings

ClientSettings

An abstract interface for defining setting storage patterns Each setting is a key/value pair

Constructor

new ClientSettings()

Source:

Members

settings :Object

Source:

A object of registered game settings for this scope

Type:
  • Object

sheet

Source:

Return a singleton instance of the Game Settings Configuration app

storage

Source:

The storage interfaces used for persisting settings Each storage interface shares the same API as window.localStorage

Methods

get(module, key)

Source:

Get the value of a game setting for a certain module and setting key

Parameters:
Name Type Description
module String

The module namespace under which the setting is registered

key String

The setting key to retrieve

register(module, key, data)

Source:

Register a new game setting under this setting scope

Parameters:
Name Type Description
module String

The module namespace under which the setting is registered

key String

The key name for the setting under the namespace module

data Object

Configuration for setting data

(async) set(module, key, value)

Source:

Set the value of a game setting for a certain module and setting key

Parameters:
Name Type Description
module String

The module namespace under which the setting is registered

key String

The setting key to retrieve

value

The data to assign to the setting key

(async) update(key, value) → {Promise}

Source:

Update the setting storage with a new value

Parameters:
Name Type Description
key String
value *
Returns:
Type
Promise