Yogstation 13 - Modules - TypesVar Details - Proc Details

/datum/preference/choiced

A preference that is a choice of one option among a fixed set. Used for preferences such as clothing.

Vars

main_feature_nameIf the preference is a main feature (PREFERENCE_CATEGORY_FEATURES or PREFERENCE_CATEGORY_CLOTHING) this is the name of the feature that will be presented.
should_generate_iconsIf this is TRUE, icons will be generated. This is necessary for if your init_possible_values() override returns an assoc list of names to atoms/icons.

Procs

get_choicesReturns a list of every possible value. The first time this is called, will run init_values(). Return value can be in the form of:
get_choices_serializedReturns a list of every possible value, serialized. Return value can be in the form of:
init_possible_valuesReturns a list of every possible value. This must be overriden by /datum/preference/choiced subtypes. Return value can be in the form of:

Var Details

main_feature_name

If the preference is a main feature (PREFERENCE_CATEGORY_FEATURES or PREFERENCE_CATEGORY_CLOTHING) this is the name of the feature that will be presented.

should_generate_icons

If this is TRUE, icons will be generated. This is necessary for if your init_possible_values() override returns an assoc list of names to atoms/icons.

Proc Details

get_choices

Returns a list of every possible value. The first time this is called, will run init_values(). Return value can be in the form of:

get_choices_serialized

Returns a list of every possible value, serialized. Return value can be in the form of:

init_possible_values

Returns a list of every possible value. This must be overriden by /datum/preference/choiced subtypes. Return value can be in the form of: