diff --git a/code/ATMOSPHERICS/components/unary_devices/cryo.dm b/code/ATMOSPHERICS/components/unary_devices/cryo.dm index 87eb0e606e8..246716772aa 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cryo.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cryo.dm @@ -314,7 +314,7 @@ occupant.heal_organ_damage(heal_brute,heal_fire) if(beaker && next_trans == 0) beaker.reagents.trans_to(occupant, 1, 10) - beaker.reagents.reaction(occupant) + beaker.reagents.reaction(occupant, VAPOR) next_trans++ if(next_trans == 10) next_trans = 0 diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index eeada126134..440967945ab 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -94,12 +94,12 @@ var/turf/location = get_turf(src) // Create the reagents to put into the air - create_reagents(5) + create_reagents(10) if(overmind && overmind.blob_reagent_datum) - reagents.add_reagent(overmind.blob_reagent_datum.id, 5) + reagents.add_reagent(overmind.blob_reagent_datum.id, 10) else - reagents.add_reagent("spore", 5) + reagents.add_reagent("spore", 10) // Attach the smoke spreader and setup/start it. S.attach(location) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index b6bd9cefb62..a0c97c1da99 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -157,7 +157,10 @@ last_attack = world.time OB.expand(T, 0, blob_reagent_datum.color) for(var/mob/living/L in T) - blob_reagent_datum.reaction_mob(L, TOUCH, 25) + if("blob" in L.faction) //no friendly fire + continue + var/mob_protection = L.get_permeability_protection() + blob_reagent_datum.reaction_mob(L, VAPOR, 25, 1, mob_protection) blob_reagent_datum.send_message(L) OB.color = blob_reagent_datum.color diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index aa1abe7ae6c..a3a305541c7 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -58,14 +58,14 @@ for(var/obj/O in range(0,src)) if(O.type == src.type) continue - reagents.reaction(O, TOUCH, fraction) + reagents.reaction(O, VAPOR, fraction) var/hit = 0 for(var/mob/living/L in range(0,src)) hit += foam_mob(L) if(hit) lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate. var/T = get_turf(src) - reagents.reaction(T, TOUCH, fraction) + reagents.reaction(T, VAPOR, fraction) if(--amount < 0) return @@ -77,7 +77,7 @@ if(!istype(L)) return 0 var/fraction = 1/initial(lifetime) - reagents.reaction(L, TOUCH, fraction) + reagents.reaction(L, VAPOR, fraction) lifetime-- return 1 diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index b1e6b6dde79..db7b6be9b54 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -156,10 +156,10 @@ for(var/obj/O in range(1,src)) if(O.type == src.type) continue - reagents.reaction(O, TOUCH, fraction) + reagents.reaction(O, VAPOR, fraction) for(var/turf/T in range(1,src)) - reagents.reaction(T, TOUCH, fraction) + reagents.reaction(T, VAPOR, fraction) var/hit = 0 for(var/mob/living/L in range(1,src)) @@ -173,7 +173,7 @@ if(!istype(M)) return 0 var/fraction = 1/initial(lifetime) - reagents.reaction(M, TOUCH, fraction) + reagents.reaction(M, VAPOR, fraction) lifetime-- return 1 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1057c2b4742..9ae436fb685 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -450,7 +450,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s var/melting_threshold = 100 if(meltingpwr <= melting_threshold) // so a single unit can't melt items. You need 5.1+ unit for fluoro and 10.1+ for sulphuric return - for(var/V in armor) if(armor[V] > 0) .-- //it survives the acid... diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 7d7818fa3e2..6e770a21eda 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -22,14 +22,17 @@ /obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity) if(!proximity) return - if(ismob(A) && A.reagents && reagents.total_volume) - var/mob/M = A - if(user.a_intent == "harm") - reagents.reaction(M, TOUCH) - reagents.clear_reagents() + if(iscarbon(A) && A.reagents && reagents.total_volume) + var/mob/living/carbon/C = A + if(user.a_intent == "harm" && !C.is_mouth_covered()) + reagents.reaction(C, INGEST) + reagents.trans_to(C, reagents.total_volume) + C.visible_message("[user] has smothered \the [C] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and muffled cries of surprise.") else - reagents.trans_to(M, reagents.total_volume) - M.visible_message("[user] has smothered \the [A] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and muffled cries of surprise.") + reagents.reaction(C, TOUCH) + reagents.clear_reagents() + C.visible_message("[user] has touched \the [C] with \the [src].") + else if(istype(A) && src in user) user.visible_message("[user] starts to wipe down [A] with [src]!", "You start to wipe down [A] with [src]...") if(do_after(user,30, target = A)) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index e83acf03014..56a077bbfa0 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -1,7 +1,9 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -var/const/TOUCH = 1 -var/const/INGEST = 2 +var/const/TOUCH = 1 //splashing +var/const/INGEST = 2 //injection, ingestion +var/const/VAPOR = 3 //smoke, foam, spray, blob attack +var/const/PATCH = 4 //patches /////////////////////////////////////////////////////////////////////////////////// @@ -429,7 +431,7 @@ var/const/INGEST = 2 if(isliving(A)) var/mob/living/L = A var/touch_protection = 0 - if(method == TOUCH) + if(method == VAPOR) touch_protection = L.get_permeability_protection() for(var/datum/reagent/R in reagent_list) R.reaction_mob(L, method, R.volume*volume_modifier, show_message, touch_protection) diff --git a/code/modules/reagents/Chemistry-Readme.dm b/code/modules/reagents/Chemistry-Readme.dm index 74e9fe0b093..bd28dcb79f1 100644 --- a/code/modules/reagents/Chemistry-Readme.dm +++ b/code/modules/reagents/Chemistry-Readme.dm @@ -69,7 +69,7 @@ About the Holder: This proc calls the appropriate reaction procs of the reagents. I.e. if A is an object, it will call the reagents reaction_obj proc. The method var is used for reaction on mobs. It simply tells - us if the mob TOUCHed the reagent or if it INGESTed the reagent. + us if the mob TOUCHed the reagent, if it INGESTed the reagent, if the reagent was VAPORIZEd on them, or transfered via a PATCH to them.. Since the volume can be checked in a reagents proc, you might want to use the volume_modifier var to modifiy the passed value without actually changing the volume of the reagents. diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index c89a5d434eb..7a58c099077 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -28,21 +28,21 @@ var/overdose_threshold = 0 var/addiction_threshold = 0 var/addiction_stage = 0 - var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick. + var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick. /datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references ..() holder = null -/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1, touch_protection = 0) +/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) if(!istype(M)) return 0 var/datum/reagent/self = src src = null - if(method == TOUCH) + if(method == VAPOR) //smoke, foam, spray if(M.reagents) - var/modifier = Clamp((1 - touch_protection) + rand(-5,5)/100, 0, 1) + var/modifier = Clamp((1 - touch_protection), 0, 1) var/amount = round(volume*modifier, 0.1) if(amount >= 1) M.reagents.add_reagent(self.id, amount) diff --git a/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm index 5470a6f5db1..6265d0cb858 100644 --- a/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm @@ -4,6 +4,9 @@ var/message = "The blob strikes you" //message sent to any mob hit by the blob var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt +/datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection) + return round(reac_volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume. + /datum/reagent/blob/boiling_oil name = "Boiling Oil" id = "boiling_oil" @@ -11,14 +14,13 @@ color = "#B68D00" message = "The blob splashes you with burning oil" -/datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(15*ratio, BURN) - M.adjust_fire_stacks(2*ratio) - M.IgniteMob() - if(isliving(M)) - M.emote("scream") +/datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + M.adjust_fire_stacks(round(reac_volume/12)) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, BURN) + M.IgniteMob() + if(iscarbon(M)) + M.emote("scream") /datum/reagent/blob/toxic_goop name = "Toxic Goop" @@ -27,10 +29,9 @@ color = "#008000" message_living = ", and you feel sick and nauseated" -/datum/reagent/blob/toxic_goop/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(20*ratio, TOX) +/datum/reagent/blob/toxic_goop/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.8*reac_volume, TOX) /datum/reagent/blob/skin_ripper name = "Skin Ripper" @@ -39,12 +40,11 @@ color = "#FF4C4C" message_living = ", and you feel your skin ripping and tearing off" -/datum/reagent/blob/skin_ripper/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(20*ratio, BRUTE) - if(iscarbon(M)) - M.emote("scream") +/datum/reagent/blob/skin_ripper/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.8*reac_volume, BRUTE) + if(iscarbon(M)) + M.emote("scream") // Combo Reagents @@ -55,15 +55,14 @@ color = "#7F0000" message_living = ", and you feel your skin char and melt" -/datum/reagent/blob/skin_melter/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(10*ratio, BRUTE) - M.apply_damage(10*ratio, BURN) - M.adjust_fire_stacks(2*ratio) - M.IgniteMob() - if(iscarbon(M)) - M.emote("scream") +/datum/reagent/blob/skin_melter/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + M.adjust_fire_stacks(round(reac_volume/12)) + reac_volume = ..() + M.apply_damage(0.4*reac_volume, BRUTE) + M.apply_damage(0.4*reac_volume, BURN) + M.IgniteMob() + if(iscarbon(M)) + M.emote("scream") /datum/reagent/blob/lung_destroying_toxin name = "Lung Destroying Toxin" @@ -72,12 +71,11 @@ color = "#00FFC5" message_living = ", and your lungs feel heavy and weak" -/datum/reagent/blob/lung_destroying_toxin/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(20* ratio, OXY) - M.losebreath += 15*ratio - M.apply_damage(20*ratio, TOX) +/datum/reagent/blob/lung_destroying_toxin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.8* reac_volume, OXY) + M.losebreath += round(0.6*reac_volume) + M.apply_damage(0.8*reac_volume, TOX) // Special Reagents @@ -88,18 +86,17 @@ color = "#00EE00" message_living = ", and your skin feels papery and everything hurts" -/datum/reagent/blob/radioactive_liquid/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(10*ratio, BRUTE) - if(istype(M, /mob/living/carbon/human)) - M.irradiate(40*ratio) - if(prob(33*ratio)) - randmuti(M) - if(prob(98)) - randmutb(M) - domutcheck(M, null) - updateappearance(M) +/datum/reagent/blob/radioactive_liquid/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.4*reac_volume, BRUTE) + if(ishuman(M)) + M.irradiate(1.6*reac_volume) + if(prob(1.3*reac_volume)) + randmuti(M) + if(prob(98)) + randmutb(M) + domutcheck(M, null) + updateappearance(M) /datum/reagent/blob/dark_matter name = "Dark Matter" @@ -108,12 +105,10 @@ color = "#61407E" message = "You feel a thrum as the blob strikes you, and everything flies at you" -/datum/reagent/blob/dark_matter/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(15*ratio, BRUTE) - reagent_vortex(M, 0) - +/datum/reagent/blob/dark_matter/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reagent_vortex(M, 0, reac_volume) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, BRUTE) /datum/reagent/blob/b_sorium name = "Sorium" @@ -122,12 +117,10 @@ color = "#808000" message = "The blob slams into you, and sends you flying" -/datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(15*ratio, BRUTE) - reagent_vortex(M, 1) - +/datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reagent_vortex(M, 1, reac_volume) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, BRUTE) /datum/reagent/blob/explosive // I'm gonna burn in hell for this one name = "Explosive Gelatin" @@ -136,11 +129,9 @@ color = "#FFA500" message = "The blob strikes you, and its tendrils explode" -/datum/reagent/blob/explosive/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - if(prob(75*ratio)) - explosion(M.loc, 0, 0, 1, 0, 0) +/datum/reagent/blob/explosive/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(prob(3*reac_volume)) + explosion(M.loc, 0, 0, 1, 0, 0) /datum/reagent/blob/omnizine name = "Omnizine" @@ -150,10 +141,9 @@ message = "The blob squirts something at you" message_living = ", and you feel great" -/datum/reagent/blob/omnizine/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.reagents.add_reagent("omnizine", 11*ratio) +/datum/reagent/blob/omnizine/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.reagents.add_reagent("omnizine", 0.6*reac_volume) /datum/reagent/blob/spacedrugs name = "Space drugs" @@ -163,17 +153,16 @@ message = "The blob squirts something at you" message_living = ", and you feel funny" -/datum/reagent/blob/spacedrugs/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.hallucination += 20*ratio - M.reagents.add_reagent("space_drugs", 15*ratio) - M.apply_damage(10*ratio, TOX) +/datum/reagent/blob/spacedrugs/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.hallucination += 0.8*reac_volume + M.reagents.add_reagent("space_drugs", 0.6*reac_volume) + M.apply_damage(0.4*reac_volume, TOX) -/datum/reagent/blob/proc/reagent_vortex(mob/living/M, setting_type) +/datum/reagent/blob/proc/reagent_vortex(mob/living/M, setting_type, reac_volume) var/turf/pull = get_turf(M) - var/range_power = Clamp(round(volume/5, 1), 1, 5) + var/range_power = Clamp(round(reac_volume/5, 1), 1, 5) for(var/atom/movable/X in range(range_power,pull)) if(istype(X, /obj/effect)) continue diff --git a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm index df637f4eab8..04eae9fb1b1 100644 --- a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm +++ b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm @@ -34,13 +34,13 @@ M.adjustToxLoss(2) ..() return -/datum/reagent/consumable/ethanol/reaction_obj(obj/O, volume) +/datum/reagent/consumable/ethanol/reaction_obj(obj/O, reac_volume) if(istype(O,/obj/item/weapon/paper)) var/obj/item/weapon/paper/paperaffected = O paperaffected.clearpaper() usr << "The solution melts away the ink on the paper." if(istype(O,/obj/item/weapon/book)) - if(volume >= 5) + if(reac_volume >= 5) var/obj/item/weapon/book/affectedbook = O affectedbook.dat = null usr << "The solution melts away the ink on the book." @@ -48,12 +48,12 @@ usr << "It wasn't enough..." return -/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. +/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with ethanol isn't quite as good as fuel. if(!istype(M, /mob/living)) return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 15) - return + if(method == TOUCH || method == VAPOR) + M.adjust_fire_stacks(reac_volume / 15) + ..() /datum/reagent/consumable/ethanol/beer name = "Beer" diff --git a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm index 6ca5afcf052..2b4630b4416 100644 --- a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm @@ -150,8 +150,8 @@ ..() return -/datum/reagent/consumable/frostoil/reaction_turf(turf/simulated/T, volume) - if(volume >= 5) +/datum/reagent/consumable/frostoil/reaction_turf(turf/simulated/T, reac_volume) + if(reac_volume >= 5) for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(15,30)) //if(istype(T)) @@ -163,12 +163,12 @@ description = "A chemical agent used for self-defense and in police work." color = "#B31008" // rgb: 179, 16, 8 -/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(!istype(M, /mob/living/carbon/human) && !istype(M, /mob/living/carbon/monkey)) return var/mob/living/carbon/victim = M - if(method == TOUCH) + if(method == TOUCH || method == VAPOR) //check for protection var/mouth_covered = 0 var/eyes_covered = 0 @@ -321,11 +321,11 @@ nutriment_factor = 20 * REAGENTS_METABOLISM color = "#302000" // rgb: 48, 32, 0 -/datum/reagent/consumable/cornoil/reaction_turf(turf/simulated/T, volume) +/datum/reagent/consumable/cornoil/reaction_turf(turf/simulated/T, reac_volume) if (!istype(T)) return src = null - if(volume >= 3) + if(reac_volume >= 3) T.MakeSlippery() var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T) if(hotspot) @@ -380,11 +380,11 @@ reagent_state = SOLID color = "#FFFFFF" // rgb: 0, 0, 0 -/datum/reagent/consumable/flour/reaction_turf(turf/T, volume) +/datum/reagent/consumable/flour/reaction_turf(turf/T, reac_volume) src = null if(!istype(T, /turf/space)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/flour(T) - reagentdecal.reagents.add_reagent("flour", volume) + reagentdecal.reagents.add_reagent("flour", reac_volume) /datum/reagent/consumable/cherryjelly name = "Cherry Jelly" diff --git a/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm index 5a45714ad8a..a8999d8ddac 100644 --- a/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm @@ -163,24 +163,22 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method == TOUCH) - M.adjustFireLoss(-volume) + if(method == PATCH) + M.adjustFireLoss(-reac_volume) if(show_message) M << "You feel your burns healing!" M.emote("scream") if(method == INGEST) - M.adjustToxLoss(0.5*volume) + M.adjustToxLoss(0.5*reac_volume) if(show_message) M << "You probably shouldn't have eaten that. Maybe you should of splashed it on, or applied a patch?" ..() - return /datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/M) M.adjustFireLoss(-2*REM) ..() - return /datum/reagent/medicine/styptic_powder name = "Styptic Powder" @@ -189,25 +187,23 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method == TOUCH) - M.adjustBruteLoss(-volume) + if(method == PATCH) + M.adjustBruteLoss(-reac_volume) if(show_message) M << "You feel your wounds knitting back together!" - if(M.stat) - M.emote("scream") + M.emote("scream") if(method == INGEST) - M.adjustToxLoss(0.5*volume) + M.adjustToxLoss(0.5*reac_volume) if(show_message) M << "You feel kind of ill. Maybe you ate a medicine you shouldn't have?" ..() - return + /datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/M) M.adjustBruteLoss(-2*REM) ..() - return /datum/reagent/medicine/salglu_solution name = "Saline-Glucose Solution" @@ -222,7 +218,6 @@ M.adjustBruteLoss(-0.5*REM) M.adjustFireLoss(-0.5*REM) ..() - return /datum/reagent/medicine/mine_salve name = "Miner's Salve" @@ -239,20 +234,19 @@ M.adjustBruteLoss(-0.25*REM) M.adjustFireLoss(-0.25*REM) ..() - return -/datum/reagent/medicine/mine_salve/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/mine_salve/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) if(show_message) M << "You feel your wounds knitting back together!" + method = VAPOR //so it's correctly absorbed in reagent/reaction_mob() if(method == INGEST) if(show_message) M << "That tasted horrible." M.AdjustStunned(2) M.AdjustWeakened(2) ..() - return /datum/reagent/medicine/mine_salve/on_mob_delete(mob/living/M) if(iscarbon(M)) @@ -267,15 +261,15 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume,show_message = 1) +/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method == TOUCH) - M.adjustBruteLoss(-1.5*volume) - M.adjustFireLoss(-1.5*volume) + if(method == PATCH) + M.adjustBruteLoss(-1.5*reac_volume) + M.adjustFireLoss(-1.5*reac_volume) if(show_message) M << "You feel your burns healing and your flesh knitting together!" ..() - return + /datum/reagent/medicine/charcoal name = "Charcoal" @@ -659,7 +653,7 @@ color = "#C8A5DC" metabolization_rate = 0.5 * REAGENTS_METABOLISM -/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/carbon/human/M, method=TOUCH, volume) +/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/carbon/human/M, method=TOUCH, reac_volume) if(M.stat == DEAD) if(M.getBruteLoss() >= 100 || M.getFireLoss() >= 100) M.visible_message("[M]'s body convulses a bit, and then falls still once more.") diff --git a/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm index a5975560f1c..76ce0b07ebe 100644 --- a/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm @@ -5,7 +5,7 @@ id = "blood" color = "#C80000" // rgb: 200, 0, 0 -/datum/reagent/blood/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/blood/reaction_mob(mob/M, method=TOUCH, reac_volume) var/datum/reagent/blood/self = src src = null if(self.data && self.data["viruses"]) @@ -14,9 +14,9 @@ if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS) continue - if(method == TOUCH) + if(method == TOUCH || method == VAPOR) M.ContractDisease(D) - else //injected + else //ingest or patch M.ForceContractDisease(D) /datum/reagent/blood/on_new(list/data) @@ -48,11 +48,13 @@ src.data["viruses"] = preserve return 1 -/datum/reagent/blood/reaction_turf(turf/simulated/T, volume)//splash the blood all over the place - if(!istype(T)) return +/datum/reagent/blood/reaction_turf(turf/simulated/T, reac_volume)//splash the blood all over the place + if(!istype(T)) + return var/datum/reagent/blood/self = src src = null - if(!(volume >= 3)) return + if(reac_volume < 3) + return //var/datum/disease/D = self.data["virus"] if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human)) var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here @@ -93,7 +95,7 @@ id = "vaccine" color = "#C81040" // rgb: 200, 16, 64 -/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, reac_volume) var/datum/reagent/vaccine/self = src src = null if(islist(self.data) && method == INGEST) @@ -101,13 +103,11 @@ if(D.GetDiseaseID() in self.data) D.cure() M.resistances |= self.data - return /datum/reagent/vaccine/on_merge(list/data) if(istype(data)) src.data |= data.Copy() - /datum/reagent/water name = "Water" id = "water" @@ -119,11 +119,11 @@ * Water reaction to turf */ -/datum/reagent/water/reaction_turf(turf/simulated/T, volume) +/datum/reagent/water/reaction_turf(turf/simulated/T, reac_volume) if (!istype(T)) return var/CT = cooling_temperature src = null - if(volume >= 10) + if(reac_volume >= 10) T.MakeSlippery() for(var/mob/living/simple_animal/slime/M in T) @@ -142,7 +142,7 @@ * Water reaction to an object */ -/datum/reagent/water/reaction_obj(obj/O, volume) +/datum/reagent/water/reaction_obj(obj/O, reac_volume) src = null if(istype(O,/obj/item)) @@ -166,11 +166,12 @@ * Water reaction to a mob */ -/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with water can help put them out! +/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with water can help put them out! if(!istype(M, /mob/living)) return if(method == TOUCH) - M.adjust_fire_stacks(-(volume / 10)) + M.adjust_fire_stacks(-(reac_volume / 10)) + ..() /datum/reagent/water/holywater name = "Holy Water" @@ -200,10 +201,10 @@ holder.remove_reagent(src.id, 0.4) //fixed consumption to prevent balancing going out of whack return -/datum/reagent/water/holywater/reaction_turf(turf/simulated/T, volume) +/datum/reagent/water/holywater/reaction_turf(turf/simulated/T, reac_volume) ..() if(!istype(T)) return - if(volume>=10) + if(reac_volume>=10) for(var/obj/effect/rune/R in T) qdel(R) T.Bless() @@ -247,10 +248,10 @@ description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them. giggity." color = "#009CA8" // rgb: 0, 156, 168 -/datum/reagent/lube/reaction_turf(turf/simulated/T, volume) +/datum/reagent/lube/reaction_turf(turf/simulated/T, reac_volume) if (!istype(T)) return src = null - if(volume >= 1) + if(reac_volume >= 1) T.MakeSlippery(2) /datum/reagent/spraytan @@ -261,9 +262,9 @@ metabolization_rate = 10 * REAGENTS_METABOLISM // very fast, so it can be applied rapidly. But this changes on an overdose overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle. -/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(istype(M, /mob/living/carbon/human)) - if(method == TOUCH) + if(method == PATCH || method == VAPOR) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") switch(N.skin_tone) @@ -382,9 +383,10 @@ description = "An advanced corruptive toxin produced by slimes." color = "#13BC5E" // rgb: 19, 188, 94 -/datum/reagent/aslimetoxin/reaction_mob(mob/M, volume) +/datum/reagent/aslimetoxin/reaction_mob(mob/M, method=TOUCH, reac_volume) src = null - M.ForceContractDisease(new /datum/disease/transformation/slime(0)) + if(method != TOUCH) + M.ForceContractDisease(new /datum/disease/transformation/slime(0)) /datum/reagent/serotrotium name = "Serotrotium" @@ -463,7 +465,7 @@ reagent_state = SOLID color = "#1C1300" // rgb: 30, 20, 0 -/datum/reagent/carbon/reaction_turf(turf/T, volume) +/datum/reagent/carbon/reaction_turf(turf/T, reac_volume) src = null if(!istype(T, /turf/space)) new /obj/effect/decal/cleanable/dirt(T) @@ -539,12 +541,12 @@ ..() return -/datum/reagent/radium/reaction_turf(turf/T, volume) +/datum/reagent/radium/reaction_turf(turf/T, reac_volume) src = null - if(volume >= 3) + if(reac_volume >= 3) if(!istype(T, /turf/space)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T) - reagentdecal.reagents.add_reagent("radium", volume) + reagentdecal.reagents.add_reagent("radium", reac_volume) /datum/reagent/sterilizine name = "Sterilizine" @@ -583,15 +585,13 @@ /datum/reagent/uranium/on_mob_life(mob/living/M) M.apply_effect(1/M.metabolism_efficiency,IRRADIATE,0) ..() - return - -/datum/reagent/uranium/reaction_turf(turf/T, volume) +/datum/reagent/uranium/reaction_turf(turf/T, reac_volume) src = null - if(volume >= 3) + if(reac_volume >= 3) if(!istype(T, /turf/space)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T) - reagentdecal.reagents.add_reagent("uranium", volume) + reagentdecal.reagents.add_reagent("uranium", reac_volume) /datum/reagent/aluminium name = "Aluminium" @@ -613,17 +613,17 @@ description = "Required for welders. Flamable." color = "#660000" // rgb: 102, 0, 0 -/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! +/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! if(!istype(M, /mob/living)) return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 10) + if(method == TOUCH || method == VAPOR) + M.adjust_fire_stacks(reac_volume / 10) return + ..() /datum/reagent/fuel/on_mob_life(mob/living/M) M.adjustToxLoss(1) ..() - return /datum/reagent/space_cleaner name = "Space cleaner" @@ -631,15 +631,15 @@ description = "A compound used to clean things. Now with 50% more sodium hypochlorite!" color = "#A5F0EE" // rgb: 165, 240, 238 -/datum/reagent/space_cleaner/reaction_obj(obj/O, volume) +/datum/reagent/space_cleaner/reaction_obj(obj/O, reac_volume) if(istype(O,/obj/effect/decal/cleanable)) qdel(O) else if(O) O.clean_blood() -/datum/reagent/space_cleaner/reaction_turf(turf/T, volume) - if(volume >= 1) +/datum/reagent/space_cleaner/reaction_turf(turf/T, reac_volume) + if(reac_volume >= 1) T.clean_blood() for(var/obj/effect/decal/cleanable/C in T) qdel(C) @@ -648,39 +648,40 @@ M.adjustToxLoss(rand(5,10)) if(istype(T, /turf/simulated/floor)) var/turf/simulated/floor/F = T - if(volume >= 1) + if(reac_volume >= 1) F.dirt = 0 -/datum/reagent/space_cleaner/reaction_mob(mob/M, method=TOUCH, volume) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.lip_style) - H.lip_style = null - H.update_body() - if(C.r_hand) - C.r_hand.clean_blood() - if(C.l_hand) - C.l_hand.clean_blood() - if(C.wear_mask) - if(C.wear_mask.clean_blood()) - C.update_inv_wear_mask() - if(ishuman(M)) - var/mob/living/carbon/human/H = C - if(H.head) - if(H.head.clean_blood()) - H.update_inv_head() - if(H.wear_suit) - if(H.wear_suit.clean_blood()) - H.update_inv_wear_suit() - else if(H.w_uniform) - if(H.w_uniform.clean_blood()) - H.update_inv_w_uniform() - if(H.shoes) - if(H.shoes.clean_blood()) - H.update_inv_shoes() - M.clean_blood() +/datum/reagent/space_cleaner/reaction_mob(mob/M, method=TOUCH, reac_volume) + if(method == TOUCH || VAPOR) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.lip_style) + H.lip_style = null + H.update_body() + if(C.r_hand) + C.r_hand.clean_blood() + if(C.l_hand) + C.l_hand.clean_blood() + if(C.wear_mask) + if(C.wear_mask.clean_blood()) + C.update_inv_wear_mask() + if(ishuman(M)) + var/mob/living/carbon/human/H = C + if(H.head) + if(H.head.clean_blood()) + H.update_inv_head() + if(H.wear_suit) + if(H.wear_suit.clean_blood()) + H.update_inv_wear_suit() + else if(H.w_uniform) + if(H.w_uniform.clean_blood()) + H.update_inv_w_uniform() + if(H.shoes) + if(H.shoes.clean_blood()) + H.update_inv_shoes() + M.clean_blood() /datum/reagent/cryptobiolin name = "Cryptobiolin" @@ -717,9 +718,9 @@ description = "Microscopic construction robots." color = "#535E66" // rgb: 83, 94, 102 -/datum/reagent/nanites/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/nanites/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) src = null - if( (prob(min(10, volume)) && method==TOUCH) || method==INGEST) + if(method==PATCH || method==INGEST || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) M.ForceContractDisease(new /datum/disease/transformation/robot(0)) /datum/reagent/xenomicrobes @@ -728,9 +729,9 @@ description = "Microbes with an entirely alien cellular structure." color = "#535E66" // rgb: 83, 94, 102 -/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) src = null - if( (prob(min(10, volume)) && method==TOUCH) || method==INGEST) + if(method==PATCH || method==INGEST || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) M.ContractDisease(new /datum/disease/transformation/xeno(0)) /datum/reagent/fluorosurfactant//foam precursor @@ -909,7 +910,7 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/carpet/reaction_turf(turf/simulated/T, volume) +/datum/reagent/carpet/reaction_turf(turf/simulated/T, reac_volume) if(istype(T, /turf/simulated/floor/plating) || istype(T, /turf/simulated/floor/plasteel)) var/turf/simulated/floor/F = T F.ChangeTurf(/turf/simulated/floor/carpet) @@ -959,21 +960,20 @@ ..() return -/datum/reagent/colorful_reagent/reaction_mob(mob/living/M, volume) +/datum/reagent/colorful_reagent/reaction_mob(mob/living/M, reac_volume) if(M && isliving(M)) M.color = pick(random_color_list) ..() - return -/datum/reagent/colorful_reagent/reaction_obj(obj/O, volume) + +/datum/reagent/colorful_reagent/reaction_obj(obj/O, reac_volume) if(O) O.color = pick(random_color_list) ..() - return -/datum/reagent/colorful_reagent/reaction_turf(turf/T, volume) + +/datum/reagent/colorful_reagent/reaction_turf(turf/T, reac_volume) if(T) T.color = pick(random_color_list) ..() - return /datum/reagent/hair_dye name = "Quantum Hair Dye" @@ -983,14 +983,13 @@ color = "#C8A5DC" var/list/potential_colors = list("0ad","a0f","f73","d14","d14","0b5","0ad","f73","fc2","084","05e","d22","fa0") // fucking hair code -/datum/reagent/hair_dye/reaction_mob(mob/living/M, volume) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - H.hair_color = pick(potential_colors) - H.facial_hair_color = pick(potential_colors) - H.update_hair() - ..() - return +/datum/reagent/hair_dye/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method == TOUCH || method == VAPOR) + if(M && ishuman(M)) + var/mob/living/carbon/human/H = M + H.hair_color = pick(potential_colors) + H.facial_hair_color = pick(potential_colors) + H.update_hair() /datum/reagent/barbers_aid name = "Barber's Aid" @@ -999,16 +998,15 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/barbers_aid/reaction_mob(mob/living/M, volume) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - var/datum/sprite_accessory/hair/picked_hair = pick(hair_styles_list) - var/datum/sprite_accessory/facial_hair/picked_beard = pick(facial_hair_styles_list) - H.hair_style = picked_hair - H.facial_hair_style = picked_beard - H.update_hair() - ..() - return +/datum/reagent/barbers_aid/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method == TOUCH || method == VAPOR) + if(M && ishuman(M)) + var/mob/living/carbon/human/H = M + var/datum/sprite_accessory/hair/picked_hair = pick(hair_styles_list) + var/datum/sprite_accessory/facial_hair/picked_beard = pick(facial_hair_styles_list) + H.hair_style = picked_hair + H.facial_hair_style = picked_beard + H.update_hair() /datum/reagent/concentrated_barbers_aid name = "Concentrated Barber's Aid" @@ -1017,14 +1015,13 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/concentrated_barbers_aid/reaction_mob(mob/living/M, volume) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - H.hair_style = "Very Long Hair" - H.facial_hair_style = "Very Long Beard" - H.update_hair() - ..() - return +/datum/reagent/concentrated_barbers_aid/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method == TOUCH || method == VAPOR) + if(M && ishuman(M)) + var/mob/living/carbon/human/H = M + H.hair_style = "Very Long Hair" + H.facial_hair_style = "Very Long Beard" + H.update_hair() /datum/reagent/saltpetre name = "Saltpetre" diff --git a/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm index 51b06d2774e..c56242773f6 100644 --- a/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm @@ -6,14 +6,14 @@ reagent_state = SOLID color = "#673910" // rgb: 103, 57, 16 -/datum/reagent/thermite/reaction_turf(turf/T, volume) +/datum/reagent/thermite/reaction_turf(turf/T, reac_volume) src = null - if(volume >= 1 && istype(T, /turf/simulated/wall)) + if(reac_volume >= 1 && istype(T, /turf/simulated/wall)) var/turf/simulated/wall/Wall = T if(istype(Wall, /turf/simulated/wall/r_wall)) - Wall.thermite = Wall.thermite+(volume*2.5) + Wall.thermite = Wall.thermite+(reac_volume*2.5) else - Wall.thermite = Wall.thermite+(volume*10) + Wall.thermite = Wall.thermite+(reac_volume*10) Wall.overlays = list() Wall.overlays += image('icons/effects/effects.dmi',"thermite") @@ -48,29 +48,30 @@ M.adjustFireLoss(burndmg) ..() -/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume) +/datum/reagent/clf3/reaction_turf(turf/simulated/T, reac_volume) if(istype(T, /turf/simulated/floor/plating)) var/turf/simulated/floor/plating/F = T if(prob(1 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed F.ChangeTurf(F.baseturf) if(istype(T, /turf/simulated/floor/)) var/turf/simulated/floor/F = T - if(prob(volume/10)) + if(prob(reac_volume/10)) F.make_plating() - else if(prob(volume)) + else if(prob(reac_volume)) F.burn_tile() if(istype(F, /turf/simulated/floor/)) PoolOrNew(/obj/effect/hotspot, F) if(istype(T, /turf/simulated/wall/)) var/turf/simulated/wall/W = T - if(prob(volume/10)) + if(prob(reac_volume/10)) W.ChangeTurf(/turf/simulated/floor/plating) -/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH && isliving(M)) - M.adjust_fire_stacks(min(volume/5, 10)) - M.IgniteMob() - PoolOrNew(/obj/effect/hotspot, M.loc) +/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(istype(M)) + if(method != INGEST) + M.adjust_fire_stacks(min(reac_volume/5, 10)) + M.IgniteMob() + PoolOrNew(/obj/effect/hotspot, M.loc) /datum/reagent/sorium name = "Sorium" @@ -128,8 +129,8 @@ description = "Catches you on fire and makes you ignite." reagent_state = LIQUID color = "#FF9999" - -/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) + +/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, reac_volume) M.IgniteMob() ..() @@ -150,9 +151,10 @@ M.adjust_fire_stacks(1) ..() -/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH && isliving(M)) - M.adjust_fire_stacks(min(volume/4, 20)) +/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(istype(M)) + if(method != INGEST) + M.adjust_fire_stacks(min(reac_volume/4, 20)) /datum/reagent/cryostylane name = "Cryostylane" @@ -175,8 +177,8 @@ holder.handle_reactions() ..() -/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, volume) - if(volume >= 5) +/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, reac_volume) + if(reac_volume >= 5) for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(15,30)) diff --git a/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm index 2672d7e678a..e13de807739 100644 --- a/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm @@ -28,13 +28,13 @@ color = "#13BC5E" // rgb: 19, 188, 94 toxpwr = 0 -/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, volume) +/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume) if(!..()) return if(!istype(M) || !M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this. src = null - if((method==TOUCH && prob(min(33, volume))) || method==INGEST) + if((method==VAPOR && prob(min(33, reac_volume))) || method==INGEST || method == PATCH) randmuti(M) if(prob(98)) randmutb(M) @@ -42,13 +42,12 @@ randmutg(M) domutcheck(M, null) updateappearance(M) - return + ..() /datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/M) if(istype(M)) M.apply_effect(5,IRRADIATE,0) ..() - return /datum/reagent/toxin/plasma name = "Plasma" @@ -66,27 +65,24 @@ ..() return -/datum/reagent/toxin/plasma/reaction_obj(obj/O, volume) +/datum/reagent/toxin/plasma/reaction_obj(obj/O, reac_volume) src = null - /*if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg/slime)) - var/obj/item/weapon/reagent_containers/food/snacks/egg/slime/egg = O - if (egg.grown) - egg.Hatch()*/ - if((!O) || (!volume)) return 0 - O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + if((!O) || (!reac_volume)) return 0 + O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, reac_volume) -/datum/reagent/toxin/plasma/reaction_turf(turf/simulated/T, volume) +/datum/reagent/toxin/plasma/reaction_turf(turf/simulated/T, reac_volume) src = null if(istype(T)) - T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, reac_volume) return -/datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! +/datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! if(!istype(M, /mob/living)) return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) + if(method == TOUCH || method == VAPOR) + M.adjust_fire_stacks(reac_volume / 5) return + ..() /datum/reagent/toxin/lexorin name = "Lexorin" @@ -181,7 +177,7 @@ color = "#49002E" // rgb: 73, 0, 46 toxpwr = 1 -/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, volume) +/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, reac_volume) if(istype(O,/obj/structure/alien/weeds/)) var/obj/structure/alien/weeds/alien_weeds = O alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast @@ -192,13 +188,15 @@ var/obj/effect/spacevine/SV = O SV.on_chem_effect(src) -/datum/reagent/toxin/plantbgone/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/toxin/plantbgone/reaction_mob(mob/living/M, method=TOUCH, reac_volume) src = null - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!C.wear_mask) // If not wearing a mask - var/damage = min(round(0.4*volume, 0.1),10) - C.adjustToxLoss(damage) + if(method == VAPOR) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.wear_mask) // If not wearing a mask + var/damage = min(round(0.4*reac_volume, 0.1),10) + C.adjustToxLoss(damage) + /datum/reagent/toxin/plantbgone/weedkiller name = "Weed Killer" id = "weedkiller" @@ -213,13 +211,14 @@ color = "#4B004B" // rgb: 75, 0, 75 toxpwr = 1 -/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume) src = null - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!C.wear_mask) // If not wearing a mask - var/damage = min(round(0.4*volume, 0.1),10) - C.adjustToxLoss(damage) + if(method == VAPOR) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.wear_mask) // If not wearing a mask + var/damage = min(round(0.4*reac_volume, 0.1),10) + C.adjustToxLoss(damage) /datum/reagent/toxin/spore name = "Spore Toxin" @@ -456,10 +455,9 @@ metabolization_rate = 0.4 * REAGENTS_METABOLISM toxpwr = 0 -/datum/reagent/toxin/itching_powder/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.reagents.add_reagent("itching_powder", volume) - return +/datum/reagent/toxin/itching_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method != INGEST) + M.reagents.add_reagent("itching_powder", reac_volume) /datum/reagent/toxin/itching_powder/on_mob_life(mob/living/M) if(prob(15)) @@ -623,21 +621,28 @@ toxpwr = 1 var/acidpwr = 10 //the amount of protection removed from the armour -/datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, volume) +/datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume) if(!istype(C)) return - volume = round(volume,0.1) - if(method != TOUCH) - C.take_organ_damage(min(6*toxpwr, volume * toxpwr)) + reac_volume = round(reac_volume,0.1) + if(method == INGEST) + C.take_organ_damage(min(6*toxpwr, reac_volume * toxpwr)) return + C.acid_act(acidpwr, toxpwr, reac_volume) - C.acid_act(acidpwr, toxpwr, volume) - -/datum/reagent/toxin/acid/reaction_obj(obj/O, volume) +/datum/reagent/toxin/acid/reaction_obj(obj/O, reac_volume) if(istype(O.loc, /mob)) //handled in human acid_act() return - volume = round(volume,0.1) - O.acid_act(acidpwr, toxpwr, volume) + reac_volume = round(reac_volume,0.1) + O.acid_act(acidpwr, reac_volume) + +/datum/reagent/toxin/acid/reaction_turf(turf/T, reac_volume) + if (!istype(T)) + return + src = null + reac_volume = round(reac_volume,0.1) + for(var/obj/O in T) + O.acid_act(acidpwr, reac_volume) /datum/reagent/toxin/acid/fluacid name = "Fluorosulfuric acid" diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index f87d3682a7c..1b475da801e 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -6,7 +6,7 @@ item_state = "bandaid" possible_transfer_amounts = null volume = 50 - apply_type = TOUCH + apply_type = PATCH apply_method = "apply" /obj/item/weapon/reagent_containers/pill/patch/New() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 73923de0f62..46aef0834e4 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -79,12 +79,12 @@ continue if(puff_reagent_left <= 0) break - D.reagents.reaction(T) + D.reagents.reaction(T, VAPOR) if(ismob(T)) //mobs are obstacles that consume part of the puff, shortening its range. puff_reagent_left -= 1 if(puff_reagent_left > 0) - D.reagents.reaction(get_turf(D)) + D.reagents.reaction(get_turf(D), VAPOR) puff_reagent_left -= 1 if(puff_reagent_left <= 0) // we used all the puff so we delete it. diff --git a/html/changelogs/phil235-VaporizeMethodReaction.yml b/html/changelogs/phil235-VaporizeMethodReaction.yml new file mode 100644 index 00000000000..3f66104303a --- /dev/null +++ b/html/changelogs/phil235-VaporizeMethodReaction.yml @@ -0,0 +1,8 @@ +author: phil235 + +delete-after: True + +changes: + - rscadd: "You can now partially protect yourself from blob attack effects by wearing impermeable clothes like hardsuits, medical clothes, masks, etc. Max protection effect is capped at 50%." + - rscdel: "Splashing someone with chemicals no longer inject those chemicals in their body." + - bugfix: "Fixes splashing acid on items or floor with items not having any effect."