diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm
index 965ee51502b..8b3e74b96ec 100644
--- a/code/__DEFINES/flags.dm
+++ b/code/__DEFINES/flags.dm
@@ -22,7 +22,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define ON_BORDER_1 512 // item has priority to check when entering or leaving
#define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc
-#define CLEAN_ON_MOVE_1 2048
+#define _UNUSED_1 2048
// BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment.
#define BLOCK_GAS_SMOKE_EFFECT_1 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
diff --git a/code/datums/components/cleaning.dm b/code/datums/components/cleaning.dm
new file mode 100644
index 00000000000..0792fc2373f
--- /dev/null
+++ b/code/datums/components/cleaning.dm
@@ -0,0 +1,36 @@
+/datum/component/cleaning
+
+/datum/component/cleaning/Initialize()
+ RegisterSignal(list(COMSIG_MOVABLE_MOVED), .proc/Clean)
+
+/datum/component/cleaning/proc/Clean()
+ var/atom/movable/AM = parent
+ if(!istype(AM))
+ return
+ var/turf/tile = AM.loc
+ if(isturf(tile))
+ tile.clean_blood()
+ for(var/A in tile)
+ if(is_cleanable(A))
+ qdel(A)
+ else if(istype(A, /obj/item))
+ var/obj/item/cleaned_item = A
+ cleaned_item.clean_blood()
+ else if(ishuman(A))
+ var/mob/living/carbon/human/cleaned_human = A
+ if(cleaned_human.lying)
+ if(cleaned_human.head)
+ cleaned_human.head.clean_blood()
+ cleaned_human.update_inv_head()
+ if(cleaned_human.wear_suit)
+ cleaned_human.wear_suit.clean_blood()
+ cleaned_human.update_inv_wear_suit()
+ else if(cleaned_human.w_uniform)
+ cleaned_human.w_uniform.clean_blood()
+ cleaned_human.update_inv_w_uniform()
+ if(cleaned_human.shoes)
+ cleaned_human.shoes.clean_blood()
+ cleaned_human.update_inv_shoes()
+ cleaned_human.clean_blood()
+ cleaned_human.wash_cream()
+ to_chat(cleaned_human, "[AM] cleans your face!")
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 8c5658d7933..077ed792074 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -132,44 +132,12 @@
if (orbiting)
orbiting.Check()
- if(flags_1 & CLEAN_ON_MOVE_1)
- clean_on_move()
-
var/datum/proximity_monitor/proximity_monitor = src.proximity_monitor
if(proximity_monitor)
proximity_monitor.HandleMove()
return 1
-/atom/movable/proc/clean_on_move()
- var/turf/tile = loc
- if(isturf(tile))
- tile.clean_blood()
- for(var/A in tile)
- if(is_cleanable(A))
- qdel(A)
- else if(istype(A, /obj/item))
- var/obj/item/cleaned_item = A
- cleaned_item.clean_blood()
- else if(ishuman(A))
- var/mob/living/carbon/human/cleaned_human = A
- if(cleaned_human.lying)
- if(cleaned_human.head)
- cleaned_human.head.clean_blood()
- cleaned_human.update_inv_head()
- if(cleaned_human.wear_suit)
- cleaned_human.wear_suit.clean_blood()
- cleaned_human.update_inv_wear_suit()
- else if(cleaned_human.w_uniform)
- cleaned_human.w_uniform.clean_blood()
- cleaned_human.update_inv_w_uniform()
- if(cleaned_human.shoes)
- cleaned_human.shoes.clean_blood()
- cleaned_human.update_inv_shoes()
- cleaned_human.clean_blood()
- cleaned_human.wash_cream()
- to_chat(cleaned_human, "[src] cleans your face!")
-
/atom/movable/Destroy(force)
var/inform_admins = (flags_2 & INFORM_ADMINS_ON_RELOCATE_2)
var/stationloving = (flags_2 & STATIONLOVING_2)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 0a099443ddc..d62d66f335e 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -991,9 +991,9 @@
status_flags &= ~CANPUSH
if(module.clean_on_move)
- flags_1 |= CLEAN_ON_MOVE_1
+ AddComponent(/datum/component/cleaning)
else
- flags_1 &= ~CLEAN_ON_MOVE_1
+ qdel(GetComponent(/datum/component/cleaning))
hat_offset = module.hat_offset
diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm
index 3925b863ff1..c59af1a65b0 100644
--- a/code/modules/vehicles/pimpin_ride.dm
+++ b/code/modules/vehicles/pimpin_ride.dm
@@ -47,7 +47,7 @@
floorbuffer = TRUE
qdel(I)
to_chat(user, "You upgrade [src] with the floor buffer.")
- flags_1 |= CLEAN_ON_MOVE_1
+ AddComponent(/datum/component/cleaning)
update_icon()
else
return ..()
@@ -70,3 +70,7 @@
/obj/vehicle/ridden/janicart/upgraded
floorbuffer = TRUE
+
+/obj/vehicle/ridden/janicart/upgraded/Initialize(mapload)
+ . = ..()
+ AddComponent(/datum/component/cleaning)
diff --git a/tgstation.dme b/tgstation.dme
index ece3ea4ada2..9646c472ce3 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -308,6 +308,7 @@
#include "code\datums\components\archaeology.dm"
#include "code\datums\components\caltrop.dm"
#include "code\datums\components\chasm.dm"
+#include "code\datums\components\cleaning.dm"
#include "code\datums\components\decal.dm"
#include "code\datums\components\infective.dm"
#include "code\datums\components\jousting.dm"