Skip to content

Commit

Permalink
code improvements from testmerge
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Sep 8, 2024
1 parent ed77dc4 commit dbed846
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
5 changes: 2 additions & 3 deletions code/game/objects/effects/decals/cleanable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/effects/effect_system/effects_foam.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 9 additions & 2 deletions code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
2 changes: 2 additions & 0 deletions code/modules/reagents/reagent_dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit dbed846

Please sign in to comment.