From 27429f7b0ccebe64c8cf97d6754c18d7f926f52c Mon Sep 17 00:00:00 2001 From: mwerezak Date: Thu, 15 Oct 2015 00:02:18 -0400 Subject: [PATCH] Less copypasta --- .../Chemistry-Reagents-Food-Drinks.dm | 46 ++++++++----------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 9edd9193cb8..3323e6e4158 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -219,6 +219,10 @@ description = "This is what makes chilis hot." reagent_state = LIQUID color = "#B31008" + var/agony_dose = 5 + var/agony_amount = 2 + var/discomfort_message = "Your insides feel uncomfortably hot!" + var/slime_temp_adj = 10 /datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -232,30 +236,31 @@ var/mob/living/carbon/human/H = M if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) return - if(dose < 5 && (dose == metabolism || prob(5))) - M << "Your insides feel uncomfortably hot!" - if(dose >= 5) - M.apply_effect(2, AGONY, 0) + if(dose < agony_dose) + if(prob(5) || dose == metabolism) //dose == metabolism is a very hacky way of forcing the message the first time this procs + M << initial_message + else + M.apply_effect(agony_amount, AGONY, 0) if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") + M << "You feel like your insides are burning!" if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(10, 25) + M.bodytemperature += rand(0, 15) + slime_temp_adj holder.remove_reagent("frostoil", 5) -/datum/reagent/condensedcapsaicin +/datum/reagent/capsaicin/condensed name = "Condensed Capsaicin" id = "condensedcapsaicin" description = "A chemical agent used for self-defense and in police work." reagent_state = LIQUID touch_met = 50 // Get rid of it quickly color = "#B31008" + agony_dose = 0.5 + agony_amount = 4 + discomfort_message = "You feel like your insides are burning!" + slime_temp_adj = 15 -/datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) - if(alien == IS_DIONA) - return - M.adjustToxLoss(0.5 * removed) - -/datum/reagent/condensedcapsaicin/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) +/datum/reagent/capsaicin/condensed/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) var/eyes_covered = 0 var/mouth_covered = 0 var/obj/item/safe_thing = null @@ -304,21 +309,6 @@ M.Weaken(5) return -/datum/reagent/condensedcapsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) - return - if(dose == metabolism) - M << "You feel like your insides are burning!" - else - M.apply_effect(4, AGONY, 0) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(15, 30) - holder.remove_reagent("frostoil", 5) - /* Drinks */ /datum/reagent/drink