From 934267b2b671162f349ef61533053fa501f5eb56 Mon Sep 17 00:00:00 2001 From: SamCroswell Date: Wed, 8 Jun 2016 10:26:54 -0400 Subject: [PATCH] Scanner - Initial Commit --- code/modules/detective_work/scanner.dm | 49 +++++++++++++++++++++++-- icons/goonstation/objects/devices.dmi | Bin 182 -> 0 bytes icons/goonstation/objects/objects.dmi | Bin 355 -> 1002 bytes 3 files changed, 46 insertions(+), 3 deletions(-) delete mode 100644 icons/goonstation/objects/devices.dmi diff --git a/code/modules/detective_work/scanner.dm b/code/modules/detective_work/scanner.dm index 59466282384..54fa83aa270 100644 --- a/code/modules/detective_work/scanner.dm +++ b/code/modules/detective_work/scanner.dm @@ -5,7 +5,8 @@ /obj/item/device/detective_scanner name = "forensic scanner" desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings." - icon_state = "forensic1" + icon = 'icons/goonstation/objects/objects.dmi' + icon_state = "detscanner" w_class = 3.0 item_state = "electronic" flags = CONDUCT | NOBLUDGEON @@ -15,9 +16,50 @@ var/list/log = list() /obj/item/device/detective_scanner/attack_self(var/mob/user) + var/search = input(user, "Enter name, fingerprint or blood DNA.", "Find record", "") + + if (!search || user.stat) + return + + search = lowertext(search) + + var/name + var/fingerprint + var/dna + + // I really, really wish I didn't have to split this into two seperate loops. But the datacore is awful. + + var/datum/data/record/S = record + if(search == lowertext(S.fields["fingerprint"]) || search == lowertext(S.fields["name"])) + name = S.fields["name"] + continue + + for (var/record in data_core.medical) + if (search == lowertext(M.fields["b_dna"]) || name == M.fields["name"]) + dna = M.fields["b_dna"] + + if(!fingerprint) // We have searched by DNA, and do not have the relevant information from the security records. + name = M.fields["name"] + if(name == S.fields["name"]) + fingerprint = S.fields["fingerprint"] + continue + continue + + if(name && fingerprint && dna) + to_chat(user, "Match found in station records: [name]
\ + Fingerprint: [fingerprint]
\ + Blood DNA: [dna]") + return + + + +/obj/item/device/detective_scanner/verb/print_scanner_report() + set name = "Print Scanner Report" + set category = "Object" + if(log.len && !scanning) scanning = 1 - to_chat(user, "Printing report, please wait...") + to_chat(usr, "Printing report, please wait...") playsound(loc, "sound/goonstation/machines/printer_thermal.ogg", 50, 1) spawn(100) @@ -38,7 +80,8 @@ log = list() scanning = 0 else - to_chat(user, "The scanner has no logs or is in use.") + to_chat(usr, "The scanner has no logs or is in use.") + /obj/item/device/detective_scanner/attack(mob/living/M as mob, mob/user as mob) return diff --git a/icons/goonstation/objects/devices.dmi b/icons/goonstation/objects/devices.dmi deleted file mode 100644 index cf74d73796c8c6121c0818fdac74e4a7f0ab9a5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;m;-!5T!HlRD%)E?im@cfFPOpM z*^M-ilB$r15|`BC)e_1!5cyiE*d|0 zq;uX!^CUx2Pwx&3;~?Y9#$F0CsjT7l;v3i)KHlcf^{%~V4K$R;)5S4_V`g%K#2p}S W0R!VxY5#RV7K5j&pUXO@geCygCOLEf diff --git a/icons/goonstation/objects/objects.dmi b/icons/goonstation/objects/objects.dmi index 41523d185410d7f0b81c7ccea1798aef67515542..8dadb400668ccb464d85f16b00295be61acccfa8 100644 GIT binary patch literal 1002 zcmVV=-0C=2r%CQQAFce1NIrk}kbT75-nnfa#LEj-XSCgSB++6ha9RxSGbKq;y z52K&qCQlnn&Hn<6&*MpE&ruUB-Y+tV^P2RWszDhR%__{LArrGySaf6-2|qsjQjxWO zLn$nGw8bzxxXIH2@K+|`(GY1M0009iNklTY#B#B8$bY`U{eSVHr`GP`fyzJ2eTH*aQ^TUuJeaYlpF4mgcE0Zu#MH0lI6?SRv$ zc>*L!B9bH#yYF+gwhYShjA^h_Q};Mldrfv72?YIAN1oqZWOl+TWO;_1KQ~0}>+0@? zEYA>D5^QBaAm}IVaTPtD4xM~!ZwJa#S5-(T4L<%h4wuWV^{J|Y(b3xgfN1m;QzkHH zKp^NRywr+J2*_aH(CY#(wIUGolWLG~^~D2BpS*Oa%B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