Yogstation 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_GENDERThe priority at which gender is determined, needed for proper randomization.
PREFERENCE_PRIORITY_NAMESThe priority at which names are decided, needed for proper randomization.
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.
CHOICED_PREFERENCE_KEY_LOCKEDFor choiced preferences, this key will be used to lock choices to a specific ckey.
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.
/proc/possible_values_for_sprite_accessory_list Takes an assoc list of names to /datum/sprite_accessory and returns a value fit for /datum/preference/init_possible_values()
/proc/possible_values_for_sprite_accessory_list_for_body_part Takes an assoc list of names to /datum/sprite_accessory and returns a value fit for /datum/preference/init_possible_values() Different from possible_values_for_sprite_accessory_list in that it takes a list of layers such as BEHIND, FRONT, and ADJ. It also takes a "body part name", such as body_markings, moth_wings, etc They are expected to be in order from lowest to top.
/datum/preference/numericA numeric preference with a minimum and maximum value
/datum/preference/toggleA prefernece 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.

CHOICED_PREFERENCE_KEY_LOCKED

For choiced preferences, this key will be used to lock choices to a specific ckey.

MAX_PREFERENCE_PRIORITY

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

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_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.