mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 19:41:56 +00:00
* Don't initialize the atom_colours list on atoms until it's actually needed * Moved bloody_hands var to mob/living/carbon/human instead * Added COMSIG_COMPONENT_CLEAN_RADIATION signal to reduce moms spaghetti The shower and suit storage unit now calls this signal instead of either doing it manually or doing it via the washed proc * Cleaned up carbon washing, renamed washed to wash * The wash proc now doesn't take the washer as first arg because that wasn't used anywhere * The wash strength is no longer optional * Carbons now overrides the wash proc instead of using the signal * Properly check for obscuredness before washing any equipped items * Properly wash all items and bloody hands etc * Added clean_lips proc for humans for cleaning any lipstick * Cleaned up washing. Washy stuff now calls wash instead of calling the clean signal directly * Renamed is_cleanable to ismopable, gives this category a more fitting purpose. Many things beyond floor decals are cleanable. It is now also determined using the atom layer instead to make it more generic. * Properly utilize the is_cleanable define * Added wash override for turfs where they also wash any mopables on the same tile * Space cleaner and cleaning element etc now simply washes the mob instead of doing its own manual cleaning on ~some~ equipped items * Non-component washables now simply override wash instead of registering for the clean signal * Fixed some left over clean signal registers not returning true * Added clean_strength var to space cleaner * Moved human wash proc next to the other washing procs * Also wash glasses and mask if not obscured when washing face * Fixed attempting to "scoop up" cleanable decals using a rag * Fixed plasmaman spacehelm icon not updating when washed Also removed a duplicated worn_overlays proc * Fixed head icon not updating when washing lipstick * Moved radioactive clean signal register to where it should be * Added atom radiate VV verb for debugging * Redesigned the CLEAN constants into a more sensible flags setup This makes it more dynamic, cleaning apparatuses can clean more specific than just a cleaning strength. * CLEAN_TYPE_* flags indicate a specific cleanable, such as blood, fingerprints or disease * CLEAN_* consts consist of a combination of cleaning types to make cleaning apparatuses have a consistent behaviour on what they clean * Fixed broken rad removal logic in showers * Apply suggestions from code review Co-authored-by: Rohesie <rohesie@gmail.com> * Removed unneccesary bool from sink code * Fixed wrongly named variable in turf wash * Renamed bloody_hands to blood_in_hands Co-authored-by: Rohesie <rohesie@gmail.com>
103 lines
3.7 KiB
Plaintext
103 lines
3.7 KiB
Plaintext
//CONTAINS: Suit fibers and Detective's Scanning Computer
|
|
|
|
/atom/proc/return_fingerprints()
|
|
var/datum/component/forensics/D = GetComponent(/datum/component/forensics)
|
|
if(D)
|
|
. = D.fingerprints
|
|
|
|
/atom/proc/return_hiddenprints()
|
|
var/datum/component/forensics/D = GetComponent(/datum/component/forensics)
|
|
if(D)
|
|
. = D.hiddenprints
|
|
|
|
/atom/proc/return_blood_DNA()
|
|
var/datum/component/forensics/D = GetComponent(/datum/component/forensics)
|
|
if(D)
|
|
. = D.blood_DNA
|
|
|
|
/atom/proc/blood_DNA_length()
|
|
var/datum/component/forensics/D = GetComponent(/datum/component/forensics)
|
|
if(D)
|
|
. = length(D.blood_DNA)
|
|
|
|
/atom/proc/return_fibers()
|
|
var/datum/component/forensics/D = GetComponent(/datum/component/forensics)
|
|
if(D)
|
|
. = D.fibers
|
|
|
|
/atom/proc/add_fingerprint_list(list/fingerprints) //ASSOC LIST FINGERPRINT = FINGERPRINT
|
|
if(length(fingerprints))
|
|
. = AddComponent(/datum/component/forensics, fingerprints)
|
|
|
|
//Set ignoregloves to add prints irrespective of the mob having gloves on.
|
|
/atom/proc/add_fingerprint(mob/M, ignoregloves = FALSE)
|
|
var/datum/component/forensics/D = AddComponent(/datum/component/forensics)
|
|
. = D.add_fingerprint(M, ignoregloves)
|
|
|
|
/atom/proc/add_fiber_list(list/fibertext) //ASSOC LIST FIBERTEXT = FIBERTEXT
|
|
if(length(fibertext))
|
|
. = AddComponent(/datum/component/forensics, null, null, null, fibertext)
|
|
|
|
/atom/proc/add_fibers(mob/living/carbon/human/M)
|
|
var/old = 0
|
|
if(M.gloves && istype(M.gloves, /obj/item/clothing))
|
|
var/obj/item/clothing/gloves/G = M.gloves
|
|
old = length(G.return_blood_DNA())
|
|
if(G.transfer_blood > 1) //bloodied gloves transfer blood to touched objects
|
|
if(add_blood_DNA(G.return_blood_DNA()) && length(G.return_blood_DNA()) > old) //only reduces the bloodiness of our gloves if the item wasn't already bloody
|
|
G.transfer_blood--
|
|
else if(M.blood_in_hands > 1)
|
|
old = length(M.return_blood_DNA())
|
|
if(add_blood_DNA(M.return_blood_DNA()) && length(M.return_blood_DNA()) > old)
|
|
M.blood_in_hands--
|
|
var/datum/component/forensics/D = AddComponent(/datum/component/forensics)
|
|
. = D.add_fibers(M)
|
|
|
|
/atom/proc/add_hiddenprint_list(list/hiddenprints) //NOTE: THIS IS FOR ADMINISTRATION FINGERPRINTS, YOU MUST CUSTOM SET THIS TO INCLUDE CKEY/REAL NAMES! CHECK FORENSICS.DM
|
|
if(length(hiddenprints))
|
|
. = AddComponent(/datum/component/forensics, null, hiddenprints)
|
|
|
|
/atom/proc/add_hiddenprint(mob/M)
|
|
var/datum/component/forensics/D = AddComponent(/datum/component/forensics)
|
|
. = D.add_hiddenprint(M)
|
|
|
|
/atom/proc/add_blood_DNA(list/dna) //ASSOC LIST DNA = BLOODTYPE
|
|
return FALSE
|
|
|
|
/obj/add_blood_DNA(list/dna)
|
|
. = ..()
|
|
if(length(dna))
|
|
. = AddComponent(/datum/component/forensics, null, null, dna)
|
|
|
|
/obj/item/clothing/gloves/add_blood_DNA(list/blood_dna, list/datum/disease/diseases)
|
|
. = ..()
|
|
transfer_blood = rand(2, 4)
|
|
|
|
/turf/add_blood_DNA(list/blood_dna, list/datum/disease/diseases)
|
|
var/obj/effect/decal/cleanable/blood/splatter/B = locate() in src
|
|
if(!B)
|
|
B = new /obj/effect/decal/cleanable/blood/splatter(src, diseases)
|
|
B.add_blood_DNA(blood_dna) //give blood info to the blood decal.
|
|
return TRUE //we bloodied the floor
|
|
|
|
/mob/living/carbon/human/add_blood_DNA(list/blood_dna, list/datum/disease/diseases)
|
|
if(wear_suit)
|
|
wear_suit.add_blood_DNA(blood_dna)
|
|
update_inv_wear_suit()
|
|
else if(w_uniform)
|
|
w_uniform.add_blood_DNA(blood_dna)
|
|
update_inv_w_uniform()
|
|
if(gloves)
|
|
var/obj/item/clothing/gloves/G = gloves
|
|
G.add_blood_DNA(blood_dna)
|
|
else if(length(blood_dna))
|
|
AddComponent(/datum/component/forensics, null, null, blood_dna)
|
|
blood_in_hands = rand(2, 4)
|
|
update_inv_gloves() //handles bloody hands overlays and updating
|
|
return TRUE
|
|
|
|
/atom/proc/transfer_fingerprints_to(atom/A)
|
|
A.add_fingerprint_list(return_fingerprints())
|
|
A.add_hiddenprint_list(return_hiddenprints())
|
|
A.fingerprintslast = fingerprintslast
|