From bdbee287aa977e847720e806dc82743afda6425f Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Wed, 28 Nov 2012 22:23:54 +0000 Subject: [PATCH] Improved the scanner report, which scanners print out. http://i.imgur.com/aMUUl.png git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5221 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/detectivework/scanner.dm | 70 ++++++++++++++++----------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm index 513c93dff25..0df8e5ffee1 100644 --- a/code/modules/detectivework/scanner.dm +++ b/code/modules/detectivework/scanner.dm @@ -18,8 +18,10 @@ user << "Printing report, please wait..." spawn(100) var/obj/item/weapon/paper/P = new(get_turf(src)) - P.info = "
Scanner Report


" + P.name = "paper- 'Scanner Report'" + P.info = "
Scanner Report


" P.info += dd_list2text(log, "
") + P.info += "
Notes:
" P.info_links = P.info user.put_in_hands(P) @@ -35,31 +37,42 @@ if(!scanning) scanning = 1 spawn(0) - add_log(user, "Scanning [M]...") - if (!ishuman(M)) - add_log(user, "[M] is not human and cannot have the fingerprints.") - else - if (( !( istype(M.dna, /datum/dna) ) || M.gloves) ) - add_log(user, "No fingerprints found on [M]") - else - add_log(user, "Fingerprints found on [M]. Analysing...") + + var/scanned_something = 0 + user << "You scan [M]. The scanner is analysing the results..." + add_log(null, "[time2text(world.time + 432000, "hh:mm:ss")] - [M]") + if(ishuman(M)) + if (istype(M.dna, /datum/dna) && !M.gloves) sleep(30) - add_log(user, "[M]'s Fingerprints: [md5(M.dna.uni_identity)]") + add_log(user, "Prints:") + add_log(user, "[md5(M.dna.uni_identity)]") + scanned_something = 1 if ( !M.blood_DNA || !M.blood_DNA.len ) - add_log(user, "No blood found on [M]") if(M.blood_DNA) del(M.blood_DNA) else - add_log(user, "Blood found on [M]. Analysing...") sleep(30) + add_log(user, "Blood:") + scanned_something = 1 for(var/blood in M.blood_DNA) - add_log(user, "Blood type: [M.blood_DNA[blood]]\nDNA: [blood]") - add_log(null, "Ending scan report.") + add_log(user, "Type: [M.blood_DNA[blood]] DNA: [blood]") + + if(!scanned_something) + add_log(null, "# No forensic traces found #") + user.visible_message("\The [user] scans \the [M] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\ + "Unable to locate any fingerprints, materials, fibers, or blood on [M]!",\ + "You hear a faint hum of electrical equipment.") + else + user.visible_message("\The [user] scans \the [M] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\ + "You finish scanning \the [M].",\ + "You hear a faint hum of electrical equipment.") + add_log(null, "---------------------------------------------------------") scanning = 0 return /obj/item/device/detective_scanner/afterattack(atom/A as obj|turf|area, mob/user as mob) + // Note, don't add formating, such as , as it won't show up in the logs. if(!in_range(A,user)) return if(!isturf(A) && !isobj(A)) @@ -73,7 +86,8 @@ spawn(0) - add_log(user, "Scanning [A]...") + user << "You scan [A]. The scanner is analysing the results..." + add_log(null, "[time2text(world.time + 432000, "hh:mm:ss")] - [capitalize(A.name)]") //PRINTS if(!A.fingerprints || !A.fingerprints.len) if(A.fingerprints) @@ -84,40 +98,40 @@ for(var/i in A.fingerprints) var/print = A.fingerprints[i] completed_prints += print - if(completed_prints.len < 1) - add_log(user, "No intact prints found") - else - add_log(user, "Found [completed_prints.len] intact print[completed_prints.len == 1 ? "" : "s"]. Analysing...") + + if(completed_prints.len) + sleep(30) + add_log(user, "Prints:") for(var/i in completed_prints) - add_log(user, "    [i]") + add_log(user, "[i]") //FIBERS if(A.suit_fibers && A.suit_fibers.len) - add_log(user, "Fibers found. Analysing...") sleep(30) + add_log(user, "Fibers:") for(var/fiber in A.suit_fibers) - add_log(user, "    [fiber]") + add_log(user, "[fiber]") //Blood if (A.blood_DNA && A.blood_DNA.len) - add_log(user, "Blood found. Analysing...") sleep(30) + add_log(user, "Blood:") for(var/blood in A.blood_DNA) - add_log(user, "    Blood type: [A.blood_DNA[blood]] DNA: [blood]") + add_log(user, "Type: [A.blood_DNA[blood]] DNA: [blood]") //General if ((!A.fingerprints || !A.fingerprints.len) && (!A.suit_fibers || !A.suit_fibers.len) && (!A.blood_DNA || !A.blood_DNA.len)) - add_log(null, "Unable to locate any fingerprints, materials, fibers, or blood.") + add_log(null, "# No forensic traces found #") user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\ "Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\ "You hear a faint hum of electrical equipment.") else user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\ - "You finish scanning \the [A].",\ + "You finish analysing \the [A].",\ "You hear a faint hum of electrical equipment.") - add_log(null, "Ending scan report.") + add_log(null, "---------------------------------------------------------") scanning = 0 return 0 @@ -125,6 +139,6 @@ if(scanning) if(user) user << msg - log += "[time2text(world.time + 432000, "hh:mm:ss")]:  [msg]" + log += "  [msg]" else CRASH("[src] \ref[src] is adding a log when it was never put in scanning mode!") \ No newline at end of file