diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index f1d76f59037..d21f68cf153 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -417,7 +417,7 @@ steam.start() -- spawns the effect /obj/effects/chem_smoke/Move() ..() - for(var/atom/A in view(2, src)) + for(var/atom/A in view(1, src)) reagents.reaction(A) return @@ -501,7 +501,8 @@ steam.start() -- spawns the effect else direction = pick(alldirs) - chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume) // copy reagents to each smoke + if(chemholder.reagents.total_volume != 1) // can't split 1 very well + chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / number) // copy reagents to each smoke, divide evenly if(finalcolor) smoke.icon += finalcolor // give the smoke color, if it has any to begin with diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index a009a2f0dbf..addc581339e 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -24,16 +24,38 @@ datum return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO var/datum/reagent/self = src src = null //of the reagent to the mob on TOUCHING it. - if(method == TOUCH) - var/chance = 1 - for(var/obj/item/clothing/C in M.get_equipped_items()) - if(C.permeability_coefficient < chance) chance = C.permeability_coefficient - chance = chance * 100 + if(!istype(self.holder.my_atom, /obj/effects/chem_smoke)) + // If the chemicals are in a smoke cloud, do not try to let the chemicals "penetrate" into the mob's system (balance station 13) -- Doohl - if(prob(chance)) - if(M.reagents) - M.reagents.add_reagent(self.id,self.volume/2) + if(method == TOUCH) + + var/chance = 1 + var/block = 0 + + for(var/obj/item/clothing/C in M.get_equipped_items()) + if(C.permeability_coefficient < chance) chance = C.permeability_coefficient + if(istype(C, /obj/item/clothing/suit/bio_suit)) + // bio suits are just about completely fool-proof - Doohl + // kind of a hacky way of making bio suits more resistant to chemicals but w/e + if(prob(50)) + block = 1 + else + if(prob(50)) + block = 1 + + if(istype(C, /obj/item/clothing/head/bio_hood)) + if(prob(50)) + block = 1 + else + if(prob(50)) + block = 1 + + chance = chance * 100 + + if(prob(chance) && !block) + if(M.reagents) + M.reagents.add_reagent(self.id,self.volume/2) return reaction_obj(var/obj/O, var/volume) //By default we transfer a small part of the reagent to the object @@ -600,7 +622,7 @@ datum M << "\red Your mask melts away but protects you from the acid!" return - if(prob(75) && istype(M, /mob/living/carbon/human)) + if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) var/datum/organ/external/affecting = M:organs["head"] if(affecting) affecting.take_damage(25, 0) @@ -610,12 +632,12 @@ datum M << "\red Your face has become disfigured!" M.real_name = "Unknown" else - M.take_organ_damage(15) + M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl else - M.take_organ_damage(15) + M.take_organ_damage(min(15, volume * 2)) reaction_obj(var/obj/O, var/volume) - if((istype(O,/obj/item) || istype(O,/obj/glowshroom)) && prob(40)) + if((istype(O,/obj/item) || istype(O,/obj/glowshroom)) && prob(10)) var/obj/decal/cleanable/molten_item/I = new/obj/decal/cleanable/molten_item(O.loc) I.desc = "Looks like this was \an [O] some time ago." for(var/mob/M in viewers(5, O)) @@ -649,7 +671,7 @@ datum M << "\red Your helmet melts into uselessness!" return var/datum/organ/external/affecting = M:organs["head"] - affecting.take_damage(75, 0) + affecting.take_damage(35, 0) M:UpdateDamage() M:UpdateDamageIcon() M:emote("scream") @@ -660,18 +682,18 @@ datum del (M:wear_mask) M << "\red Your mask melts away but protects you from the acid!" return - M.take_organ_damage(15) + M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid else if(istype(M, /mob/living/carbon/human)) var/datum/organ/external/affecting = M:organs["head"] - affecting.take_damage(75, 0) + affecting.take_damage(30, 0) M:UpdateDamage() M:UpdateDamageIcon() M:emote("scream") M << "\red Your face has become disfigured!" M.real_name = "Unknown" else - M.take_organ_damage(15) + M.take_organ_damage(min(15, volume * 4)) reaction_obj(var/obj/O, var/volume) if((istype(O,/obj/item) || istype(O,/obj/glowshroom))) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 46d5fdf207c..45a9fc0d93d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -212,7 +212,7 @@ breath = loc.remove_air(breath_moles) // Handle chem smoke effects -- Doohl - for(var/obj/effects/chem_smoke/smoke in view(2, src)) + for(var/obj/effects/chem_smoke/smoke in view(1, src)) if(smoke.reagents.total_volume) smoke.reagents.reaction(src, INGEST) spawn(5) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 8fee074f7bc..6723718e19a 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -193,7 +193,7 @@ breath = loc.remove_air(breath_moles) // Handle chem smoke effects -- Doohl - for(var/obj/effects/chem_smoke/smoke in view(2, src)) + for(var/obj/effects/chem_smoke/smoke in view(1, src)) if(smoke.reagents.total_volume) smoke.reagents.reaction(src, INGEST) spawn(5) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 85b7dcacce3..71051d916e3 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -283,13 +283,21 @@ breath = loc.remove_air(breath_moles) // Handle chem smoke effects -- Doohl - for(var/obj/effects/chem_smoke/smoke in view(2, src)) - if(smoke.reagents.total_volume) - smoke.reagents.reaction(src, INGEST) - spawn(5) - if(smoke) - smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs? - break // If they breathe in the nasty stuff once, no need to continue checking + + var/block = 0 + if(wear_mask) + if(istype(wear_mask, /obj/item/clothing/mask/gas)) + block = 1 + + if(!block) + + for(var/obj/effects/chem_smoke/smoke in view(1, src)) + if(smoke.reagents.total_volume) + smoke.reagents.reaction(src, INGEST) + spawn(5) + if(smoke) + smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs? + break // If they breathe in the nasty stuff once, no need to continue checking else //Still give containing object the chance to interact if(istype(loc, /obj/)) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 9569da0b0fe..249a33b4dcf 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -203,13 +203,20 @@ breath = loc.remove_air(breath_moles) // Handle chem smoke effects -- Doohl - for(var/obj/effects/chem_smoke/smoke in view(2, src)) - if(smoke.reagents.total_volume) - smoke.reagents.reaction(src, INGEST) - spawn(5) - if(smoke) - smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs? - break // If they breathe in the nasty stuff once, no need to continue checking + var/block = 0 + if(wear_mask) + if(istype(wear_mask, /obj/item/clothing/mask/gas)) + block = 1 + + if(!block) + + for(var/obj/effects/chem_smoke/smoke in view(1, src)) + if(smoke.reagents.total_volume) + smoke.reagents.reaction(src, INGEST) + spawn(5) + if(smoke) + smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs? + break // If they breathe in the nasty stuff once, no need to continue checking else //Still give containing object the chance to interact