8 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).
$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.
| Parameter | Type | Meaning |
|---|
components | list | List of components to read. |
$user_settings.get_value_as_float(key: var) -> float
Get the value for a user settings key as a float.
| Parameter | Type | Meaning |
|---|
key | var | The unique key to get the value for. |
Returns float: The value for a key as a float.
$user_settings.get_value_as_int(key: var) -> int
Get the value for a user settings key as an int.
| Parameter | Type | Meaning |
|---|
key | var | The unique key to get the value for. |
Returns int: The value for a key as an int.
$user_settings.get_value_as_object_ref(key: var) -> Reference
Get the value for a user settings key as a ref.
| Parameter | Type | Meaning |
|---|
key | var | The unique key to get the value for. |
Returns Reference: The value for a key as an object ref.
$user_settings.get_value_as_string(key: var) -> string
Get the value for a user settings key as a string.
| Parameter | Type | Meaning |
|---|
key | var | The unique key to get the value for. |
Returns string: The value for a key as a string.
$user_settings.key_exists(key: var) -> bool
Determine if a user setting with a given key exists.
| Parameter | Type | Meaning |
|---|
key | var | The unique key to search for. |
Returns bool: True if the key exists.
$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.
| Parameter | Type | Meaning |
|---|
components | list | List of components to write. |
$user_settings.set_value(key: var, value: var)
Set the value for a user settings key.
| Parameter | Type | Meaning |
|---|
key | var | The key for the setting |
value | var | the value for the setting |