From 7c83a27610b62f3d406fd550f907507e558f8fbc Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 19 Apr 2017 04:33:47 -0500 Subject: [PATCH] Prevents mutation toxin from working on nonhumans, removes a spawn --- .../chemistry/reagents/other_reagents.dm | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index d2a1cbdb28..cf956227ba 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -396,22 +396,24 @@ /datum/reagent/stableslimetoxin/on_mob_life(mob/living/carbon/human/H) ..() + if(!istype(H)) + return to_chat(H, "You crumple in agony as your flesh wildly morphs into new forms!") H.visible_message("[H] falls to the ground and screams as [H.p_their()] skin bubbles and froths!") //'froths' sounds painful when used with SKIN. H.Weaken(3, 0) - spawn(30) - if(!H || QDELETED(H)) - return + addtimer(CALLBACK(src, .proc/mutate, H), 30) + return - var/current_species = H.dna.species.type - var/datum/species/mutation = race - if(mutation && mutation != current_species) - to_chat(H, mutationtext) - H.set_species(mutation) - else - to_chat(H, "The pain vanishes suddenly. You feel no different.") - - return 1 +/datum/reagent/stableslimetoxin/proc/mutate(mob/living/carbon/human/H) + if(QDELETED(H)) + return + var/current_species = H.dna.species.type + var/datum/species/mutation = race + if(mutation && mutation != current_species) + to_chat(H, mutationtext) + H.set_species(mutation) + else + to_chat(H, "The pain vanishes suddenly. You feel no different.") /datum/reagent/stableslimetoxin/classic //The one from plasma on green slimes name = "Mutation Toxin"