Setting

Setting

class

Configurable game setting

Fields

NameTypeDescription
restart boolean Changing this setting requires a restart
set_action function Called with the new value when the setting changes
label string Localization key of the displayed name
type string Widget type used to edit the setting
category string Settings category this entry belongs to
bool_value boolean Current boolean value
bool_default_value boolean Default boolean value
string_value string Current string value
default_string_value string Default string value
string_options string[] Allowed string values
int_value integer Current integer value
int_default_value integer Default integer value
max_value integer Upper bound of the integer value
min_value integer Lower bound of the integer value
key_binding string Input action bound to this setting
default_key string Default keystroke, e.g. Ctrl+Shift+F
key_action function Called with this setting when the bound key goes down; only for a key_binding of this mod's own

Functions

Setting.update_widgets()

Refresh every settings widget from the current values

Standard members (5)

Generated for every class of this kind by the game's codegen, not written for Setting.

Setting.cast(object) Trying to cast Object into Setting
Setting.get_class() Return Setting class object
Setting.find(name) Looks Setting up in db, nil when there is none
Setting.get(name) Takes Setting from db, reports a miss to the log
Setting.reg(name) Register a new Setting static object
Inherited from Prototype (2)
Inherited from Object (1)