Skip to content

$user_settings

8 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).

get_from_components

$user_settings.get_from_components(components: list)

Read a list of components' fields from the backend. The user whose settings are read is determined by the component's entity's owning user.

ParameterTypeMeaning
componentslistList of components to read.

get_value_as_float

read-only
$user_settings.get_value_as_float(key: var) -> float

Get the value for a user settings key as a float.

ParameterTypeMeaning
keyvarThe unique key to get the value for.

Returns float: The value for a key as a float.

get_value_as_int

read-only
$user_settings.get_value_as_int(key: var) -> int

Get the value for a user settings key as an int.

ParameterTypeMeaning
keyvarThe unique key to get the value for.

Returns int: The value for a key as an int.

get_value_as_object_ref

read-only
$user_settings.get_value_as_object_ref(key: var) -> Reference

Get the value for a user settings key as a ref.

ParameterTypeMeaning
keyvarThe unique key to get the value for.

Returns Reference: The value for a key as an object ref.

get_value_as_string

read-only
$user_settings.get_value_as_string(key: var) -> string

Get the value for a user settings key as a string.

ParameterTypeMeaning
keyvarThe unique key to get the value for.

Returns string: The value for a key as a string.

key_exists

read-only
$user_settings.key_exists(key: var) -> bool

Determine if a user setting with a given key exists.

ParameterTypeMeaning
keyvarThe unique key to search for.

Returns bool: True if the key exists.

set_from_components

$user_settings.set_from_components(components: list)

Write a list of components' fields to the backend. The user whose settings are written is determined by the component's entity's owning user.

ParameterTypeMeaning
componentslistList of components to write.

set_value

$user_settings.set_value(key: var, value: var)

Set the value for a user settings key.

ParameterTypeMeaning
keyvarThe key for the setting
valuevarthe value for the setting