Files
Bubberstation/code/modules/client/preferences/food_allergy.dm
T
49414f7821 Adds a little button to quirks that allows for relatively easy customization (#79251)
## About The Pull Request

Title. Adds a little cog button that expands a popper with a preference
list of relevant preferences.


https://github.com/tgstation/tgstation/assets/59709059/5718ad5d-fadb-489f-9a31-9e7173c6f35a

## Why It's Good For The Game

Customizable quirks are cool. Having a proper framework for customizable
quirks is even cooler. Good UX is even COOLER.
## Changelog
🆑
code: Quirks are now customizable on the quirks page instead of on the
character prefs page
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-11-12 15:11:08 -08:00

21 lines
663 B
Plaintext

/datum/preference/choiced/food_allergy
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "food_allergy"
savefile_identifier = PREFERENCE_CHARACTER
can_randomize = FALSE
/datum/preference/choiced/food_allergy/init_possible_values()
return list("Random") + assoc_to_keys(GLOB.possible_food_allergies)
/datum/preference/choiced/food_allergy/create_default_value()
return "Random"
/datum/preference/choiced/food_allergy/is_accessible(datum/preferences/preferences)
if (!..())
return FALSE
return "Food Allergy" in preferences.all_quirks
/datum/preference/choiced/food_allergy/apply_to_human(mob/living/carbon/human/target, value)
return