Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not feed animals by chocolatte! #11408

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
72 changes: 72 additions & 0 deletions code/modules/reagents/reagent_types/Chemistry-Foods.dm
Expand Up @@ -282,6 +282,42 @@
color = "#302000" // rgb: 48, 32, 0
taste_message = "cocoa"
diet_flags = DIET_PLANT
allergen = list(ALLERGY_INGESTION = TRUE)
COOLDOWN_DECLARE(coco_warning)

/datum/reagent/consumable/coco/proc/toxin_digest(mob/living/M)
if(!data["ticks"])
data["ticks"] = 1
if(data["ticks"] > 15)
if(!ishuman(M))
return
var/mob/living/carbon/human/H = M
var/allergies_type = ALLERGY_UNDISCOVERED
switch(data["ticks"])
if(15 to 59)
if(COOLDOWN_FINISHED(src, coco_warning))
to_chat(H, pick("<span class='warning'>You feel your heart beat faster.</span>", "<span class='warning'>You feel nauseous...</span>", "<span class='warning'>You feel cramps.</span>"))
COOLDOWN_START(src, coco_warning, 7 SECONDS)
if(60 to 119)
if(allergies_type < ALLERGY_DISCOVERED)
allergies_type = ALLERGY_DISCOVERED
if(120 to INFINITY)
if(allergies_type < ALLERGY_LETHAL)
allergies_type = ALLERGY_LETHAL
LAZYSET(H.allergies, id, allergies_type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

жесть возможно я сделал плохой фреймворк аллергий если приходится такое делать 😔

data["ticks"]++

/datum/reagent/consumable/coco/on_unathi_digest(mob/living/M)
toxin_digest(M)
return TRUE

/datum/reagent/consumable/coco/on_tajaran_digest(mob/living/M)
toxin_digest(M)
return TRUE

/datum/reagent/consumable/coco/on_vox_digest(mob/living/M)
toxin_digest(M)
return TRUE

/datum/reagent/consumable/hot_coco
name = "Hot Chocolate"
Expand All @@ -292,11 +328,47 @@
color = "#403010" // rgb: 64, 48, 16
taste_message = "chocolate"
diet_flags = DIET_PLANT
allergen = list(ALLERGY_INGESTION = TRUE)
COOLDOWN_DECLARE(hot_coco_warning)

/datum/reagent/consumable/hot_coco/on_general_digest(mob/living/M)
..()
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, max_temp = BODYTEMP_NORMAL)

/datum/reagent/consumable/hot_coco/proc/toxin_digest(mob/living/M)
if(!data["ticks"])
data["ticks"] = 1
if(data["ticks"] > 15)
if(!ishuman(M))
return
var/mob/living/carbon/human/H = M
var/allergies_type = ALLERGY_UNDISCOVERED
switch(data["ticks"])
if(15 to 59)
if(COOLDOWN_FINISHED(src, hot_coco_warning))
to_chat(H, pick("<span class='warning'>You feel your heart beat faster.</span>", "<span class='warning'>You feel nauseous...</span>", "<span class='warning'>You feel cramps.</span>"))
COOLDOWN_START(src, hot_coco_warning, 7 SECONDS)
if(60 to 119)
if(allergies_type < ALLERGY_DISCOVERED)
allergies_type = ALLERGY_DISCOVERED
if(120 to INFINITY)
if(allergies_type < ALLERGY_LETHAL)
allergies_type = ALLERGY_LETHAL
LAZYSET(H.allergies, id, allergies_type)
data["ticks"]++

/datum/reagent/consumable/hot_coco/on_unathi_digest(mob/living/M)
toxin_digest(M)
return TRUE

/datum/reagent/consumable/hot_coco/on_tajaran_digest(mob/living/M)
toxin_digest(M)
return TRUE

/datum/reagent/consumable/hot_coco/on_vox_digest(mob/living/M)
toxin_digest(M)
return TRUE

/datum/reagent/consumable/psilocybin
name = "Psilocybin"
id = "psilocybin"
Expand Down