From d4402f2ebb33d09e14c27928c16a051e86dfd45e Mon Sep 17 00:00:00 2001 From: Dragonkiller93 <82484852+Dragonkiller93@users.noreply.github.com> Date: Tue, 8 Jun 2021 07:04:28 -0700 Subject: [PATCH] Cleaner no longer resets Light Tiles. (#16070) * Cleaner no longer resets Light Tiles. * Update code/modules/reagents/chemistry/reagents/water.dm Spacing Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Creates a Clean proc, overrides it for light tile * Forgot to fix this when copy pasting. * Update code/game/turfs/turf.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * Update code/game/turfs/simulated/floor/light_floor.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * Update code/game/turfs/turf.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * Updates other files to match proc name * Calls parent function instead of duplicating code. * Update code/modules/reagents/chemistry/reagents/water.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> --- code/game/turfs/simulated/floor/light_floor.dm | 5 +++++ code/game/turfs/turf.dm | 14 ++++++++++++++ code/modules/reagents/chemistry/reagents/water.dm | 15 +-------------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index 6264fb366ab..4c4e3e44a15 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -80,3 +80,8 @@ /turf/simulated/floor/light/extinguish_light() toggle_light(FALSE) visible_message("[src] flickers and falls dark.") + +/turf/simulated/floor/light/clean(floor_only) + var/color_save = color + ..() + color = color_save diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index ab88201e9bf..938e2f8a851 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -330,6 +330,20 @@ /turf/proc/Bless() flags |= NOJAUNT +/turf/proc/clean(floor_only) + for(var/obj/effect/decal/cleanable/C in src) + var/obj/effect/decal/cleanable/blood/B = C + if(istype(B) && B.off_floor) + floor_only = FALSE + else + qdel(C) + color = initial(color) + if(floor_only) + clean_blood() + + for(var/mob/living/simple_animal/slime/M in src) + M.adjustToxLoss(rand(5, 10)) + // Defined here to avoid runtimes /turf/proc/MakeDry(wet_setting = TURF_WET_WATER) return diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 6be18db54a5..8084a990e3c 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -67,20 +67,7 @@ O.clean_blood() /datum/reagent/space_cleaner/reaction_turf(turf/T, volume) - if(volume >= 1) - var/floor_only = TRUE - for(var/obj/effect/decal/cleanable/C in T) - var/obj/effect/decal/cleanable/blood/B = C - if(istype(B) && B.off_floor) - floor_only = FALSE - else - qdel(C) - T.color = initial(T.color) - if(floor_only) - T.clean_blood() - - for(var/mob/living/simple_animal/slime/M in T) - M.adjustToxLoss(rand(5, 10)) + T.clean(volume >= 1) /datum/reagent/space_cleaner/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) M.clean_blood()