Readded detective work, with much bugfixing and optimizations.

Any PDA that can access the Security Records can, via the forensic scanner function (that was already there) store data on what was scanned, the same way that the Detective's scanner can.
Scanning a PDA with said stored data in the Detective's computer-o-doom will transfer the data from the PDA to the computer's database.
Made some area names improper as needed (Only ones where it makes sense to be improper.)
Updated changelog.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3713 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
joeheinemeyer@gmail.com
2012-06-01 20:32:26 +00:00
parent c90048c7aa
commit e0d605c2eb
24 changed files with 918 additions and 758 deletions
+21 -19
View File
@@ -835,9 +835,8 @@
else
user << "\blue Blood found on [C]. Analysing..."
spawn(15)
for(var/i = 1, i < C:blood_DNA.len, i++)
var/list/templist = C:blood_DNA[i]
user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]"
for(var/blood in C:blood_DNA)
user << "\blue Blood type: [C:blood_DNA[blood]]\nDNA: [blood]"
if(4)
for (var/mob/O in viewers(C, null))
@@ -852,23 +851,26 @@
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
switch(scanmode)
if(2)
if (!A.fingerprints)
user << "\blue Unable to locate any fingerprints on [A]!"
else
user << "\blue Isolated [A:fingerprints.len] fingerprints."
var/list/prints = A:fingerprints
var/list/complete_prints = list()
for(var/i in prints)
var/list/templist = params2list(i)
var/temp = stringpercent(templist["2"])
if(temp <= 6)
complete_prints += templist["2"]
if(complete_prints.len < 1)
user << "\blue No intact prints found"
if(!istype(A, /obj/item/weapon/f_card))
if (!A.fingerprints)
user << "\blue Unable to locate any fingerprints on [A]!"
else
user << "\blue Found [complete_prints.len] intact prints"
for(var/i in complete_prints)
user << "\blue " + i
user << "\blue Isolated [A:fingerprints.len] fingerprints."
var/list/prints = A:fingerprints
var/list/complete_prints = list()
for(var/i in prints)
var/print = prints[i]
if(stringpercent(print) <= FINGERPRINT_COMPLETE)
complete_prints += print
if(complete_prints.len < 1)
user << "\blue No intact prints found"
else
user << "\blue Found [complete_prints.len] intact prints"
for(var/i in complete_prints)
user << "\blue [i]"
if(cartridge && cartridge.access_security)
cartridge.add_data(A)
user << "Data added to internal storage. Scan with a High-Resolution Scanner to retreive."
if(3)
if(!isnull(A.reagents))
+38
View File
@@ -30,6 +30,7 @@
var/list/powermonitors = list()
var/message1 // used for status_displays
var/message2
var/list/stored_data = list()
engineering
name = "Power-ON Cartridge"
@@ -598,6 +599,43 @@ Code:
else
menu += "ERROR: Unable to determine current location."
proc/add_data(atom/A as mob|obj|turf|area)
//I love hashtables.
var/list/data_entry = stored_data["\ref [A]"]
if(islist(data_entry)) //Yay, it was already stored!
//Merge the fingerprints.
var/list/data_prints = data_entry[1]
for(var/print in A.fingerprints)
var/merged_print = data_prints[print]
if(!merged_print)
data_prints[print] = A.fingerprints[print]
else
data_prints[print] = stringmerge(data_prints[print],A.fingerprints[print])
//Now the fibers
var/list/fibers = data_entry[2]
if(!fibers)
fibers = list()
if(A.suit_fibers && A.suit_fibers.len)
for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~
if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add!
fibers += A.suit_fibers[j]
var/list/blood = data_entry[3]
if(!blood)
blood = list()
if(A.blood_DNA && A.blood_DNA.len)
for(var/main_blood in A.blood_DNA)
if(!blood[main_blood])
blood[main_blood] = A.blood_DNA[blood]
return 1
var/list/sum_list[4] //Pack it back up!
sum_list[1] = A.fingerprints
sum_list[2] = A.suit_fibers
sum_list[3] = A.blood_DNA
sum_list[4] = "\The [A] in \the [get_area(A)]"
stored_data["\ref [A]"] = sum_list
return 0
/obj/item/weapon/cartridge/Topic(href, href_list)
..()