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 1/4] 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()
+ ..()
From ed77dc4988f7918c5fe6dc394926c5e7850d2bec Mon Sep 17 00:00:00 2001
From: Bjarl <94164348+Bjarl@users.noreply.github.com>
Date: Thu, 10 Aug 2023 10:22:30 -0700
Subject: [PATCH 2/4] dubious quality code
---
.../effects/effect_system/effects_foam.dm | 11 ++++---
code/game/objects/items/tanks/watertank.dm | 33 +++++++++++++++++++
code/modules/cargo/packs/tools.dm | 11 +++++++
.../chemistry/reagents/other_reagents.dm | 12 +++----
code/modules/reagents/reagent_dispenser.dm | 4 +++
shiptest.dme | 1 -
6 files changed, 59 insertions(+), 13 deletions(-)
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 4fd882aae22b..7c2a3801caf2 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -71,6 +71,8 @@
lifetime = 80
amount = 0 //no spread
slippery_foam = FALSE
+ color = "#A6FAFF55"
+
/obj/effect/particle_effect/foam/antirad/process()
..()
@@ -78,16 +80,17 @@
var/turf/open/T = get_turf(src)
var/obj/effect/radiation/rads = (locate(/obj/effect/radiation) in T)
if(rads && istype(T))
- qdel(rads)
+ rads.rad_power = rads.rad_power * rand(0.8, 0.95)
+ if (rads.rad_power <= RAD_BACKGROUND_RADIATION)
+ qdel(rads)
+ for(var/obj/things in get_turf(src))
+ things.wash(CLEAN_RAD)
/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/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm
index 50f709dcd65f..23fe0852c353 100644
--- a/code/game/objects/items/tanks/watertank.dm
+++ b/code/game/objects/items/tanks/watertank.dm
@@ -175,6 +175,39 @@
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
to_chat(user, "You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.")
+//radiation cleanup pack
+
+/obj/item/watertank/anti_rad
+ name = "radiation foam pack"
+ desc = "A pressurized backpack tank with sprayer nozzle, intended to clean up radioactive hazards."
+ item_state = "waterbackpackatmos"
+ icon_state = "waterbackpackatmos"
+ volume = 200
+ slowdown = 0.3
+
+/obj/item/watertank/anti_rad/Initialize()
+ . = ..()
+ reagents.add_reagent(/datum/reagent/anti_radiation_foam, 200)
+
+
+/obj/item/reagent_containers/spray/mister/anti_rad
+ name = "spray nozzle"
+ desc = "A heavy duty nozzle attached to a radiation foam tank."
+ icon_state = "atmos_nozzle"
+ item_state = "nozzleatmos"
+ amount_per_transfer_from_this = 5
+ possible_transfer_amounts = list()
+ current_range = 6
+ spray_range = 6
+
+
+/obj/item/watertank/anti_rad/make_noz()
+ return new /obj/item/reagent_containers/spray/mister/anti_rad(src)
+
+/obj/item/reagent_containers/spray/mister/anti_rad/attack_self(mob/user)
+ amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
+ to_chat(user, "You [amount_per_transfer_from_this == 10 ? "tigten" : "loosen"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.")
+
//ATMOS FIRE FIGHTING BACKPACK
#define EXTINGUISHER 0
diff --git a/code/modules/cargo/packs/tools.dm b/code/modules/cargo/packs/tools.dm
index 6b43448a5d81..1b3b8d571a5c 100644
--- a/code/modules/cargo/packs/tools.dm
+++ b/code/modules/cargo/packs/tools.dm
@@ -140,3 +140,14 @@
contains = list(/obj/structure/reagent_dispensers/foamtank)
crate_name = "foam tank crate"
crate_type = /obj/structure/closet/crate/large
+
+/datum/supply_pack/tools/radfoamtank
+ name = "Radiation Foam Tank Crate"
+ desc = "Contains a tank of anti-radiation foam. Pressurized sprayer included!"
+ cost = 1500
+ contains = list(
+ /obj/item/watertank/anti_rad,
+ /obj/structure/reagent_dispensers/foamtank/antirad
+ )
+ crate_name = "foam tank crate"
+ crate_type = /obj/structure/closet/crate/large
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 7db9a85b20d3..2dbeeadad021 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -2539,7 +2539,7 @@
color = "#A6FAFF55"
taste_description = "the inside of a fire extinguisher"
-/datum/reagent/firefighting_foam/expose_turf(turf/open/T, reac_volume)
+/datum/reagent/anti_radiation_foam/expose_turf(turf/open/T, reac_volume)
if (!istype(T))
return
@@ -2548,16 +2548,12 @@
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
+ F.lifetime = initial(F.lifetime) //the foam is what does the cleaning here
- 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)
+/datum/reagent/anti_radiation_foam/expose_obj(obj/O, reac_volume)
O.wash(CLEAN_RAD)
-/datum/reagent/firefighting_foam/expose_mob(mob/living/M, method=TOUCH, reac_volume)
+/datum/reagent/anti_radiation_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()
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index fafd67305c9c..8ee3d2100322 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -58,6 +58,10 @@
reagent_id = /datum/reagent/firefighting_foam
tank_volume = 500
+/obj/structure/reagent_dispensers/foamtank/antirad
+ reagent_id = /datum/reagent/anti_radiation_foam
+ tank_volume = 1000
+
/obj/structure/reagent_dispensers/fueltank
name = "fuel tank"
desc = "A tank full of industrial welding fuel. Do not consume."
diff --git a/shiptest.dme b/shiptest.dme
index 55ad11a800d5..b6fc9860ba42 100644
--- a/shiptest.dme
+++ b/shiptest.dme
@@ -1944,7 +1944,6 @@
#include "code\modules\cargo\packs\gun.dm"
#include "code\modules\cargo\packs\machinery.dm"
#include "code\modules\cargo\packs\material.dm"
-#include "code\modules\cargo\packs\mechs.dm"
#include "code\modules\cargo\packs\medical.dm"
#include "code\modules\cargo\packs\sec_supply.dm"
#include "code\modules\cargo\packs\spacesuit_armor.dm"
From dbed8461dc134a8c76b81956d0a62487e40a55c1 Mon Sep 17 00:00:00 2001
From: Bjarl <94164348+Bjarl@users.noreply.github.com>
Date: Fri, 11 Aug 2023 13:07:00 -0700
Subject: [PATCH 3/4] code improvements from testmerge
---
code/game/objects/effects/decals/cleanable.dm | 5 ++---
.../objects/effects/effect_system/effects_foam.dm | 3 ++-
.../reagents/chemistry/reagents/other_reagents.dm | 11 +++++++++--
code/modules/reagents/reagent_dispenser.dm | 2 ++
4 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm
index 4161403fefd9..141a2426cf0a 100644
--- a/code/game/objects/effects/decals/cleanable.dm
+++ b/code/game/objects/effects/decals/cleanable.dm
@@ -88,9 +88,8 @@
/obj/effect/decal/cleanable/wash(clean_types)
..()
- if(!(flags_1 & INITIALIZED_1))
- return FALSE
- qdel(src)
+ if(clean_types in list(CLEAN_WASH, CLEAN_SCRUB))
+ qdel(src)
return TRUE
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 7c2a3801caf2..5fedeb47e455 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -82,9 +82,10 @@
if(rads && istype(T))
rads.rad_power = rads.rad_power * rand(0.8, 0.95)
if (rads.rad_power <= RAD_BACKGROUND_RADIATION)
+ new /obj/effect/decal/cleanable/greenglow/filled(loc)
qdel(rads)
for(var/obj/things in get_turf(src))
- things.wash(CLEAN_RAD)
+ things.wash(CLEAN_TYPE_RADIATION)
/obj/effect/particle_effect/foam/antirad/kill_foam()
STOP_PROCESSING(SSfastprocess, src)
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 2dbeeadad021..f679df519715 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -2537,7 +2537,7 @@
description = "A tried and tested foam, used for decontaminating nuclear disasters."
reagent_state = LIQUID
color = "#A6FAFF55"
- taste_description = "the inside of a fire extinguisher"
+ taste_description = "bitter, foamy awfulness."
/datum/reagent/anti_radiation_foam/expose_turf(turf/open/T, reac_volume)
if (!istype(T))
@@ -2554,7 +2554,14 @@
O.wash(CLEAN_RAD)
/datum/reagent/anti_radiation_foam/expose_mob(mob/living/M, method=TOUCH, reac_volume)
- if(method in list(TOUCH))
+ if(method in list(TOUCH, VAPOR))
M.radiation = M.radiation - rand(max(M.radiation * 0.95, M.radiation)) //get the hose
M.ExtinguishMob()
..()
+
+
+/datum/reagent/anti_radiation_foam/on_mob_life(mob/living/carbon/M)
+ M.adjustToxLoss(0.5, 200)
+ M.adjust_disgust(4)
+ ..()
+ . = 1
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 8ee3d2100322..54d2fc182398 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -59,6 +59,8 @@
tank_volume = 500
/obj/structure/reagent_dispensers/foamtank/antirad
+ name = "anti-radiation foam tank"
+ desc = "A tank full of decontamination foam"
reagent_id = /datum/reagent/anti_radiation_foam
tank_volume = 1000
From b7af714bdae7666e7f8649efc6368039242131e8 Mon Sep 17 00:00:00 2001
From: Erika Fox <94164348+Bjarl@users.noreply.github.com>
Date: Sun, 15 Sep 2024 19:35:46 -0400
Subject: [PATCH 4/4] they're calling it a "woman" moment
---
code/game/objects/effects/decals/cleanable.dm | 2 ++
shiptest.dme | 1 +
2 files changed, 3 insertions(+)
diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm
index 141a2426cf0a..3ec6f58aa7b1 100644
--- a/code/game/objects/effects/decals/cleanable.dm
+++ b/code/game/objects/effects/decals/cleanable.dm
@@ -88,6 +88,8 @@
/obj/effect/decal/cleanable/wash(clean_types)
..()
+ if(!(flags_1 & INITIALIZED_1))
+ return
if(clean_types in list(CLEAN_WASH, CLEAN_SCRUB))
qdel(src)
return TRUE
diff --git a/shiptest.dme b/shiptest.dme
index af3a52c374b2..3e1776300873 100644
--- a/shiptest.dme
+++ b/shiptest.dme
@@ -1946,6 +1946,7 @@
#include "code\modules\cargo\packs\gun.dm"
#include "code\modules\cargo\packs\machinery.dm"
#include "code\modules\cargo\packs\material.dm"
+#include "code\modules\cargo\packs\mechs.dm"
#include "code\modules\cargo\packs\medical.dm"
#include "code\modules\cargo\packs\sec_supply.dm"
#include "code\modules\cargo\packs\spacesuit_armor.dm"