Skip to content

Commit

Permalink
Code review?
Browse files Browse the repository at this point in the history
  • Loading branch information
coiax committed Dec 23, 2017
1 parent d16794c commit 5811fba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/datums/components/cleaning.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/datum/component/cleaning

/datum/component/cleaning/Initialize()
if(!ismovable(parent))
if(!ismovableatom(parent))
. = COMPONENT_INCOMPATIBLE
CRASH("[type] added to a [parent.type]")
RegisterSignal(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
Expand Down

0 comments on commit 5811fba

Please sign in to comment.