[MIRROR] Soap & clean proc refactor (#10989)

Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-06-02 19:18:12 +02:00
committed by GitHub
co-authored by Guti Kashargul
parent 6badc27205
commit 4558eaab04
39 changed files with 465 additions and 327 deletions
@@ -31,12 +31,12 @@ var/global/list/image/splatter_cache=list()
basecolor = COLOR_LUMINOL
update_icon()
/obj/effect/decal/cleanable/blood/clean_blood()
/obj/effect/decal/cleanable/blood/wash(clean_types)
. = ..()
fluorescent = 0
if(invisibility != INVISIBILITY_MAXIMUM)
invisibility = INVISIBILITY_MAXIMUM
amount = 0
..(ignore=1)
/obj/effect/decal/cleanable/blood/Initialize(mapload)
. = ..()
+10 -6
View File
@@ -13,6 +13,9 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
var/age = 0
var/list/random_icon_states = list()
///The type of cleaning required to clean the decal, CLEAN_TYPE_LIGHT_DECAL can be cleaned with mops and soap, CLEAN_TYPE_HARD_DECAL can be cleaned by soap, see __DEFINES/cleaning.dm for the others
var/clean_type = CLEAN_TYPE_LIGHT_DECAL
/obj/effect/decal/cleanable/Initialize(mapload, var/_age)
if(!isnull(_age))
age = _age
@@ -23,16 +26,17 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
. = ..()
update_icon()
/obj/effect/decal/cleanable/wash(clean_types)
. = ..()
if (. || (clean_types & clean_type))
qdel(src)
return TRUE
return .
/obj/effect/decal/cleanable/Destroy()
SSpersistence.forget_value(src, /datum/persistent/filth)
. = ..()
/obj/effect/decal/cleanable/clean_blood(var/ignore = 0)
if(!ignore)
qdel(src)
return
..()
/obj/effect/decal/cleanable/Initialize(mapload, _age)
. = ..()
if (random_icon_states && length(random_icon_states) > 0)