Replaces CLEAN_ON_MOVE_1 flag with cleaning component

CLEAN_ON_MOVE_1 is a flag checked on every atom movable's Moved() and
triggers a janiborg/upgraded janicart clean on the turf if present.

Replacing this with a component does the same thing and frees up a flag
slot.

Also fixes a bug where a spawned in "upgraded" janicart wouldn't
actually clean the floors.
This commit is contained in:
Jack Edge
2017-12-23 14:12:33 +00:00
parent 6f2e27f7ee
commit 04a4a7e76b
6 changed files with 45 additions and 36 deletions
+5 -1
View File
@@ -47,7 +47,7 @@
floorbuffer = TRUE
qdel(I)
to_chat(user, "<span class='notice'>You upgrade [src] with the floor buffer.</span>")
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)