mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
Soap & clean proc refactor (#17744)
* Automatic changelog compile [ci skip] * soap * Washy wash * Big wash * washy * Update soap.dm * washiest * . * . * Washes the linter * scrubs the linter * washes indentation * . * updaet --------- Co-authored-by: vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com> Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com>
ShadowLarkens
Cameron Lennox
parent
5961096074
commit
9eb876de72
@@ -14,56 +14,6 @@
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the [src.name]",4)
|
||||
/*
|
||||
* Soap
|
||||
*/
|
||||
/obj/item/soap/Initialize(mapload)
|
||||
. = ..()
|
||||
create_reagents(5)
|
||||
wet()
|
||||
|
||||
/obj/item/soap/proc/wet()
|
||||
reagents.add_reagent(REAGENT_ID_CLEANER, 5)
|
||||
|
||||
/obj/item/soap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the [src.name]",3)
|
||||
|
||||
/obj/item/soap/afterattack(atom/target, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
to_chat(user, span_notice("You need to take that [target.name] off before cleaning it."))
|
||||
else if(istype(target,/obj/effect/decal/cleanable/blood))
|
||||
to_chat(user, span_notice("You scrub \the [target.name] out."))
|
||||
target.clean_blood()
|
||||
return //Blood is a cleanable decal, therefore needs to be accounted for before all cleanable decals.
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
to_chat(user, span_notice("You scrub \the [target.name] out."))
|
||||
qdel(target)
|
||||
else if(istype(target,/turf))
|
||||
to_chat(user, span_notice("You scrub \the [target.name] clean."))
|
||||
var/turf/T = target
|
||||
T.clean(src, user)
|
||||
else if(istype(target,/obj/structure/sink))
|
||||
to_chat(user, span_notice("You wet \the [src] in the sink."))
|
||||
wet()
|
||||
else
|
||||
to_chat(user, span_notice("You clean \the [target.name]."))
|
||||
target.clean_blood(TRUE)
|
||||
return
|
||||
|
||||
//attack_as_weapon
|
||||
/obj/item/soap/attack(mob/living/target, mob/living/user, var/target_zone)
|
||||
if(target && user && ishuman(target) && ishuman(user) && !user.incapacitated() && user.zone_sel &&user.zone_sel.selecting == "mouth" )
|
||||
user.visible_message(span_danger("\The [user] washes \the [target]'s mouth out with soap!"))
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //prevent spam
|
||||
return
|
||||
..()
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
|
||||
@@ -34,7 +34,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
|
||||
if(do_after(user, 40))
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
T.clean(src, user)
|
||||
T.wash(CLEAN_SCRUB)
|
||||
to_chat(user, span_notice("You have finished mopping!"))
|
||||
|
||||
|
||||
@@ -75,5 +75,5 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop)
|
||||
if(do_after(user, 20))
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
T.clean(src, user)
|
||||
T.wash(CLEAN_SCRUB)
|
||||
to_chat(user, span_notice("You have finished mopping!"))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/turf/proc/clean_deploy(atom/source)
|
||||
if(source.reagents.has_reagent(REAGENT_ID_WATER, 1))
|
||||
clean_blood()
|
||||
wash(CLEAN_SCRUB)
|
||||
if(istype(src, /turf/simulated))
|
||||
var/turf/simulated/T = src
|
||||
T.dirt = 0
|
||||
|
||||
Reference in New Issue
Block a user