[MIRROR] Adds Food Allergies as a counterpart to Medicine Allergies [MDB IGNORE] (#24493)

* Adds Food Allergies as a counterpart to Medicine Allergies (#79118)

## About The Pull Request

Adds food allergies as a counterpart to medicinal allergies.

This is about as you would expect. Eating food you are allergic to
causes Anaphylaxis, which can be cured with epinephrine. If you are not
cured rapidly, you will shortly fall into a coma and die.

There is a preference for choosing your character's allergy.
Not all food types are viable allergen types: Only `"Alcohol", "Bugs",
"Dairy", "Fruit", "Grain", "Meat", "Nuts", "Seafood", "Sugar",
"Vegetables"`.

You also get a dogtag like med allergies.

Minor implementation detail: I added a "dangerous" level of food quality
/ scale, so I gave it to the Death Sandwich.

## Why It's Good For The Game

This was a request, and I saw it fairly harmless, so I said why not.

Similar to Medicine Allergy, it adds a small mechanic to concern
yourself with when you visit the kitchen, encouraging you to get a bit
more familiar with food types before diving into food at the kitchen.

As it is not as impactful as Medicine Allergy, it is only a -2 quirk.

## Changelog

🆑 Melbert
add: Adds Food Allergies as a -2 quirk. You can select which food you're
allergic to or rock a random option.
/🆑

* Adds Food Allergies as a counterpart to Medicine Allergies

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-10-21 15:14:19 -04:00
committed by GitHub
co-authored by MrMelbert
parent a91947e6ed
commit 117c2edc20
10 changed files with 216 additions and 24 deletions
@@ -0,0 +1,20 @@
/datum/preference/choiced/food_allergy
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
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