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:
Guti
2025-05-31 19:31:15 +02:00
committed by GitHub
parent 5961096074
commit 9eb876de72
35 changed files with 448 additions and 311 deletions
+1 -1
View File
@@ -140,7 +140,7 @@
automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [loc]")
if(do_after(src, cleantime * cTimeMult))
if(blood)
clean_blood()
wash(CLEAN_TYPE_BLOOD)
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
T.dirt = 0
+15 -15
View File
@@ -433,14 +433,14 @@
update_inv_handcuffed()
// Clears blood overlays
/mob/living/carbon/clean_blood()
/mob/living/carbon/wash(clean_types)
. = ..()
if(src.r_hand)
src.r_hand.clean_blood()
src.r_hand.wash(clean_types)
if(src.l_hand)
src.l_hand.clean_blood()
src.l_hand.wash(clean_types)
if(src.back)
if(src.back.clean_blood())
if(src.back.wash(clean_types))
src.update_inv_back(0)
if(ishuman(src))
@@ -467,48 +467,48 @@
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
if(H.head)
if(H.head.clean_blood())
if(H.head.wash(clean_types))
H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
if(H.wear_suit.wash(clean_types))
H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
if(H.w_uniform.wash(clean_types))
H.update_inv_w_uniform()
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
if(H.gloves.wash(clean_types))
H.update_inv_gloves(0)
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
if(H.shoes.wash(clean_types))
H.update_inv_shoes(0)
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
if(H.wear_mask.wash(clean_types))
H.update_inv_wear_mask(0)
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
if(H.glasses.wash(clean_types))
H.update_inv_glasses(0)
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
if(H.l_ear.wash(clean_types))
H.update_inv_ears(0)
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
if(H.r_ear.wash(clean_types))
H.update_inv_ears(0)
if(H.belt)
if(H.belt.clean_blood())
if(H.belt.wash(clean_types))
H.update_inv_belt(0)
else
if(src.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(src.wear_mask.clean_blood())
if(src.wear_mask.wash(clean_types))
src.update_inv_wear_mask(0)
/mob/living/carbon/proc/food_preference(var/allergen_type) //RS edit
@@ -1149,26 +1149,25 @@
return
return md5(dna.uni_identity)
/mob/living/carbon/human/clean_blood(var/washshoes)
/mob/living/carbon/human/wash(clean_types)
. = ..()
gunshot_residue = null
//Always do hands (or whatever's on our hands)
if(gloves)
gloves.clean_blood()
gloves.wash(clean_types)
update_inv_gloves()
gloves.germ_level = 0
else
bloody_hands = 0
germ_level = 0
//Sometimes do shoes if asked (or feet if no shoes)
if(washshoes && shoes)
shoes.clean_blood()
if(shoes)
shoes.wash(clean_types)
update_inv_shoes()
shoes.germ_level = 0
else if(washshoes && (feet_blood_color || LAZYLEN(feet_blood_DNA)))
else if(feet_blood_color || LAZYLEN(feet_blood_DNA))
LAZYCLEARLIST(feet_blood_DNA)
feet_blood_DNA = null
feet_blood_color = null
@@ -224,11 +224,11 @@ var/datum/species/shapeshifter/promethean/prometheans
if(istype(T))
if(!(H.shoes || (H.wear_suit && (H.wear_suit.body_parts_covered & FEET))))
for(var/obj/O in T)
if(O.clean_blood())
if(O.wash(CLEAN_SCRUB))
H.adjust_nutrition(rand(5, 15))
if (istype(T, /turf/simulated))
var/turf/simulated/S = T
if(T.clean_blood())
if(T.wash(CLEAN_SCRUB))
H.adjust_nutrition(rand(10, 20))
if(S.dirt > 50)
S.dirt = 0
@@ -246,10 +246,10 @@ var/datum/species/shapeshifter/promethean/prometheans
H.adjust_nutrition(rand(3, 10))
if(!(H.gloves || (H.wear_suit && (H.wear_suit.body_parts_covered & HANDS))))
if(H.r_hand)
if(H.r_hand.clean_blood())
if(H.r_hand.wash(CLEAN_SCRUB))
H.adjust_nutrition(rand(5, 15))
if(H.l_hand)
if(H.l_hand.clean_blood())
if(H.l_hand.wash(CLEAN_SCRUB))
H.adjust_nutrition(rand(5, 15))
/*
if(H.head)
@@ -61,7 +61,7 @@
if(scrubbing && isturf(loc))
var/turf/tile = loc
tile.clean_blood()
tile.wash(CLEAN_SCRUB)
if (istype(tile, /turf/simulated))
var/turf/simulated/S = tile
S.dirt = 0
@@ -71,21 +71,21 @@
qdel(A)
else if(istype(A, /obj/item))
var/obj/item/cleaned_item = A
cleaned_item.clean_blood()
cleaned_item.wash(CLEAN_SCRUB)
else if(ishuman(A))
var/mob/living/carbon/human/cleaned_human = A
if(cleaned_human.lying)
if(cleaned_human.head)
cleaned_human.head.clean_blood()
cleaned_human.head.wash(CLEAN_SCRUB)
cleaned_human.update_inv_head(0)
if(cleaned_human.wear_suit)
cleaned_human.wear_suit.clean_blood()
cleaned_human.wear_suit.wash(CLEAN_SCRUB)
cleaned_human.update_inv_wear_suit(0)
else if(cleaned_human.w_uniform)
cleaned_human.w_uniform.clean_blood()
cleaned_human.w_uniform.wash(CLEAN_SCRUB)
cleaned_human.update_inv_w_uniform(0)
if(cleaned_human.shoes)
cleaned_human.shoes.clean_blood()
cleaned_human.shoes.wash(CLEAN_SCRUB)
cleaned_human.update_inv_shoes(0)
cleaned_human.clean_blood(1)
cleaned_human.wash(CLEAN_SCRUB)
to_chat(cleaned_human, span_warning("[src] cleans your face!"))