[READY]Component Forensics and Item Blood OverlayS!
This commit is contained in:
committed by
CitadelStationBot
parent
a034383e15
commit
269208f687
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
//CONTAINS: Suit fibers and Detective's Scanning Computer
|
||||
|
||||
/atom/var/list/suit_fibers
|
||||
@@ -117,3 +118,107 @@
|
||||
if(fingerprintshidden)
|
||||
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
|
||||
A.fingerprintslast = fingerprintslast
|
||||
=======
|
||||
//CONTAINS: Suit fibers and Detective's Scanning Computer
|
||||
|
||||
/atom/proc/return_fingerprints()
|
||||
GET_COMPONENT(D, /datum/component/forensics)
|
||||
if(D)
|
||||
. = D.fingerprints
|
||||
|
||||
/atom/proc/return_hiddenprints()
|
||||
GET_COMPONENT(D, /datum/component/forensics)
|
||||
if(D)
|
||||
. = D.hiddenprints
|
||||
|
||||
/atom/proc/return_blood_DNA()
|
||||
GET_COMPONENT(D, /datum/component/forensics)
|
||||
if(D)
|
||||
. = D.blood_DNA
|
||||
|
||||
/atom/proc/blood_DNA_length()
|
||||
GET_COMPONENT(D, /datum/component/forensics)
|
||||
if(D)
|
||||
. = length(D.blood_DNA)
|
||||
|
||||
/atom/proc/return_fibers()
|
||||
GET_COMPONENT(D, /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/living/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.bloody_hands > 1)
|
||||
old = length(M.return_blood_DNA())
|
||||
if(add_blood_DNA(M.return_blood_DNA()) && length(M.return_blood_DNA()) > old)
|
||||
M.bloody_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/living/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, dna)
|
||||
bloody_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
|
||||
>>>>>>> 9d0e97f... Merge pull request #32311 from kevinz000/component_forensics
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/item/evidencebag/proc/evidencebagEquip(obj/item/I, mob/user)
|
||||
/obj/item/evidencebag/proc/evidencebagEquip(obj/item/I, mob/user)
|
||||
if(!istype(I) || I.anchored == 1)
|
||||
return
|
||||
|
||||
|
||||
@@ -46,6 +46,5 @@
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
|
||||
A.clean_blood()
|
||||
A.wash_cream()
|
||||
A.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
|
||||
@@ -67,20 +67,14 @@
|
||||
|
||||
//Make our lists
|
||||
var/list/fingerprints = list()
|
||||
var/list/blood = list()
|
||||
var/list/fibers = list()
|
||||
var/list/blood = A.return_blood_DNA()
|
||||
var/list/fibers = A.return_fibers()
|
||||
var/list/reagents = list()
|
||||
|
||||
var/target_name = A.name
|
||||
|
||||
// Start gathering
|
||||
|
||||
if(A.blood_DNA && A.blood_DNA.len)
|
||||
blood = A.blood_DNA.Copy()
|
||||
|
||||
if(A.suit_fibers && A.suit_fibers.len)
|
||||
fibers = A.suit_fibers.Copy()
|
||||
|
||||
if(ishuman(A))
|
||||
|
||||
var/mob/living/carbon/human/H = A
|
||||
@@ -89,8 +83,7 @@
|
||||
|
||||
else if(!ismob(A))
|
||||
|
||||
if(A.fingerprints && A.fingerprints.len)
|
||||
fingerprints = A.fingerprints.Copy()
|
||||
fingerprints = A.return_fingerprints()
|
||||
|
||||
// Only get reagents from non-mobs.
|
||||
if(A.reagents && A.reagents.reagent_list.len)
|
||||
@@ -104,6 +97,7 @@
|
||||
if(R.data["blood_DNA"] && R.data["blood_type"])
|
||||
var/blood_DNA = R.data["blood_DNA"]
|
||||
var/blood_type = R.data["blood_type"]
|
||||
LAZYINITLIST(blood)
|
||||
blood[blood_DNA] = blood_type
|
||||
|
||||
// We gathered everything. Create a fork and slowly display the results to the holder of the scanner.
|
||||
@@ -112,7 +106,7 @@
|
||||
add_log("<B>[worldtime2text()][get_timestamp()] - [target_name]</B>", 0)
|
||||
|
||||
// Fingerprints
|
||||
if(fingerprints && fingerprints.len)
|
||||
if(length(fingerprints))
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Prints:</B></span>")
|
||||
for(var/finger in fingerprints)
|
||||
@@ -120,7 +114,7 @@
|
||||
found_something = 1
|
||||
|
||||
// Blood
|
||||
if (blood && blood.len)
|
||||
if (length(blood))
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Blood:</B></span>")
|
||||
found_something = 1
|
||||
@@ -128,7 +122,7 @@
|
||||
add_log("Type: <font color='red'>[blood[B]]</font> DNA: <font color='red'>[B]</font>")
|
||||
|
||||
//Fibers
|
||||
if(fibers && fibers.len)
|
||||
if(length(fibers))
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Fibers:</B></span>")
|
||||
for(var/fiber in fibers)
|
||||
@@ -136,7 +130,7 @@
|
||||
found_something = 1
|
||||
|
||||
//Reagents
|
||||
if(reagents && reagents.len)
|
||||
if(length(reagents))
|
||||
sleep(30)
|
||||
add_log("<span class='info'><B>Reagents:</B></span>")
|
||||
for(var/R in reagents)
|
||||
|
||||
Reference in New Issue
Block a user