-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## About The Pull Request - Ports food allergies from tg tgstation/tgstation#79118 - a few minor changes had to be made because tg's food complexity system has not been ported - IPCs get punished for taking this quirk - anaphylaxis uses the old disease type as it's less hacky than trying to port it to the new system ## Why It's Good For The Game - This was requested by a player and it adds another mechanic players can apply to their characters ## Changelog :cl: add: Adds Food Allergies as a -2 quirk. You can select which food you're allergic to or rock a random option. /:cl:
- Loading branch information
Showing
18 changed files
with
446 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/datum/disease/anaphylaxis | ||
form = "Shock" | ||
name = "Anaphylaxis" | ||
desc = "Patient is undergoing a life-threatening allergic reaction and will die if not treated." | ||
max_stages = 3 | ||
cure_text = "Epinephrine" | ||
cures = list(/datum/reagent/medicine/epinephrine) | ||
cure_chance = 20 | ||
agent = "Allergy" | ||
viable_mobtypes = list(/mob/living/carbon/human) | ||
disease_flags = CURABLE | ||
severity = DISEASE_SEVERITY_DANGEROUS | ||
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS | ||
spread_text = "None" | ||
visibility_flags = HIDDEN_PANDEMIC | ||
bypasses_immunity = TRUE | ||
stage_prob = 5 | ||
|
||
/datum/disease/anaphylaxis/stage_act(seconds_per_tick, times_fired) | ||
. = ..() | ||
if(!.) | ||
return | ||
|
||
if(HAS_TRAIT(affected_mob, TRAIT_TOXINLOVER)) // You are no fun | ||
cure() | ||
return | ||
|
||
// Cool them enough to feel cold to the touch, and then some, because temperature mechanics are dumb | ||
affected_mob.adjust_bodytemperature(-10 * seconds_per_tick * stage, min_temp = BODYTEMP_COLD_DAMAGE_LIMIT - 70) | ||
|
||
switch(stage) | ||
// early symptoms: mild shakes and dizziness | ||
if(1) | ||
if(affected_mob.num_hands >= 1 && SPT_PROB(5, seconds_per_tick)) | ||
to_chat(affected_mob, span_warning("You feel your hand[affected_mob.num_hands == 1 ? "":"s"] start to shake.")) | ||
affected_mob.adjust_jitter_up_to(4 SECONDS * seconds_per_tick, 1 MINUTES) | ||
if(affected_mob.num_legs >= 1 && SPT_PROB(5, seconds_per_tick)) | ||
to_chat(affected_mob, span_warning("You feel your leg[affected_mob.num_hands == 1 ? "":"s"] start to shake.")) | ||
affected_mob.adjust_jitter_up_to(4 SECONDS * seconds_per_tick, 1 MINUTES) | ||
if(SPT_PROB(2, seconds_per_tick)) | ||
affected_mob.adjust_dizzy_up_to(5 SECONDS * seconds_per_tick, 1 MINUTES) | ||
if(SPT_PROB(1, seconds_per_tick)) | ||
to_chat(affected_mob, span_danger("Your throat itches.")) | ||
|
||
// warning symptoms: violent shakes, dizziness, blurred vision, difficulty breathing | ||
if(2) | ||
affected_mob.apply_damage(0.33 * seconds_per_tick, TOX, spread_damage = TRUE) | ||
|
||
if(affected_mob.num_hands >= 1 && SPT_PROB(5, seconds_per_tick)) | ||
to_chat(affected_mob, span_warning("You feel your hand[affected_mob.num_hands == 1 ? "":"s"] shake violently.")) | ||
affected_mob.adjust_jitter_up_to(8 SECONDS * seconds_per_tick, 1 MINUTES) | ||
if(prob(20)) | ||
affected_mob.drop_all_held_items() | ||
if(affected_mob.num_legs >= 1 && SPT_PROB(5, seconds_per_tick)) | ||
to_chat(affected_mob, span_warning("You feel your leg[affected_mob.num_hands == 1 ? "":"s"] shake violently.")) | ||
affected_mob.adjust_jitter_up_to(8 SECONDS * seconds_per_tick, 1 MINUTES) | ||
if(prob(40) && affected_mob.stamina.loss_as_percent < 75) | ||
affected_mob.stamina.adjust(-15) | ||
if(affected_mob.get_organ_slot(ORGAN_SLOT_EYES) && SPT_PROB(4, seconds_per_tick)) | ||
affected_mob.adjust_eye_blur(4 SECONDS * seconds_per_tick) | ||
to_chat(affected_mob, span_warning("It's getting harder to see clearly.")) | ||
if(!HAS_TRAIT(affected_mob, TRAIT_NOBREATH) && SPT_PROB(4, seconds_per_tick)) | ||
affected_mob.apply_damage(2 * seconds_per_tick, OXY) | ||
affected_mob.losebreath += (2 * seconds_per_tick) | ||
to_chat(affected_mob, span_warning("It's getting harder to breathe.")) | ||
if(SPT_PROB(2, seconds_per_tick)) | ||
affected_mob.adjust_drowsiness_up_to(3 SECONDS * seconds_per_tick, 30 SECONDS) | ||
if(SPT_PROB(2, seconds_per_tick)) | ||
affected_mob.adjust_dizzy_up_to(5 SECONDS * seconds_per_tick, 1 MINUTES) | ||
affected_mob.adjust_confusion_up_to(1 SECONDS * seconds_per_tick, 10 SECONDS) | ||
if(SPT_PROB(2, seconds_per_tick)) | ||
affected_mob.vomit() | ||
affected_mob.Stun(2 SECONDS) // The full 20 second vomit stun would be lethal | ||
if(SPT_PROB(1, seconds_per_tick)) | ||
affected_mob.emote("cough") | ||
if(SPT_PROB(1, seconds_per_tick)) | ||
to_chat(affected_mob, span_danger("Your throat feels sore.")) | ||
|
||
// "you are too late" symptoms: death. | ||
if(3) | ||
affected_mob.apply_damage(3 * seconds_per_tick, TOX, spread_damage = TRUE) | ||
affected_mob.apply_damage(1 * seconds_per_tick, OXY) | ||
affected_mob.Unconscious(3 SECONDS * seconds_per_tick) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/datum/mood_event/favorite_food | ||
description = "I really enjoyed eating that." | ||
mood_change = 5 | ||
timeout = 4 MINUTES | ||
|
||
/datum/mood_event/gross_food | ||
description = "I really didn't like that food." | ||
mood_change = -2 | ||
timeout = 4 MINUTES | ||
|
||
/datum/mood_event/disgusting_food | ||
description = "That food was disgusting!" | ||
mood_change = -6 | ||
timeout = 4 MINUTES | ||
|
||
/datum/mood_event/allergic_food | ||
description = "My throat itches." | ||
mood_change = -2 | ||
timeout = 4 MINUTES | ||
|
||
/datum/mood_event/breakfast | ||
description = "Nothing like a hearty breakfast to start the shift." | ||
mood_change = 2 | ||
timeout = 10 MINUTES | ||
|
||
/* monkestation removal - food complexity is unported | ||
/datum/mood_event/food | ||
timeout = 5 MINUTES | ||
var/quality = FOOD_QUALITY_NORMAL | ||
/datum/mood_event/food/New(mob/M, ...) | ||
. = ..() | ||
mood_change = 2 + 2 * quality | ||
description = "That food was [GLOB.food_quality_description[quality]]." | ||
/datum/mood_event/food/nice | ||
quality = FOOD_QUALITY_NICE | ||
/datum/mood_event/food/good | ||
quality = FOOD_QUALITY_GOOD | ||
/datum/mood_event/food/verygood | ||
quality = FOOD_QUALITY_VERYGOOD | ||
/datum/mood_event/food/fantastic | ||
quality = FOOD_QUALITY_FANTASTIC | ||
/datum/mood_event/food/amazing | ||
quality = FOOD_QUALITY_AMAZING | ||
/datum/mood_event/food/top | ||
quality = FOOD_QUALITY_TOP | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.