mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 17:44:25 +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:
@@ -33,7 +33,7 @@
|
||||
return
|
||||
|
||||
// Aurora forensics port.
|
||||
/obj/item/clothing/clean_blood()
|
||||
/obj/item/clothing/wash()
|
||||
. = ..()
|
||||
gunshot_residue = null
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/item/clothing/gloves/clean_blood()
|
||||
/obj/item/clothing/gloves/wash()
|
||||
. = ..()
|
||||
transfer_blood = 0
|
||||
update_icon()
|
||||
@@ -734,15 +734,15 @@
|
||||
if(contaminated)
|
||||
add_overlay(contamination_overlay)
|
||||
if(gurgled) //VOREStation Edit Start
|
||||
decontaminate()
|
||||
wash(CLEAN_ALL)
|
||||
gurgle_contaminate() //VOREStation Edit End
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
M.update_inv_shoes()
|
||||
|
||||
/obj/item/clothing/shoes/clean_blood()
|
||||
/obj/item/clothing/shoes/wash()
|
||||
. = ..()
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running)
|
||||
if(prob(1) && !recent_squish) //VOREStation edit begin
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/on_rag_wipe(var/obj/item/reagent_containers/glass/rag/R)
|
||||
clean_blood()
|
||||
wash(CLEAN_SCRUB)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/attack_self(mob/user as mob)
|
||||
if(!is_open_container())
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!"))
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
..()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.clean_blood(TRUE)
|
||||
C.wash(CLEAN_SCRUB)
|
||||
|
||||
if(istype(M, /mob/living/simple_mob/vore/aggressive/macrophage)) // Big ouch for viruses
|
||||
var/mob/living/simple_mob/macrophage = M
|
||||
@@ -454,7 +454,7 @@
|
||||
|
||||
/datum/reagent/space_cleaner/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.clean_blood()
|
||||
O.wash(CLEAN_SCRUB)
|
||||
|
||||
/datum/reagent/space_cleaner/touch_turf(var/turf/T)
|
||||
..()
|
||||
@@ -462,7 +462,7 @@
|
||||
if(istype(T, /turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
S.dirt = 0
|
||||
T.clean_blood()
|
||||
T.wash(CLEAN_SCRUB)
|
||||
for(var/obj/effect/O in T)
|
||||
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
|
||||
qdel(O)
|
||||
@@ -475,32 +475,32 @@
|
||||
|
||||
/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(M.r_hand)
|
||||
M.r_hand.clean_blood()
|
||||
M.r_hand.wash(CLEAN_SCRUB)
|
||||
if(M.l_hand)
|
||||
M.l_hand.clean_blood()
|
||||
M.l_hand.wash(CLEAN_SCRUB)
|
||||
if(M.wear_mask)
|
||||
if(M.wear_mask.clean_blood())
|
||||
if(M.wear_mask.wash(CLEAN_SCRUB))
|
||||
M.update_inv_wear_mask(0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(alien == IS_SLIME)
|
||||
M.adjustToxLoss(rand(5, 10))
|
||||
if(H.head)
|
||||
if(H.head.clean_blood())
|
||||
if(H.head.wash(CLEAN_SCRUB))
|
||||
H.update_inv_head(0)
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.clean_blood())
|
||||
if(H.wear_suit.wash(CLEAN_SCRUB))
|
||||
H.update_inv_wear_suit(0)
|
||||
else if(H.w_uniform)
|
||||
if(H.w_uniform.clean_blood())
|
||||
if(H.w_uniform.wash(CLEAN_SCRUB))
|
||||
H.update_inv_w_uniform(0)
|
||||
if(H.shoes)
|
||||
if(H.shoes.clean_blood())
|
||||
if(H.shoes.wash(CLEAN_SCRUB))
|
||||
H.update_inv_shoes(0)
|
||||
else
|
||||
H.clean_blood(1)
|
||||
H.wash(CLEAN_SCRUB)
|
||||
return
|
||||
M.clean_blood()
|
||||
M.wash(CLEAN_SCRUB)
|
||||
|
||||
/datum/reagent/space_cleaner/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_SLIME)
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
var/list/storage_items = i.return_inv()
|
||||
|
||||
for(var/obj/item/item in storage_items)
|
||||
item.decontaminate()
|
||||
item.wash(CLEAN_WASH)
|
||||
|
||||
for(var/obj/item/i in src)
|
||||
if(istype(i, /obj/item))
|
||||
i.decontaminate()
|
||||
i.wash(CLEAN_WASH)
|
||||
. = ..()
|
||||
|
||||
@@ -1490,7 +1490,7 @@
|
||||
if(istype(I,/obj/item/card/id))
|
||||
I.gurgle_contaminate(target.contents, target.contamination_flavor, target.contamination_color)
|
||||
if(I.gurgled && target.contaminates)
|
||||
I.decontaminate()
|
||||
I.wash(CLEAN_WASH)
|
||||
I.gurgle_contaminate(target.contents, target.contamination_flavor, target.contamination_color)
|
||||
items_preserved -= content
|
||||
owner.updateVRPanel()
|
||||
|
||||
@@ -28,7 +28,7 @@ var/list/gurgled_overlays = list(
|
||||
return FALSE
|
||||
|
||||
if(gurgled && !(gurgled_color == contamination_color))
|
||||
decontaminate()
|
||||
wash(CLEAN_WASH)
|
||||
|
||||
if(!gurgled)
|
||||
gurgled = TRUE
|
||||
@@ -53,27 +53,13 @@ var/list/gurgled_overlays = list(
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/item/decontaminate() //Decontaminate the sogginess as well.
|
||||
..()
|
||||
gurgled = FALSE
|
||||
cut_overlay(gurgled_overlays[gurgled_color])
|
||||
if(cleanname)
|
||||
name = cleanname
|
||||
if(cleandesc)
|
||||
desc = cleandesc
|
||||
|
||||
/obj/item/clean_blood() //Make this type of contamination sink washable as well.
|
||||
..()
|
||||
if(gurgled)
|
||||
decontaminate()
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/I, mob/user) //Wash the soggy item before it can interact with the sink.
|
||||
if(istype(I) && I.gurgled)
|
||||
to_chat(user, span_notice("You start washing [I]."))
|
||||
|
||||
busy = TRUE
|
||||
if(do_after(user, 40, src))
|
||||
I.clean_blood()
|
||||
I.wash(CLEAN_SCRUB)
|
||||
user.visible_message(span_notice("[user] washes [I] using [src]."),
|
||||
span_notice("You wash [I] using [src]."))
|
||||
busy = FALSE
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(!oldname)
|
||||
oldname = cleanname ? cleanname : name
|
||||
cleanname = "[d_stage_name] [oldname]"
|
||||
decontaminate()
|
||||
wash(CLEAN_ALL)
|
||||
if(istype(B))
|
||||
gurgled_color = B.contamination_color //Apply the correct color setting so uncontaminable things can still have the right overlay.
|
||||
gurgle_contaminate(B, B.contamination_flavor, B.contamination_color)
|
||||
|
||||
Reference in New Issue
Block a user