From ee7f71ab64cee85b060e23a825d656fccf6158e8 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Wed, 28 Jan 2015 00:36:22 +0300 Subject: [PATCH] Added update_prints helper It updates forensic data datum with fingerprints and returns 1 if there was a match. --- code/modules/detectivework/forensics.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/detectivework/forensics.dm b/code/modules/detectivework/forensics.dm index 2610a5c24a..bca3090c3f 100644 --- a/code/modules/detectivework/forensics.dm +++ b/code/modules/detectivework/forensics.dm @@ -70,4 +70,12 @@ atom/proc/add_fibers(mob/living/carbon/human/M) fields["blood"] = blood fields["area"] = other.fields["area"] - fields["time"] = other.fields["time"] \ No newline at end of file + fields["time"] = other.fields["time"] + +/datum/data/record/forensic/proc/update_prints(var/list/o_prints) + var/list/prints = fields["fprints"] + for(var/print in o_prints) + if(prints[print]) + prints[print] = stringmerge(prints[print], o_prints[print]) + .=1 + fields["fprints"] = prints