Skip to content

Commit

Permalink
woahg
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Sep 8, 2024
1 parent 573586d commit 3abd470
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
25 changes: 23 additions & 2 deletions code/game/objects/effects/effect_system/effects_foam.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
32 changes: 32 additions & 0 deletions code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
..()

0 comments on commit 3abd470

Please sign in to comment.