diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index fca8c59fec3..b0ccdc8381d 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -2,4 +2,8 @@ losebreath = 0 med_hud_set_health() med_hud_set_status() + + if(reagents) + reagents.death_metabolize(src) + ..(gibbed) \ No newline at end of file diff --git a/code/modules/reagents/newchem/newchem_procs.dm b/code/modules/reagents/newchem/newchem_procs.dm index e9ffc9a7c5f..4508125387e 100644 --- a/code/modules/reagents/newchem/newchem_procs.dm +++ b/code/modules/reagents/newchem/newchem_procs.dm @@ -84,6 +84,18 @@ addiction_list.Remove(R) update_total() +/datum/reagents/proc/death_metabolize(mob/living/M) + if(!M) + return + if(M.stat != DEAD) //what part of DEATH_metabolize don't you get? + return + for(var/A in reagent_list) + var/datum/reagent/R = A + if(!istype(R)) + continue + if(M && R) + R.on_mob_death(M) + /datum/reagents/proc/overdose_list() var/od_chems[0] for(var/datum/reagent/R in reagent_list) diff --git a/code/modules/reagents/newchem/paradise_pop.dm b/code/modules/reagents/newchem/paradise_pop.dm index 4ba859c430e..055b96020db 100644 --- a/code/modules/reagents/newchem/paradise_pop.dm +++ b/code/modules/reagents/newchem/paradise_pop.dm @@ -25,6 +25,13 @@ reagent_state = LIQUID color = "#44FF44" +/datum/reagent/apple_pocalypse/on_mob_life(mob/living/M) + if(prob(1)) + var/turf/simulated/T = get_turf(M) + goonchem_vortex(T, 0, 2, 1) + to_chat(M, "You briefly feel super-massive, like a black hole. Probably just your imagination...") + ..() + //Berry Banned: This one is tasty and safe to drink, might have a low chance of healing a random damage type? /datum/reagent/berry_banned name = "Berry Banned" @@ -33,6 +40,25 @@ reagent_state = LIQUID color = "#FF44FF" +/datum/reagent/berry_banned/on_mob_life(mob/living/M) + if(prob(10)) + var/heal_type = rand(0, 5) //still prefer the string version + switch(heal_type) + if(0) + M.adjustBruteLoss(-0.5*REM) + if(1) + M.adjustFireLoss(-0.5*REM) + if(2) + M.adjustToxLoss(-0.5*REM) + if(3) + M.adjustOxyLoss(-0.5*REM) + if(4) + M.adjustCloneLoss(-0.5*REM) + if(5) + M.adjustBrainLoss(-1*REM) + to_chat(M, "You feel slightly rejuvinated!") + ..() + //Berry Banned 2: This one is tasty and toxic. Deals toxin damage and MAYBE plays the "BWOINK!" sound if it kills someone? /datum/reagent/berry_banned2 name = "Berry Banned" @@ -41,6 +67,18 @@ reagent_state = LIQUID color = "#FF44FF" +/datum/reagent/berry_banned2/on_mob_life(mob/living/M) + if(prob(50)) + M.adjustToxLoss(2*REM) //double strength of poison berry juice alone, because it's concentrated (this is equal to the damage of normal toxin, less often) + if(prob(10)) + to_chat(M, "You feel slightly rejuvinated!") //meta this! + ..() + +/datum/reagent/berry_banned2/on_mob_death(mob/living/M) + M << sound('sound/effects/adminhelp.ogg',0,1,0,25) + to_chat(M, "PM from-Administrator: BWOINK!") + ..() + //Blackeye Brew: Chance to make the drinker say greytider-themed things like "I thought clown was valid!" /datum/reagent/blackeye_brew name = "Blackeye Brew" @@ -49,6 +87,21 @@ reagent_state = LIQUID color = "#4d2600" +/datum/reagent/blackeye_brew/on_mob_life(mob/living/M) + if(prob(25)) + var/list/tider_talk = list("CLOWN IS VALID, RIGHT?", + "SHITMINS! SHITMINS! SHITMINS!", + "FURRIES ARE OPPRESSED!", + "I OWN THIS SERVER NOW, I JUST BOUGHT IT.", + "SECRET TECHNIQUE: TOOLBOX TO THE FACE!", + "SECRET TECHNIQUE: PLASMA CANISTER FIRE!", + "SECRET TECHNIQUE: TABLE AND DISPOSAL!", + "[pick("MY BROTHER", " MY DOG", "MY BEST FRIEND", "THE BORER", "GEORGE MELONS", "SHITMINS")] DID IT!", + "WHAT DO YOU MEAN [pick("Barrack Obama", "John Cena", "Hughe Jass", "Hitler", "xX360noscopeXx")] ISN'T AN ACCEPTABLE NAME?", + "WHAT THE FUCK DID YOU JUST FUCKING SAY ABOUT ME, YOU LITTLE BITCH? I'LL HAVE YOU KNOW I GRADUATED TOP OF MY CLASS IN...") + M.say(pick(tider_talk)) + ..() + //Grape Granade: causes the drinker to sometimes burp, has a low chance to cause a goonchem vortex that pushes things within a very small radius (1-2 tiles) away from the drinker /datum/reagent/grape_granade name = "Grape Granade" @@ -57,6 +110,16 @@ reagent_state = LIQUID color = "#9933ff" +/datum/reagent/grape_granade/on_mob_life(mob/living/M) + if(prob(1)) + var/turf/simulated/T = get_turf(M) + goonchem_vortex(T, 1, 1, 2) + M.emote("burp") + to_chat(M, "You feel ready to burst! Oh wait, just a burp...") + else if(prob(25)) + M.emote("burp") + ..() + //Meteor Malt: Sometimes causes screen shakes for the drinker like a meteor impact, low chance to add 1-5 units of a random mineral reagent to the drinker's blood (iron, copper, silver, gold, uranium, carbon, etc) /datum/reagent/meteor_malt name = "Meteor Malt" @@ -64,3 +127,13 @@ description = "Soft drinks have been detected on collision course with your tastebuds." reagent_state = LIQUID color = "#cc9900" + +/datum/reagent/meteor_malt/on_mob_life(mob/living/M) + if(prob(25)) + M << sound('sound/effects/meteorimpact.ogg',0,1,0,25) + shake_camera(M, 3, 1) + if(prob(5)) + var/amount = rand(1, 5) + var/mineral = pick("copper", "iron", "gold", "carbon", "silver", "aluminum", "silicon", "sodiumchloride", "plasma") + M.reagents.add_reagent(mineral, amount) + ..() diff --git a/code/modules/reagents/oldchem/reagents/_reagent_base.dm b/code/modules/reagents/oldchem/reagents/_reagent_base.dm index 2f3d02b9884..c98a6e98b6f 100644 --- a/code/modules/reagents/oldchem/reagents/_reagent_base.dm +++ b/code/modules/reagents/oldchem/reagents/_reagent_base.dm @@ -70,6 +70,9 @@ holder.remove_reagent(id, metabolization_rate) //By default it slowly disappears. current_cycle++ +/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect + return + // Called when two reagents of the same are mixing. /datum/reagent/proc/on_merge(data) return