mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Standardize cleaning object behavior into "cleaning_act" proc (#19001)
* Standardizes cleaning item functionality into "cleaning_act" proc * Culling commented-out code * Damp rag now checks for humans before cleaning * Change proc scoping, moved mop reagent check out of cleaning.dm * Adds can_clean and post_clean procs to handle mopping, removes ismop parameter * Adds can_clean() to cleaning objects/mobs * cleaning_act() now carries message strings as params * Refactored cleaning_act() for earlier returns and less redundancy * cleaning_act now runs on the target atom, instead of the cleaning object * Changed turf checks to overrides, rescoped clean_turf, lots of tidying * Removed cleaner param from post_clean, since it'll always be src * Code review tidying * Tidying.......... * Removed clean_turf and put its functionality in turf/simulated/cleaning_act(), added new param to keep track of original targeted object * Moved cleaning.dm from datums to code/game/objects * Added early return, defined cleanspeed in seconds
This commit is contained in:
@@ -151,14 +151,16 @@
|
||||
icon_state = "maid"
|
||||
icon_living = "maid"
|
||||
icon_dead = "maid_dead"
|
||||
var/cleanspeed = 15
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/maid/AttackingTarget()
|
||||
if(ismovable(target))
|
||||
if(istype(target, /obj/effect/decal/cleanable))
|
||||
visible_message("<span class='notice'>\The [src] cleans up \the [target].</span>")
|
||||
qdel(target)
|
||||
return TRUE
|
||||
var/atom/movable/M = target
|
||||
M.clean_blood()
|
||||
if(ishuman(target))
|
||||
var/atom/movable/H = target
|
||||
H.clean_blood()
|
||||
visible_message("<span class='notice'>\The [src] polishes \the [target].</span>")
|
||||
return TRUE
|
||||
target.cleaning_act(src, src, cleanspeed, text_description = ".") //LXM is both the user and the cleaning implement itself. Wow!
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/maid/can_clean()
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user