Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/preferences

Vars

backgroundIcon for the preview background
character_preview_viewA preview of the current character
character_savefileThe savefile relating to character preferences, PREFERENCE_CHARACTER
current_windowThe current window, PREFERENCE_TAB_* in [code/__DEFINES/preferences.dm]
game_savefileThe savefile relating to core preferences, PREFERENCE_PLAYER
key_bindingsCustom keybindings. Map of keybind names to keyboard inputs. For example, by default would have "swap_hands" -> list("X")
key_bindings_by_keyCached list of keybindings, mapping keys to actions. For example, by default would have "X" -> list("swap_hands")
middlewareA list of instantiated middleware
recently_updated_keysA list of keys that have been updated since the last save.
tainted_character_profilesIf set to TRUE, will update character_profiles on the next ui_data tick.
value_cacheA cache of preference entries to values. Used to avoid expensive READ_FILE every time a preference is retrieved.
yogtogglesremoved, kept here for migration in 'legacy_mood_migration.dm' DO NOT USE THIS!

Procs

apply_all_client_preferencesApplies all PREFERENCE_PLAYER preferences
apply_character_randomization_prefsRandomizes the character according to preferences.
check_keybindingschecks through keybindings for outdated unbound keys and updates them
get_default_randomizationReturns the default randomise variable ouptut
get_highest_priority_jobReturns what job is marked as highest
get_key_bindings_by_keyInverts the key_bindings list such that it can be used for key_bindings_by_key
get_savefile_for_savefile_identifierReturns which savefile to use for a given savefile identifier
migrate_character_to_tgui_prefs_menuHandle the migrations necessary from pre-tgui prefs to post-tgui prefs, for characters
migrate_preferences_to_tgui_prefs_menuHandle the migrations necessary from pre-tgui prefs to post-tgui prefs
randomise_appearance_prefsFully randomizes everything in the character.
read_preferenceRead a /datum/preference type and return its value. This will write to the savefile if a value was not found with the new value.
should_randomizeReturns if a preference should be randomized.
update_preferenceWill perform an update on the preference, but not write to the savefile. This will, for instance, update the character preference view. Performs sanity checks.
write_preferenceSet a /datum/preference entry. Returns TRUE for a successful preference application. Returns FALSE if it is invalid.

Var Details

background

Icon for the preview background

character_preview_view

A preview of the current character

character_savefile

The savefile relating to character preferences, PREFERENCE_CHARACTER

current_window

The current window, PREFERENCE_TAB_* in [code/__DEFINES/preferences.dm]

game_savefile

The savefile relating to core preferences, PREFERENCE_PLAYER

key_bindings

Custom keybindings. Map of keybind names to keyboard inputs. For example, by default would have "swap_hands" -> list("X")

key_bindings_by_key

Cached list of keybindings, mapping keys to actions. For example, by default would have "X" -> list("swap_hands")

middleware

A list of instantiated middleware

recently_updated_keys

A list of keys that have been updated since the last save.

tainted_character_profiles

If set to TRUE, will update character_profiles on the next ui_data tick.

value_cache

A cache of preference entries to values. Used to avoid expensive READ_FILE every time a preference is retrieved.

yogtoggles

removed, kept here for migration in 'legacy_mood_migration.dm' DO NOT USE THIS!

Proc Details

apply_all_client_preferences

Applies all PREFERENCE_PLAYER preferences

apply_character_randomization_prefs

Randomizes the character according to preferences.

check_keybindings

checks through keybindings for outdated unbound keys and updates them

get_default_randomization

Returns the default randomise variable ouptut

get_highest_priority_job

Returns what job is marked as highest

get_key_bindings_by_key

Inverts the key_bindings list such that it can be used for key_bindings_by_key

get_savefile_for_savefile_identifier

Returns which savefile to use for a given savefile identifier

migrate_character_to_tgui_prefs_menu

Handle the migrations necessary from pre-tgui prefs to post-tgui prefs, for characters

migrate_preferences_to_tgui_prefs_menu

Handle the migrations necessary from pre-tgui prefs to post-tgui prefs

randomise_appearance_prefs

Fully randomizes everything in the character.

read_preference

Read a /datum/preference type and return its value. This will write to the savefile if a value was not found with the new value.

should_randomize

Returns if a preference should be randomized.

update_preference

Will perform an update on the preference, but not write to the savefile. This will, for instance, update the character preference view. Performs sanity checks.

write_preference

Set a /datum/preference entry. Returns TRUE for a successful preference application. Returns FALSE if it is invalid.