Files
Yogstation/code/datums/components/cleaning.dm
alexkar598 2333d64f09 Adds support for 513(and unicode), additionally drops supports for 512 in the process and updates dreamchecker(turdis) and casually fixes about 90 bugs in the codebase (#8324)
* Cherry picks the unicode part 2 PR from TG

* Things

* drop 512 support

* TAN --> tan

* Manually does the things that was in renamed files

* CLAMP --> clamp

* ismovableatom -> ismovable

* bugfixes, tg is bad

* Ports sanitize_name

* Bumps checks

* Fixes new linter errors (#48126)

About The Pull Request

This fixes the errors raised by the new feature I'm adding to the linter: SpaceManiac/SpacemanDMM#119

* Update SpacemanDMM suite to 1.2 (#48785)

* Update SpacemanDMM suite to 1.2

* Fix new lint errors

* Removes unreachable code (#48143)

About The Pull Request

As detected by SpaceManiac/SpacemanDMM#123

* casually fixes 50 bugs

* stoopid evil dreamchecker

* stoopid evil dreamchecker

* stoopid evil dreamchecker

* almost the same thing

* Makes all UIs UTF-8

* Fixes bugs

* Fixes runtimes, some related to 513, some not

* Fixes agent ids

Co-authored-by: MrPerson <spamtaffic@gmail.com>
Co-authored-by: alexkar598 <>
Co-authored-by: spookydonut <github@spooksoftware.com>
2020-05-02 00:43:42 -04:00

40 lines
1.5 KiB
Plaintext

/datum/component/cleaning
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
/datum/component/cleaning/Initialize()
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/Clean)
/datum/component/cleaning/proc/Clean()
var/atom/movable/AM = parent
var/turf/tile = AM.loc
if(!isturf(tile))
return
SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
for(var/A in tile)
if(is_cleanable(A))
qdel(A)
else if(istype(A, /obj/item))
var/obj/item/I = A
SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
if(ismob(I.loc))
var/mob/M = I.loc
M.regenerate_icons()
else if(ishuman(A))
var/mob/living/carbon/human/cleaned_human = A
if(!(cleaned_human.mobility_flags & MOBILITY_STAND))
if(cleaned_human.head)
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
if(cleaned_human.wear_suit)
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
else if(cleaned_human.w_uniform)
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
if(cleaned_human.shoes)
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
cleaned_human.wash_cream()
cleaned_human.regenerate_icons()
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")