Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/preference_middleware

Preference middleware is code that helps to decentralize complicated preference features.

Vars

action_delegationsMap of ui_act actions -> proc paths to call. Signature is `(list/params, mob/user) -> TRUE/FALSE. Return output is the same as ui_act--TRUE if it should update, FALSE if it should not
keyThe key that will be used for get_constant_data(). If null, will use the typepath minus /datum/preference_middleware.
preferencesThe preferences datum

Procs

get_character_preferencesMerge this into the result of compile_character_preferences.
get_constant_dataAppend all of these into /datum/asset/json/preferences.
get_ui_assetsAppend all of these into ui_assets
get_ui_dataAppend all of these into ui_data
get_ui_static_dataAppend all of these into ui_static_data
on_new_characterCalled when a character is changed.
pre_set_preferenceCalled every set_preference, returns TRUE if this handled it.

Var Details

action_delegations

Map of ui_act actions -> proc paths to call. Signature is `(list/params, mob/user) -> TRUE/FALSE. Return output is the same as ui_act--TRUE if it should update, FALSE if it should not

key

The key that will be used for get_constant_data(). If null, will use the typepath minus /datum/preference_middleware.

preferences

The preferences datum

Proc Details

get_character_preferences

Merge this into the result of compile_character_preferences.

get_constant_data

Append all of these into /datum/asset/json/preferences.

get_ui_assets

Append all of these into ui_assets

get_ui_data

Append all of these into ui_data

get_ui_static_data

Append all of these into ui_static_data

on_new_character

Called when a character is changed.

pre_set_preference

Called every set_preference, returns TRUE if this handled it.