From 3abd4708add09e4d415a6a3c0b0d8e6d0352c3f1 Mon Sep 17 00:00:00 2001 From: Bjarl <94164348+Bjarl@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:10:29 -0700 Subject: [PATCH] woahg --- .../effects/effect_system/effects_foam.dm | 25 +++++++++++++-- .../chemistry/reagents/other_reagents.dm | 32 +++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 51020d8f60dc..4fd882aae22b 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -48,13 +48,11 @@ /obj/effect/particle_effect/foam/firefighting/kill_foam() STOP_PROCESSING(SSfastprocess, src) - if(absorbed_plasma) var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src)) if(!P) P = new(loc) P.reagents.add_reagent(/datum/reagent/stable_plasma, absorbed_plasma) - flick("[icon_state]-disolve", src) QDEL_IN(src, 5) @@ -67,6 +65,29 @@ /obj/effect/particle_effect/foam/firefighting/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return + +/obj/effect/particle_effect/foam/antirad + name = "antiradiation foam" + lifetime = 80 + amount = 0 //no spread + slippery_foam = FALSE + +/obj/effect/particle_effect/foam/antirad/process() + ..() + + var/turf/open/T = get_turf(src) + var/obj/effect/radiation/rads = (locate(/obj/effect/radiation) in T) + if(rads && istype(T)) + qdel(rads) + +/obj/effect/particle_effect/foam/antirad/kill_foam() + STOP_PROCESSING(SSfastprocess, src) + flick("[icon_state]-disolve", src) + QDEL_IN(src, 5) + +/obj/effect/particle_effect/foam/antirad/foam_mob(mob/living/L) + for() + /obj/effect/particle_effect/foam/metal name = "aluminium foam" metal = ALUMINIUM_FOAM diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index fdfeeb1cda9c..7db9a85b20d3 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -2530,3 +2530,35 @@ description = "Bacteria native to the Saint-Roumain Militia home planet." color = "#5a4f42" taste_description = "sour" + +//anti rad foam +/datum/reagent/anti_radiation_foam + name = "Anti-Radiation Foam" + description = "A tried and tested foam, used for decontaminating nuclear disasters." + reagent_state = LIQUID + color = "#A6FAFF55" + taste_description = "the inside of a fire extinguisher" + +/datum/reagent/firefighting_foam/expose_turf(turf/open/T, reac_volume) + if (!istype(T)) + return + + if(reac_volume >= 1) + var/obj/effect/particle_effect/foam/antirad/F = (locate(/obj/effect/particle_effect/foam/antirad) in T) + if(!F) + F = new(T) + else if(istype(F)) + F.lifetime = initial(F.lifetime) //reduce object churn a little bit when using smoke by keeping existing foam alive a bit longer + + var/obj/effect/radiation/rads = (locate(/obj/effect/radiation) in T) + if(rads && istype(T)) + qdel(rads) + +/datum/reagent/firefighting_foam/expose_obj(obj/O, reac_volume) + O.wash(CLEAN_RAD) + +/datum/reagent/firefighting_foam/expose_mob(mob/living/M, method=TOUCH, reac_volume) + if(method in list(TOUCH)) + M.radiation = M.radiation - rand(max(M.radiation * 0.95, M.radiation)) //get the hose + M.ExtinguishMob() + ..()