/tg/ Station 13 - Modules - TypesDefine Details

code/modules/client/preferences/_preference.dm

PREFERENCE_PRIORITY_DEFAULTThe default priority level
PREFERENCE_PRIORITY_SPECIESThe priority at which species runs, needed for external organs to apply properly.
PREFERENCE_PRIORITY_BODYPARTSSome preferences get applied directly to bodyparts (anything head_flags related right now). These must apply after species, as species gaining might replace the bodyparts of the human.
PREFERENCE_PRIORITY_GENDERThe priority at which gender is determined, needed for proper randomization.
PREFERENCE_PRIORITY_BODY_TYPEThe priority at which body type is decided, applied after gender so we can support the "use gender" option.
PREFERENCE_PRIORITY_NAMESThe priority at which names are decided, needed for proper randomization.
PREFERENCE_PRIORITY_NAME_MODIFICATIONSPreferences that aren't names, but change the name changes set by PREFERENCE_PRIORITY_NAMES.
MAX_PREFERENCE_PRIORITYThe maximum preference priority, keep this updated, but don't use it for priority.
CHOICED_PREFERENCE_DISPLAY_NAMESFor choiced preferences, this key will be used to set display names in constant data.
SUPPLEMENTAL_FEATURE_KEYFor main feature preferences, this key refers to a feature considered supplemental. For instance, hair color being supplemental to hair.
/proc/get_preferences_in_priority_order Returns a flat list of preferences in order of their priority
/datum/preferenceRepresents an individual preference.
/datum/preference/choicedA preference that is a choice of one option among a fixed set. Used for preferences such as clothing.
/datum/preference/colorA preference that represents an RGB color of something. Will give the value as 6 hex digits, without a hash.
/datum/preference/numericA numeric preference with a minimum and maximum value
/datum/preference/toggleA preference whose value is always TRUE or FALSE
/datum/preference/textA string-based preference accepting arbitrary string values entered by the user, with a maximum length.

Define Details

CHOICED_PREFERENCE_DISPLAY_NAMES

For choiced preferences, this key will be used to set display names in constant data.

MAX_PREFERENCE_PRIORITY

The maximum preference priority, keep this updated, but don't use it for priority.

PREFERENCE_PRIORITY_BODYPARTS

Some preferences get applied directly to bodyparts (anything head_flags related right now). These must apply after species, as species gaining might replace the bodyparts of the human.

PREFERENCE_PRIORITY_BODY_TYPE

The priority at which body type is decided, applied after gender so we can support the "use gender" option.

PREFERENCE_PRIORITY_DEFAULT

The default priority level

PREFERENCE_PRIORITY_GENDER

The priority at which gender is determined, needed for proper randomization.

PREFERENCE_PRIORITY_NAMES

The priority at which names are decided, needed for proper randomization.

PREFERENCE_PRIORITY_NAME_MODIFICATIONS

Preferences that aren't names, but change the name changes set by PREFERENCE_PRIORITY_NAMES.

PREFERENCE_PRIORITY_SPECIES

The priority at which species runs, needed for external organs to apply properly.

SUPPLEMENTAL_FEATURE_KEY

For main feature preferences, this key refers to a feature considered supplemental. For instance, hair color being supplemental to hair.