From 4558eaab04e2e35d8b650225535fabd89cda1897 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:18:12 -0700 Subject: [PATCH] [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> --- code/ZAS/Phoron.dm | 4 - code/__defines/cleaning.dm | 24 ++ code/__defines/dcs/signals.dm | 2 - .../signals/signals_datum/signals_datum.dm | 2 + code/__defines/is_helpers.dm | 2 + code/datums/elements/cleaning.dm | 37 +++ code/defines/obj/weapon.dm | 111 --------- code/game/atoms.dm | 44 ++-- .../machinery/suit_storage/suit_cycler.dm | 8 +- .../machinery/suit_storage/suit_storage.dm | 6 +- code/game/machinery/washing_machine.dm | 15 +- .../effects/decals/Cleanable/humans.dm | 4 +- code/game/objects/effects/decals/cleanable.dm | 16 +- code/game/objects/items.dm | 12 +- code/game/objects/items/soap.dm | 217 ++++++++++++++++++ .../game/objects/items/weapons/clown_items.dm | 50 ---- code/game/objects/items/weapons/mop.dm | 4 +- code/game/objects/items/weapons/mop_deploy.dm | 2 +- code/game/objects/objs.dm | 13 ++ code/game/objects/structures/watercloset.dm | 20 +- code/game/turfs/simulated.dm | 5 - code/game/turfs/turf.dm | 32 +-- code/modules/clothing/clothing.dm | 10 +- code/modules/food/food/drinks.dm | 2 +- code/modules/mob/living/bot/cleanbot.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 30 +-- code/modules/mob/living/carbon/human/human.dm | 11 +- .../human/species/station/prometheans.dm | 8 +- .../species/station/traits/positive_ch.dm | 16 +- .../silicon/robot/dogborg/dog_modules.dm | 4 +- .../living/silicon/robot/robot_movement.dm | 14 +- .../simple_mob/subtypes/vore/slug_ch.dm | 9 +- code/modules/reagents/reagents/other.dm | 24 +- code/modules/recycling/disposal_vr.dm | 4 +- code/modules/vore/eating/belly_obj_vr.dm | 2 +- code/modules/vore/eating/contaminate_vr.dm | 18 +- code/modules/vore/eating/digest_act_vr.dm | 2 +- .../game/objects/items/devices/vacpack.dm | 2 +- vorestation.dme | 4 + 39 files changed, 465 insertions(+), 327 deletions(-) create mode 100644 code/__defines/cleaning.dm create mode 100644 code/__defines/dcs/signals/signals_datum/signals_datum.dm create mode 100644 code/datums/elements/cleaning.dm create mode 100644 code/game/objects/items/soap.dm diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index 84ff99e917..d8bc81d474 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -65,10 +65,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi') contaminated = 1 add_overlay(contamination_overlay) -/obj/item/proc/decontaminate() - contaminated = 0 - cut_overlay(contamination_overlay) - /mob/proc/contaminate() /mob/living/carbon/human/contaminate() diff --git a/code/__defines/cleaning.dm b/code/__defines/cleaning.dm new file mode 100644 index 0000000000..5caff28bde --- /dev/null +++ b/code/__defines/cleaning.dm @@ -0,0 +1,24 @@ +// Cleaning flags + +// Different kinds of things that can be cleaned. +// Use these when overriding the wash proc or registering for the clean signals to check if your thing should be cleaned +#define CLEAN_TYPE_BLOOD (1 << 0) +#define CLEAN_TYPE_RUNES (1 << 1) +#define CLEAN_TYPE_FINGERPRINTS (1 << 2) +#define CLEAN_TYPE_BELLY (1 << 3) // Belly contaminants +#define CLEAN_TYPE_FIBERS (1 << 4) +#define CLEAN_TYPE_RADIATION (1 << 5) +#define CLEAN_TYPE_DISEASE (1 << 6) +#define CLEAN_TYPE_WEAK (1 << 7) // Special type, add this flag to make some cleaning processes non-instant. +#define CLEAN_TYPE_PAINT (1 << 8) +/// Cleans decals such as dirt and oil off the floor +#define CLEAN_TYPE_LIGHT_DECAL (1 << 9) +/// Cleans decals such as cobwebs off the floor +#define CLEAN_TYPE_HARD_DECAL (1 << 10) + +// Different cleaning methods. +// Use these when calling the wash proc for your cleaning apparatus +#define CLEAN_WASH (CLEAN_TYPE_BLOOD | CLEAN_TYPE_RUNES | CLEAN_TYPE_DISEASE | CLEAN_TYPE_LIGHT_DECAL | CLEAN_TYPE_BELLY) +#define CLEAN_SCRUB (CLEAN_WASH | CLEAN_TYPE_FINGERPRINTS | CLEAN_TYPE_FIBERS | CLEAN_TYPE_PAINT | CLEAN_TYPE_HARD_DECAL) +#define CLEAN_RAD CLEAN_TYPE_RADIATION +#define CLEAN_ALL (ALL & ~CLEAN_TYPE_WEAK) diff --git a/code/__defines/dcs/signals.dm b/code/__defines/dcs/signals.dm index 7e1dc3c364..54194176d6 100644 --- a/code/__defines/dcs/signals.dm +++ b/code/__defines/dcs/signals.dm @@ -615,8 +615,6 @@ #define COMSIG_TURF_IS_WET "check_turf_wet" ///(max_strength, immediate, duration_decrease = INFINITY): Returns bool. #define COMSIG_TURF_MAKE_DRY "make_turf_try" -///called on an object to clean it of cleanables. Usualy with soap: (num/strength) -#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //Creamed diff --git a/code/__defines/dcs/signals/signals_datum/signals_datum.dm b/code/__defines/dcs/signals/signals_datum/signals_datum.dm new file mode 100644 index 0000000000..0215cb7cc4 --- /dev/null +++ b/code/__defines/dcs/signals/signals_datum/signals_datum.dm @@ -0,0 +1,2 @@ +///Called on an object to "clean it", such as removing blood decals/overlays, etc. The clean types bitfield is sent with it. Return TRUE if any cleaning was necessary and thus performed. +#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" diff --git a/code/__defines/is_helpers.dm b/code/__defines/is_helpers.dm index 98564ed4b4..6e578517ff 100644 --- a/code/__defines/is_helpers.dm +++ b/code/__defines/is_helpers.dm @@ -83,3 +83,5 @@ GLOBAL_VAR_INIT(magic_appearance_detecting_image, new /image) // appearances are /// NaN isn't a number, damn it. Infinity is a problem too. #define isnum_safe(x) ( isnum((x)) && !isnan((x)) && !isinf((x)) ) + +#define ismopable(A) (A && (A.layer <= ABOVE_JUNK_LAYER)) //If something can be cleaned by floor-cleaning devices such as mops or clean bots diff --git a/code/datums/elements/cleaning.dm b/code/datums/elements/cleaning.dm new file mode 100644 index 0000000000..fc49fcd9c5 --- /dev/null +++ b/code/datums/elements/cleaning.dm @@ -0,0 +1,37 @@ +/datum/element/cleaning + +/datum/element/cleaning/Attach(datum/target) + . = ..() + if(!ismovable(target)) + return ELEMENT_INCOMPATIBLE + RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(clean)) + +/datum/element/cleaning/Detach(datum/target) + . = ..() + UnregisterSignal(target, COMSIG_MOVABLE_MOVED) + +/datum/element/cleaning/proc/clean(datum/source) + SIGNAL_HANDLER + + var/atom/movable/AM = source + var/turf/tile = AM.loc + if(!isturf(tile)) + return + + tile.wash(CLEAN_WASH) + + for(var/atom/cleaned as anything in tile) + if(isitem(cleaned)) + var/obj/item/cleaned_item = cleaned + if(cleaned_item.w_class <= ITEMSIZE_SMALL) + cleaned_item.wash(CLEAN_SCRUB) + continue + if(istype(cleaned, /obj/effect/decal/cleanable)) + var/obj/effect/decal/cleanable/cleaned_decal = cleaned + cleaned_decal.wash(CLEAN_SCRUB) + if(!ishuman(cleaned)) + continue + var/mob/living/carbon/human/cleaned_human = cleaned + if(cleaned_human.lying) + cleaned_human.wash(CLEAN_SCRUB) + to_chat(cleaned_human, span_danger("[AM] washes your face!")) diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index d062a66af5..debc27aaf5 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -27,117 +27,6 @@ drop_sound = 'sound/items/drop/device.ogg' pickup_sound = 'sound/items/pickup/device.ogg' -/obj/item/soap - name = "soap" - desc = "A cheap bar of soap. Smells of lye." - gender = PLURAL - icon = 'icons/obj/soap.dmi' - icon_state = "soap" - flags = NOCONDUCT - w_class = ITEMSIZE_SMALL - slot_flags = SLOT_HOLSTER - throwforce = 0 - throw_speed = 4 - throw_range = 20 - var/randomize = TRUE - var/square_chance = 10 - -/obj/item/soap/Initialize(mapload) - if(randomize && prob(square_chance)) - icon_state = "[icon_state]-alt" - . = ..() - -/obj/item/soap/nanotrasen - desc = "A NanoTrasen-brand bar of soap. Smells of phoron, a years-old marketing gimmick." - icon_state = "soapnt" - -/obj/item/soap/deluxe - icon_state = "soapdeluxe" - -/obj/item/soap/deluxe/Initialize(mapload) - . = ..() - desc = "A deluxe Waffle Co. brand bar of soap. Smells of [pick("lavender", "vanilla", "strawberry", "chocolate" ,"space")]." - -/obj/item/soap/syndie - desc = "An untrustworthy bar of soap. Smells of fear." - icon_state = "soapsyndie" - -/obj/item/soap/space_soap - desc = "Smells like hot metal and walnuts." - icon_state = "space_soap" - -/obj/item/soap/water_soap - desc = "Smells like chlorine." - icon_state = "water_soap" - -/obj/item/soap/fire_soap - desc = "Smells like a campfire." - icon_state = "fire_soap" - -/obj/item/soap/rainbow_soap - desc = "Smells sickly sweet." - icon_state = "rainbow_soap" - -/obj/item/soap/diamond_soap - desc = "Smells like saffron and vanilla." - icon_state = "diamond_soap" - -/obj/item/soap/uranium_soap - desc = "Smells not great... Not terrible." - icon_state = "uranium_soap" - -/obj/item/soap/silver_soap - desc = "Smells like birch and amaranth." - icon_state = "silver_soap" - -/obj/item/soap/brown_soap - desc = "Smells like cinnamon and cognac." - icon_state = "brown_soap" - -/obj/item/soap/white_soap - desc = "Smells like nutmeg and oats." - icon_state = "white_soap" - -/obj/item/soap/grey_soap - desc = "Smells like bergamot and lilies." - icon_state = "grey_soap" - -/obj/item/soap/pink_soap - desc = "Smells like bubblegum." - icon_state = "pink_soap" - -/obj/item/soap/purple_soap - desc = "Smells like lavender." - icon_state = "purple_soap" - -/obj/item/soap/blue_soap - desc = "Smells like cardamom." - icon_state = "blue_soap" - -/obj/item/soap/cyan_soap - desc = "Smells like bluebells and peaches." - icon_state = "cyan_soap" - -/obj/item/soap/green_soap - desc = "Smells like a freshly mowed lawn." - icon_state = "green_soap" - -/obj/item/soap/yellow_soap - desc = "Smells like citron and ginger." - icon_state = "yellow_soap" - -/obj/item/soap/orange_soap - desc = "Smells like oranges and dark chocolate." - icon_state = "orange_soap" - -/obj/item/soap/red_soap - desc = "Smells like cherries." - icon_state = "red_soap" - -/obj/item/soap/golden_soap - desc = "Smells like honey." - icon_state = "golden_soap" - /obj/item/bikehorn name = "bike horn" desc = "A horn off of a bicycle." diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 8a41a72f1c..b13a5ef098 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -439,18 +439,8 @@ . = 1 return 1 -/atom/proc/clean_blood() - if(!simulated) - return - fluorescent = 0 - src.germ_level = 0 - if(istype(blood_DNA, /list)) - blood_DNA = null - return TRUE - blood_color = null //chompfixy, cleaning objects saved its future blood color no matter what - /atom/proc/on_rag_wipe(var/obj/item/reagent_containers/glass/rag/R) - clean_blood() + wash(CLEAN_WASH) R.reagents.splash(src, 1) /atom/proc/get_global_map_pos() @@ -773,7 +763,7 @@ GLOBAL_LIST_EMPTY(icon_dimensions) GLOB.icon_dimensions[icon_path] = list("width" = my_icon.Width(), "height" = my_icon.Height()) return GLOB.icon_dimensions[icon_path] -///Returns the src and all recursive contents as a list. +/// Returns the src and all recursive contents as a list. /atom/proc/get_all_contents(ignore_flag_1) . = list(src) var/i = 0 @@ -783,7 +773,7 @@ GLOBAL_LIST_EMPTY(icon_dimensions) continue . += checked_atom.contents -///identical to get_all_contents but returns a list of atoms of the type passed in the argument. +/// Identical to get_all_contents but returns a list of atoms of the type passed in the argument. /atom/proc/get_all_contents_type(type) var/list/processing_list = list(src) . = list() @@ -805,3 +795,31 @@ GLOBAL_LIST_EMPTY(icon_dimensions) /atom/proc/extrapolator_act(mob/living/user, obj/item/extrapolator/extrapolator, dry_run = FALSE) . = list(EXTRAPOLATOR_RESULT_DISEASES = list()) SEND_SIGNAL(src, COMSIG_ATOM_EXTRAPOLATOR_ACT, user, extrapolator, dry_run, .) + +/** +* Wash this atom +* +* This will clean it off any temporary stuff like blood. Override this in your item to add custom cleaning behavior. +* Returns true if any washing was necessary and thus performed +* Arguments: +* clean_types: any of the CLEAN_ constants +*/ +/atom/proc/wash(clean_types) + SHOULD_CALL_PARENT(TRUE) + + . = FALSE + if(SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, clean_types)) + . = TRUE + + // Basically "if has washable coloration" + if(length(atom_colours) >= WASHABLE_COLOUR_PRIORITY && atom_colours[WASHABLE_COLOUR_PRIORITY]) + remove_atom_colour(WASHABLE_COLOUR_PRIORITY) + return TRUE + + if(istype(blood_DNA, /list)) + blood_DNA = null + return TRUE + + blood_color = null // CHOMPEdit - PR this upstream at some point + germ_level = 0 + fluorescent = 0 diff --git a/code/game/machinery/suit_storage/suit_cycler.dm b/code/game/machinery/suit_storage/suit_cycler.dm index 15cd7c5e33..e1fc7533dc 100644 --- a/code/game/machinery/suit_storage/suit_cycler.dm +++ b/code/game/machinery/suit_storage/suit_cycler.dm @@ -430,15 +430,15 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache) if(helmet) if(radiation_level > 2) - helmet.decontaminate() + helmet.wash(CLEAN_TYPE_RADIATION) if(radiation_level > 1) - helmet.clean_blood() + helmet.wash(CLEAN_SCRUB) if(suit) if(radiation_level > 2) - suit.decontaminate() + suit.wash(CLEAN_TYPE_RADIATION) if(radiation_level > 1) - suit.clean_blood() + suit.wash(CLEAN_SCRUB) . = TRUE diff --git a/code/game/machinery/suit_storage/suit_storage.dm b/code/game/machinery/suit_storage/suit_storage.dm index c51176e7c1..1cbf72a107 100644 --- a/code/game/machinery/suit_storage/suit_storage.dm +++ b/code/game/machinery/suit_storage/suit_storage.dm @@ -283,11 +283,11 @@ if(i==3) //End of the cycle if(!issuperUV) if(HELMET) - HELMET.clean_blood() + HELMET.wash(CLEAN_SCRUB) if(SUIT) - SUIT.clean_blood() + SUIT.wash(CLEAN_SCRUB) if(MASK) - MASK.clean_blood() + MASK.wash(CLEAN_SCRUB) else //It was supercycling, destroy everything if(HELMET) HELMET = null diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 256dc07f4b..5b4536e87a 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -58,12 +58,12 @@ update_icon() to_chat(usr, "The washing machine starts a cycle.") playsound(src, 'sound/items/washingmachine.ogg', 50, 1, 1) - sleep(200) - for(var/atom/A in washing) - A.clean_blood() - for(var/obj/item/I in washing) - I.decontaminate() + addtimer(CALLBACK(src, PROC_REF(finish_wash)), 2 SECONDS) + +/obj/machinery/washing_machine/proc/finish_wash() + for(var/atom/A in washing) + A.wash(CLEAN_ALL) //Tanning! for(var/obj/item/stack/hairlesshide/HH in washing) @@ -86,17 +86,14 @@ set category = "Object" set src in usr.loc - sleep(20) - if(state in list(1,3,6)) + if((state in list(1,3,6)) && do_after(usr, 20)) usr.loc = src.loc /obj/machinery/washing_machine/update_icon() - //VOREStation Edit cut_overlays() icon_state = "wm_[state]" if(panel_open) add_overlay("panel") - //VOREStation Edit End /obj/machinery/washing_machine/attackby(obj/item/W as obj, mob/user as mob) if(state == 2 && washing.len < 1) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index e261a2ddaf..7d75dccd06 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -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) . = ..() diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 6d68370eec..bf36067b6d 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -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) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index ceb297cb40..6707470f27 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -713,11 +713,6 @@ var/list/global/slot_flags_enumeration = list( M.eye_blurry += rand(3,4) return -/obj/item/clean_blood() - . = ..() - if(blood_overlay) - overlays.Remove(blood_overlay) - /obj/item/reveal_blood() if(was_bloodied && !fluorescent) fluorescent = 1 @@ -1171,3 +1166,10 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen transform = animation_matrix animate(src, alpha = old_alpha, pixel_x = old_x, pixel_y = old_y, transform = old_transform, time = 3, easing = CUBIC_EASING) + +/obj/item/wash(clean_types) + . = ..() + if(cleanname) + name = cleanname + if(cleandesc) + name = cleandesc diff --git a/code/game/objects/items/soap.dm b/code/game/objects/items/soap.dm new file mode 100644 index 0000000000..454b1a4c4a --- /dev/null +++ b/code/game/objects/items/soap.dm @@ -0,0 +1,217 @@ +/obj/item/soap + name = "soap" + desc = "A cheap bar of soap. Doesn't smell." + gender = PLURAL + icon = 'icons/obj/soap.dmi' + icon_state = "soap" + flags = NOCONDUCT + w_class = ITEMSIZE_SMALL + slot_flags = SLOT_HOLSTER + throwforce = 0 + throw_speed = 4 + throw_range = 20 + + var/randomize = TRUE + var/square_chance = 10 + var/cleanspeed = 35 + var/uses = 100 + +/obj/item/soap/Initialize(mapload) + if(randomize && prob(square_chance)) + icon_state = "[icon_state]-alt" + create_reagents(5) + wet() + . = ..() + +/obj/item/soap/examine(mob/user) + . = ..() + var/max_uses = initial(uses) + var/msg = "It looks like it just came out of the package." + if(uses != max_uses) + var/percentage_left = uses / max_uses + switch(percentage_left) + if(0 to 0.15) + msg = "There's just a tiny bit left of what it used to be, you're not sure it'll last much longer." + if(0.15 to 0.30) + msg = "It's dissolved quite a bit, but there's still some life to it." + if(0.30 to 0.50) + msg = "It's past its prime, but it's definitely still good." + if(0.50 to 0.75) + msg = "It's started to get a little smaller than it used to be, but it'll definitely still last for a while." + else + msg = "It's seen some light use, but it's still pretty fresh." + . += span_notice("[msg]") + +/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_warning("You need to take that [target.name] off before cleaning it.")) + else if(istype(target,/obj/effect/decal/cleanable)) + user.visible_message("[user] begins to scrub \the [target.name] out with [src].", span_warning("You begin to scrub \the [target.name] out with [src]...")) + if(do_after(user, src.cleanspeed, target = target)) + to_chat(user, span_notice("You scrub \the [target.name] out.")) + qdel(target) + decreaseUses(user) + else if(istype(target,/turf)) + user.visible_message("[user] begins to scrub \the [target.name] out with [src].", span_warning("You begin to scrub \the [target.name] out with [src]...")) + if(do_after(user, src.cleanspeed, target = target)) + to_chat(user, span_notice("You scrub \the [target.name] clean.")) + var/turf/T = target + T.wash(CLEAN_SCRUB) + decreaseUses(user) + else if(ishuman(target) && user.zone_sel.selecting == O_MOUTH) + if(target == user) + var/mob/living/carbon/human/H = user + to_chat(user, span_notice("You take a bite of \the [src] and swallow it.")) + reagents.trans_to_holder(H.ingested, 1) + else + user.visible_message(span_danger("\The [user] washes \the [target]'s mouth out with \the [src]!")) + user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) + decreaseUses(user, 5) + else if(istype(target,/obj/structure/sink)) + to_chat(user, span_notice("You wet \the [src] in the sink.")) + wet() + else + user.visible_message("[user] begins to clean \the [target.name] with [src]...", span_notice("You begin to clean \the [target.name] with [src]...")) + if(do_after(user, src.cleanspeed, target = target)) + target.wash(CLEAN_SCRUB) + decreaseUses(user) + return + +/obj/item/soap/proc/decreaseUses(mob/user, var/used_up = 1) + uses -= used_up + if(uses <= 0) + to_chat(user, span_warning("[src] crumbles into tiny bits!")) + qdel(src) + +/obj/item/soap/nanotrasen + name = "Soap (Nanotrasen)" + desc = "A NanoTrasen-brand bar of soap. Smells of phoron, a years-old marketing gimmick." + icon_state = "soapnt" + cleanspeed = 28 + uses = 300 // Good soap, good soap + +/obj/item/soap/deluxe + name = "Soap (Deluxe)" + icon_state = "soapdeluxe" + uses = 150 // Good soap + cleanspeed = 20 // But fast too + +/obj/item/soap/deluxe/Initialize(mapload) + . = ..() + desc = "A deluxe Waffle Co. brand bar of soap. Smells of [pick("lavender", "vanilla", "strawberry", "chocolate" ,"space")]." + +/obj/item/soap/syndie + name = "Soap (Syndicate)" + desc = "An untrustworthy bar of soap. Smells of fear." + icon_state = "soapsyndie" + cleanspeed = 5 // Nyoom soap + +/obj/item/soap/space_soap + name = "Soap (Space)" + desc = "Smells like hot metal and walnuts." + icon_state = "space_soap" + +/obj/item/soap/water_soap + name = "Soap (Pool)" + desc = "Smells like chlorine." + icon_state = "water_soap" + +/obj/item/soap/fire_soap + name = "Soap (Fire)" + desc = "Smells like a campfire." + icon_state = "fire_soap" + +/obj/item/soap/rainbow_soap + name = "Soap (Rainbow)" + desc = "Smells sickly sweet." + icon_state = "rainbow_soap" + +/obj/item/soap/diamond_soap + name = "Soap (Diamond)" + desc = "Smells like saffron and vanilla." + icon_state = "diamond_soap" + +/obj/item/soap/uranium_soap + name = "Soap (Uranium)" + desc = "Smells not great... Not terrible." + icon_state = "uranium_soap" + +/obj/item/soap/silver_soap + name = "Soap (Silver)" + desc = "Smells like birch and amaranth." + icon_state = "silver_soap" + +/obj/item/soap/brown_soap + name = "Soap (Brown)" + desc = "Smells like cinnamon and cognac." + icon_state = "brown_soap" + +/obj/item/soap/white_soap + name = "Soap (Nutty)" + desc = "Smells like nutmeg and oats." + icon_state = "white_soap" + +/obj/item/soap/grey_soap + name = "Soap (Grey)" + desc = "Smells like bergamot and lilies." + icon_state = "grey_soap" + +/obj/item/soap/pink_soap + name = "Soap (Gum)" + desc = "Smells like bubblegum." + icon_state = "pink_soap" + +/obj/item/soap/purple_soap + name = "Soap (Lavender)" + desc = "Smells like lavender." + icon_state = "purple_soap" + +/obj/item/soap/blue_soap + name = "Soap (Blue)" + desc = "Smells like cardamom." + icon_state = "blue_soap" + +/obj/item/soap/cyan_soap + name = "Soap (Berries)" + desc = "Smells like bluebells and peaches." + icon_state = "cyan_soap" + +/obj/item/soap/green_soap + name = "Soap (Grass)" + desc = "Smells like a freshly mowed lawn." + icon_state = "green_soap" + +/obj/item/soap/yellow_soap + name = "Soap (Lemon)" + desc = "Smells like citron and ginger." + icon_state = "yellow_soap" + +/obj/item/soap/orange_soap + name = "Soap (Orange)" + desc = "Smells like oranges and dark chocolate." + icon_state = "orange_soap" + +/obj/item/soap/red_soap + name = "Soap (Orange)" + desc = "Smells like cherries." + icon_state = "red_soap" + +/obj/item/soap/golden_soap + name = "Soap (Honey)" + desc = "Smells like honey." + icon_state = "golden_soap" diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 2eb35ebab4..512ea2f17d 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -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 diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index b3f965c6f7..4ef6feba50 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -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!")) diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm index abd71e725a..d756f7f142 100644 --- a/code/game/objects/items/weapons/mop_deploy.dm +++ b/code/game/objects/items/weapons/mop_deploy.dm @@ -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 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index fb128f097d..2329dae0e1 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -220,3 +220,16 @@ var/shake_dir = pick(-1, 1) animate(src, transform=turn(matrix(), 8*shake_dir), pixel_x=init_px + 2*shake_dir, time=1) animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING) + +/obj/item/wash(clean_types) + . = ..() + if(blood_overlay && clean_types & CLEAN_WASH) + overlays.Remove(blood_overlay) + if(gurgled && clean_types & CLEAN_WASH) + gurgled = FALSE + cut_overlay(gurgled_overlays[gurgled_color]) + name = initial(name) + desc = initial(desc) + if(contaminated && clean_types & CLEAN_RAD) // Phoron and stuff, washing machine needed + contaminated = FALSE + cut_overlay(contamination_overlay) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index f50a8bfc57..c4f76a71b4 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -194,7 +194,7 @@ wash(M) process_heat(M) for (var/atom/movable/G in src.loc) - G.clean_blood(TRUE) + G.wash(CLEAN_SCRUB) else soundloop.stop() @@ -247,7 +247,7 @@ //Yes, showers are super powerful as far as washing goes. -/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob) +/obj/machinery/shower/proc/do_wash(atom/movable/O as obj|mob) if(!on) return if(isliving(O)) @@ -262,7 +262,7 @@ var/remove_amount = M.touching.maximum_volume * M.reagent_permeability() //take off your suit first M.touching.remove_any(remove_amount) - M.clean_blood() + M.wash(CLEAN_SCRUB) reagents.splash(O, 10, min_spill = 0, max_spill = 0) @@ -270,7 +270,7 @@ if(!on) return for(var/atom/movable/AM in loc) if(AM.simulated) - wash(AM) + do_wash(AM) if(isliving(AM)) var/mob/living/L = AM process_heat(L) @@ -282,7 +282,7 @@ return is_washing = 1 var/turf/T = get_turf(src) - T.clean(src) + T.wash(CLEAN_SCRUB) addtimer(VARSET_CALLBACK(src, is_washing, 0), 100, TIMER_DELETE_ME) /obj/machinery/shower/proc/process_heat(mob/living/M) @@ -548,21 +548,21 @@ var/mob/living/carbon/human/H = user H.gunshot_residue = null if(H.gloves) - H.gloves.clean_blood() + H.gloves.wash(CLEAN_SCRUB) H.update_inv_gloves() H.gloves.germ_level = 0 else if(H.r_hand) - H.r_hand.clean_blood() + H.r_hand.wash(CLEAN_SCRUB) if(H.l_hand) - H.l_hand.clean_blood() + H.l_hand.wash(CLEAN_SCRUB) H.bloody_hands = 0 H.germ_level = 0 H.hand_blood_color = null LAZYCLEARLIST(H.blood_DNA) H.update_bloodied() else - user.clean_blood() + user.wash(CLEAN_SCRUB) for(var/mob/V in viewers(src, null)) V.show_message(span_notice("[user] washes their hands using \the [src].")) @@ -623,7 +623,7 @@ return busy = 0 - O.clean_blood() + O.wash(CLEAN_SCRUB) O.water_act(rand(1,10)) user.visible_message( \ span_notice("[user] washes \a [I] using \the [src]."), \ diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 653e2808b6..2c62c4b24c 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -63,11 +63,6 @@ cut_overlay(wet_overlay) wet_overlay = null -/turf/simulated/clean_blood() - for(var/obj/effect/decal/cleanable/blood/B in contents) - B.clean_blood() - ..() - /turf/simulated/Initialize(mapload) . = ..() if(istype(loc, /area/chapel)) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index f64ab37d62..7198a970be 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -341,20 +341,6 @@ return 1 return 0 -//expects an atom containing the reagents used to clean the turf -/turf/proc/clean(atom/source, mob/user) - if(source.reagents.has_reagent(REAGENT_ID_WATER, 1) || source.reagents.has_reagent(REAGENT_ID_CLEANER, 1)) - clean_blood() - if(istype(src, /turf/simulated)) - var/turf/simulated/T = src - T.dirt = 0 - for(var/obj/effect/O in src) - if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay)) - qdel(O) - else - to_chat(user, span_warning("\The [source] is too dry to wash that.")) - source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. - /turf/proc/update_blood_overlays() return @@ -521,3 +507,21 @@ H.ingested.trans_to(V, H.ingested.total_volume / 10) for(var/datum/reagent/R in H.ingested.reagent_list) H.ingested.remove_reagent(R, min(R.volume, 10)) + +/** +* Called when this turf is being washed. Washing a turf will also wash any mopable floor decals +*/ +/turf/wash(clean_types) + . = ..() + + if(istype(src, /turf/simulated)) + var/turf/simulated/T = src + T.dirt = 0 + + for(var/am in src) + if(am == src) + continue + var/atom/movable/movable_content = am + if(!ismopable(movable_content)) + continue + movable_content.wash(clean_types) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 5ecd3437d0..1edad0ce44 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -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() @@ -742,15 +742,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 ..() // CHOMPEdit Begin - tweaking handle_movement for inshoes steppies /obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running, var/mob/living/carbon/human/pred) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index ea54e9ece5..7b6d43509b 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -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()) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index ba5098e192..adb2e45109 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -141,7 +141,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 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index bdc7ff56c2..7b68a3f715 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -440,14 +440,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)) @@ -474,48 +474,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 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ecdfc5b237..a1291ceb72 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 877e7b4cf5..55ce9aed00 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -223,11 +223,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 @@ -245,10 +245,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) diff --git a/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm index f1b7f6bf28..8f04f6e41f 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm @@ -149,33 +149,33 @@ 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_WASH)) H.adjust_nutrition(rand(5, 15)) if (istype(T, /turf/simulated)) var/turf/simulated/S = T - if(T.clean_blood()) + if(T.wash(CLEAN_WASH)) H.adjust_nutrition(rand(10, 20)) if(S.dirt > 50) S.dirt = 0 H.adjust_nutrition(rand(10, 20)) - if(H.clean_blood(1)) + if(H.wash(CLEAN_WASH)) H.adjust_nutrition(rand(5, 15)) if(H.r_hand) - if(H.r_hand.clean_blood()) + if(H.r_hand.wash(CLEAN_WASH)) H.adjust_nutrition(rand(5, 15)) if(H.l_hand) - if(H.l_hand.clean_blood()) + if(H.l_hand.wash(CLEAN_WASH)) H.adjust_nutrition(rand(5, 15)) if(H.head) - if(H.head.clean_blood()) + if(H.head.wash(CLEAN_WASH)) H.update_inv_head(0) H.adjust_nutrition(rand(5, 15)) if(H.wear_suit) - if(H.wear_suit.clean_blood()) + if(H.wear_suit.wash(CLEAN_WASH)) H.update_inv_wear_suit(0) H.adjust_nutrition(rand(5, 15)) if(H.w_uniform) - if(H.w_uniform.clean_blood()) + if(H.w_uniform.wash(CLEAN_WASH)) H.update_inv_w_uniform(0) H.adjust_nutrition(rand(5, 15)) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm index 67f0994a1f..2d003a0359 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm @@ -233,7 +233,7 @@ water.use_charge(5) var/obj/effect/decal/cleanable/C = locate() in target qdel(C) - target.clean_blood() + target.wash(CLEAN_WASH) busy = 0 //CHOMPADD End else if(ishuman(target)) @@ -264,7 +264,7 @@ to_chat(user, span_notice("You clean \the [target.name].")) var/obj/effect/decal/cleanable/C = locate() in target qdel(C) - target.clean_blood() + target.wash(CLEAN_WASH) water.use_charge(5) if(istype(target, /turf/simulated)) var/turf/simulated/T = target diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index d89af7ce49..0616c19b5d 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -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!")) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/slug_ch.dm b/code/modules/mob/living/simple_mob/subtypes/vore/slug_ch.dm index ef492a6558..aaf47435ae 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/slug_ch.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/slug_ch.dm @@ -253,8 +253,9 @@ unbuckle_mob(buckled_mob) unalert_slug(buckled_mob) -/obj/effect/slug_glue/clean_blood(var/ignore = 0) //Remove with space cleaner. - if(!ignore) +/obj/effect/slug_glue/wash(clean_types) // Needs proper scrubbing + . = ..() + if (. || (clean_types & CLEAN_SCRUB)) qdel(src) - return - ..() + return TRUE + return . diff --git a/code/modules/reagents/reagents/other.dm b/code/modules/reagents/reagents/other.dm index 269f30621c..1e7c95a9da 100644 --- a/code/modules/reagents/reagents/other.dm +++ b/code/modules/reagents/reagents/other.dm @@ -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) @@ -477,32 +477,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) diff --git a/code/modules/recycling/disposal_vr.dm b/code/modules/recycling/disposal_vr.dm index aeef97cde7..292fff7fd6 100644 --- a/code/modules/recycling/disposal_vr.dm +++ b/code/modules/recycling/disposal_vr.dm @@ -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) . = ..() diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 9f637cb536..85a21a34ce 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -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() diff --git a/code/modules/vore/eating/contaminate_vr.dm b/code/modules/vore/eating/contaminate_vr.dm index e6deabbbe6..8788fb4061 100644 --- a/code/modules/vore/eating/contaminate_vr.dm +++ b/code/modules/vore/eating/contaminate_vr.dm @@ -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 diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index c6e22a3a66..0ad8d48066 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -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) diff --git a/modular_chomp/code/game/objects/items/devices/vacpack.dm b/modular_chomp/code/game/objects/items/devices/vacpack.dm index 8291ab474b..661b0fd9b8 100644 --- a/modular_chomp/code/game/objects/items/devices/vacpack.dm +++ b/modular_chomp/code/game/objects/items/devices/vacpack.dm @@ -203,7 +203,7 @@ var/obj/belly/B = output_dest B.owner_adjust_nutrition((T.dirt - 50) / 10) //Max tile dirt is 101. so about 5 nutrition from a disgusting floor, I think that's okay. T.dirt = 0 - T.clean_blood() + T.wash(CLEAN_WASH) return if(!isturf(target.loc)) return diff --git a/vorestation.dme b/vorestation.dme index 0511f476eb..6a9acbe6eb 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -55,6 +55,7 @@ #include "code\__defines\chemistry.dm" #include "code\__defines\chemistry_vr.dm" #include "code\__defines\circuitboard.dm" +#include "code\__defines\cleaning.dm" #include "code\__defines\cloning.dm" #include "code\__defines\clothing.dm" #include "code\__defines\color.dm" @@ -197,6 +198,7 @@ #include "code\__defines\dcs\signals\signals_subsystem.dm" #include "code\__defines\dcs\signals\signals_tgui.dm" #include "code\__defines\dcs\signals\signals_turf.dm" +#include "code\__defines\dcs\signals\signals_datum\signals_datum.dm" #include "code\__defines\dcs\signals\signals_mobs\signals_mob_main.dm" #include "code\__defines\traits\_traits.dm" #include "code\__defines\traits\declarations.dm" @@ -601,6 +603,7 @@ #include "code\datums\diseases\advance\symptoms\weight.dm" #include "code\datums\diseases\advance\symptoms\youth.dm" #include "code\datums\elements\_element.dm" +#include "code\datums\elements\cleaning.dm" #include "code\datums\elements\conflict_checking.dm" #include "code\datums\elements\footstep.dm" #include "code\datums\elements\footstep_override.dm" @@ -1443,6 +1446,7 @@ #include "code\game\objects\items\sahoc_ch.dm" #include "code\game\objects\items\selectable_item_vr.dm" #include "code\game\objects\items\shooting_range.dm" +#include "code\game\objects\items\soap.dm" #include "code\game\objects\items\surplus_voucher_ch.dm" #include "code\game\objects\items\tailoring.dm" #include "code\game\objects\items\trash.dm"