mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
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:
+66
-74
@@ -62,7 +62,7 @@
|
||||
return
|
||||
|
||||
/atom/proc/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (!(istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) && !(istype(W, /obj/item/weapon/cleaner)) && !(istype(W, /obj/item/weapon/chemsprayer)) && !(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) && !(istype(W, /obj/item/weapon/packageWrap)))
|
||||
if (!(istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) && !(istype(W, /obj/item/weapon/cleaner)) && !(istype(W, /obj/item/weapon/chemsprayer)) && !(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) && !(istype(W, /obj/item/weapon/packageWrap)) && !istype(W, /obj/item/device/detective_scanner))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red <B>[src] has been hit by [user] with [W]</B>"
|
||||
@@ -98,64 +98,62 @@
|
||||
if(isnull(M.key)) return
|
||||
if (!( src.flags ) & FPRINT)
|
||||
return
|
||||
//Smudge up dem prints some
|
||||
for(var/P in fingerprints)
|
||||
var/test_print = stars(fingerprints[P], rand(85,95))
|
||||
if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left)
|
||||
fingerprints.Remove(P)
|
||||
else
|
||||
fingerprints[P] = test_print
|
||||
if (ishuman(M))
|
||||
//Add the list if it does not exist.
|
||||
if(!fingerprintshidden)
|
||||
fingerprintshidden = list()
|
||||
//Fibers~
|
||||
add_fibers(M)
|
||||
//Now, lets get to the dirty work.
|
||||
//First, make sure their DNA makes sense.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (!istype(H.dna, /datum/dna) || !H.dna.uni_identity || (length(H.dna.uni_identity) != 32))
|
||||
if(!istype(H.dna, /datum/dna))
|
||||
H.dna = new /datum/dna(null)
|
||||
H.check_dna()
|
||||
//Now, deal with gloves.
|
||||
if (H.gloves && H.gloves != src)
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
if(fingerprintslast != H.key)
|
||||
fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
fingerprintslast = H.key
|
||||
H.gloves.add_fingerprint(M)
|
||||
//Deal with gloves the pass finger/palm prints.
|
||||
if(H.gloves != src)
|
||||
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
//More adminstuffz
|
||||
if(fingerprintslast != H.key)
|
||||
fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
|
||||
fingerprintslast = H.key
|
||||
//Make the list if it does not exist.
|
||||
if(!fingerprints)
|
||||
fingerprints = list()
|
||||
var/new_prints = 0
|
||||
var/prints
|
||||
for(var/i = 1, i <= src.fingerprints.len, i++)
|
||||
var/list/L = params2list(src.fingerprints[i])
|
||||
if(L[num2text(1)] == md5(H.dna.uni_identity))
|
||||
new_prints = i
|
||||
prints = L[num2text(2)]
|
||||
break
|
||||
else
|
||||
var/test_print = stars(L[num2text(2)], rand(80,90))
|
||||
if(stringpercent(test_print) == 32)
|
||||
if(src.fingerprints.len == 1)
|
||||
src.fingerprints = list()
|
||||
else
|
||||
for(var/j = (i + 1), j < (src.fingerprints.len), j++)
|
||||
src.fingerprints[j-1] = src.fingerprints[j]
|
||||
src.fingerprints.len--
|
||||
else
|
||||
src.fingerprints[i] = "1=[L[num2text(1)]]&2=[test_print]"
|
||||
if(new_prints)
|
||||
src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40)))))
|
||||
else if(new_prints == 0)
|
||||
if(!src.fingerprints)
|
||||
src.fingerprints = list(text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40))))
|
||||
else
|
||||
src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))
|
||||
for(var/i = 1, i <= src.fingerprints.len, i++)
|
||||
if(length(src.fingerprints[i]) != 69)
|
||||
src.fingerprints.Remove(src.fingerprints[i])
|
||||
if(fingerprints && !fingerprints.len) del(fingerprints)
|
||||
//Hash this shit.
|
||||
var/full_print = md5(H.dna.uni_identity)
|
||||
var/print = fingerprints[full_print] //Find if the print is already there.
|
||||
//It is not! We need to add it!
|
||||
if(!print)
|
||||
fingerprints[full_print] = stars(full_print, H.gloves ? rand(10,20) : rand(25,40))
|
||||
//It's there, lets merge this shit!
|
||||
else
|
||||
fingerprints[full_print] = stringmerge(print, stars(full_print, (H.gloves ? rand(10,20) : rand(25,40))))
|
||||
return 1
|
||||
else
|
||||
if(src.fingerprintslast != M.key)
|
||||
src.fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key)
|
||||
src.fingerprintslast = M.key
|
||||
if(fingerprintslast != M.key)
|
||||
fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key)
|
||||
fingerprintslast = M.key
|
||||
//Cleaning up shit.
|
||||
if(fingerprints && !fingerprints.len)
|
||||
del(fingerprints)
|
||||
return
|
||||
|
||||
//returns 1 if made bloody, returns 0 otherwise
|
||||
@@ -190,11 +188,10 @@
|
||||
O.overlays += O.blood_overlay
|
||||
|
||||
//if this blood isn't already in the list, add it
|
||||
for(var/i = 1, i <= O.blood_DNA.len, i++)
|
||||
if((O.blood_DNA[i][1] == M.dna.unique_enzymes) && (O.blood_DNA[i][2] == M.dna.b_type))
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
O.blood_DNA.len++
|
||||
O.blood_DNA[O.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
|
||||
if(blood_DNA[M.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
return 1 //we applied blood to the item
|
||||
|
||||
//adding blood to turfs
|
||||
@@ -203,8 +200,8 @@
|
||||
|
||||
//get one blood decal and infect it with virus from M.viruses
|
||||
for(var/obj/effect/decal/cleanable/blood/B in T.contents)
|
||||
B.blood_DNA.len++
|
||||
B.blood_DNA[B.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
if(!B.blood_DNA[M.dna.unique_enzymes])
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
B.viruses += newDisease
|
||||
@@ -213,7 +210,7 @@
|
||||
|
||||
//if there isn't a blood decal already, make one.
|
||||
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(T)
|
||||
newblood.blood_DNA = list(list(M.dna.unique_enzymes, M.dna.b_type))
|
||||
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
newblood.viruses += newDisease
|
||||
@@ -224,11 +221,9 @@
|
||||
else if (istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
//if this blood isn't already in the list, add it
|
||||
for(var/i = 1, i <= H.blood_DNA.len, i++)
|
||||
if((H.blood_DNA[i][1] == M.dna.unique_enzymes) && (H.blood_DNA[i][2] == M.dna.b_type))
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
H.blood_DNA.len++
|
||||
H.blood_DNA[H.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
if(blood_DNA[H.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
return 1 //we applied blood to the item
|
||||
return
|
||||
|
||||
@@ -251,7 +246,7 @@
|
||||
if( istype(src, /turf/simulated) )
|
||||
var/turf/simulated/source1 = src
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
|
||||
this.blood_DNA = list(list(M.dna.unique_enzymes,M.dna.b_type))
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
this.viruses += newDisease
|
||||
@@ -261,6 +256,7 @@
|
||||
if( istype(src, /turf/simulated) )
|
||||
var/turf/simulated/source2 = src
|
||||
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(source2)
|
||||
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
this.viruses += newDisease
|
||||
@@ -281,12 +277,15 @@
|
||||
|
||||
if (!( src.flags ) & FPRINT)
|
||||
return
|
||||
if ( src.blood_DNA )
|
||||
if (blood_DNA)
|
||||
|
||||
//Cleaning blood off of mobs
|
||||
if (istype (src, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = src
|
||||
del(M.blood_DNA)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.bloody_hands = 0
|
||||
|
||||
//Cleaning blood off of items
|
||||
else if (istype (src, /obj/item))
|
||||
@@ -295,6 +294,10 @@
|
||||
if(O.blood_overlay)
|
||||
O.overlays.Remove(O.blood_overlay)
|
||||
|
||||
if(istype(src, /obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = src
|
||||
G.transfer_blood = 0
|
||||
|
||||
//Cleaning blood off of turfs
|
||||
else if (istype(src, /turf/simulated))
|
||||
var/turf/simulated/T = src
|
||||
@@ -307,25 +310,14 @@
|
||||
|
||||
if(blood_DNA && istype(blood_DNA, /list) && !blood_DNA.len)
|
||||
del(blood_DNA)
|
||||
if(src.fingerprints && src.fingerprints.len)
|
||||
var/done = 0
|
||||
while(!done)
|
||||
done = 1
|
||||
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
|
||||
var/list/prints = params2list(src.fingerprints[i])
|
||||
var/test_print = prints["2"]
|
||||
var/new_print = stars(test_print, rand(1,20))
|
||||
if(stringpercent(new_print) == 32)
|
||||
if(src.fingerprints.len == 1)
|
||||
src.fingerprints = list()
|
||||
else
|
||||
for(var/j = (i + 1), j < (src.fingerprints.len), j++)
|
||||
src.fingerprints[j-1] = src.fingerprints[j]
|
||||
src.fingerprints.len--
|
||||
done = 0
|
||||
break
|
||||
else
|
||||
src.fingerprints[i] = "1=" + prints["1"] + "&2=" + new_print
|
||||
if(fingerprints && fingerprints.len)
|
||||
//Smudge up dem prints some
|
||||
for(var/P in fingerprints)
|
||||
var/test_print = stars(fingerprints[P], rand(10,20))
|
||||
if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left)
|
||||
fingerprints.Remove(P)
|
||||
else
|
||||
fingerprints[P] = test_print
|
||||
if(fingerprints && !fingerprints.len)
|
||||
del(fingerprints)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
|
||||
@@ -106,9 +106,13 @@
|
||||
var/obj/item/weapon/storage/box/survival/Evipack = new /obj/item/weapon/storage/box/survival(H)
|
||||
H.equip_if_possible(Evipack, H.slot_r_hand)
|
||||
new /obj/item/weapon/fcardholder(Evipack)
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/box/evidence(H), H.slot_l_hand)
|
||||
H.equip_if_possible(new /obj/item/device/detective_scanner(H), H.slot_r_store)
|
||||
else
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/box/survival(H.back), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/weapon/fcardholder(H), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/box/evidence(H), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/device/detective_scanner(H), H.slot_in_backpack)
|
||||
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
|
||||
@@ -797,7 +797,8 @@
|
||||
H.apply_damage(0.5*damage, BRUTE, "r_arm")
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/B = new(src.loc)
|
||||
B.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
|
||||
B.blood_DNA = list()
|
||||
B.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
|
||||
bloodiness += 4
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
return
|
||||
}
|
||||
*/
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door_control/attack_hand(mob/user as mob)
|
||||
@@ -103,6 +105,9 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -985,6 +985,8 @@ About the new airlock wires panel:
|
||||
if(src.isElectrified())
|
||||
if(src.shock(user, 75))
|
||||
return
|
||||
if(istype(C, /obj/item/device/detective_scanner))
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
src.sd_SetLuminosity(0)
|
||||
|
||||
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
add_fingerprint(user)
|
||||
src.disable = !src.disable
|
||||
|
||||
@@ -580,7 +580,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
R.word2 = w2
|
||||
R.word3 = w3
|
||||
R.check_icon()
|
||||
R.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
|
||||
R.blood_DNA = list()
|
||||
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
return
|
||||
else
|
||||
user << "The book seems full of illegible scribbles. Is this a joke?"
|
||||
@@ -625,7 +626,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
var/obj/effect/rune/R = new /obj/effect/rune
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
R.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
|
||||
R.blood_DNA = list()
|
||||
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
switch(r)
|
||||
if("teleport")
|
||||
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
|
||||
|
||||
@@ -170,6 +170,8 @@
|
||||
new /obj/item/weapon/storage/fcard_kit(src)
|
||||
new /obj/item/weapon/fcardholder(src)
|
||||
new /obj/item/weapon/clipboard(src)
|
||||
new /obj/item/device/detective_scanner(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
|
||||
|
||||
@@ -60,6 +60,168 @@ MASS SPECTROMETER
|
||||
if(M)
|
||||
M.invisibility = 2
|
||||
|
||||
|
||||
/obj/item/device/detective_scanner
|
||||
name = "Scanner"
|
||||
desc = "Used to scan objects for DNA and fingerprints."
|
||||
icon_state = "forensic1"
|
||||
var/amount = 20.0
|
||||
var/list/stored = list()
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
attackby(obj/item/weapon/f_card/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/f_card))
|
||||
if (W.fingerprints)
|
||||
return
|
||||
if (src.amount == 20)
|
||||
return
|
||||
if (W.amount + src.amount > 20)
|
||||
src.amount = 20
|
||||
W.amount = W.amount + src.amount - 20
|
||||
else
|
||||
src.amount += W.amount
|
||||
//W = null
|
||||
del(W)
|
||||
add_fingerprint(user)
|
||||
if (W)
|
||||
W.add_fingerprint(user)
|
||||
return
|
||||
|
||||
attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if (!ishuman(M))
|
||||
user << "\red [M] is not human and cannot have the fingerprints."
|
||||
return 0
|
||||
if (( !( istype(M.dna, /datum/dna) ) || M.gloves) )
|
||||
user << "\blue No fingerprints found on [M]"
|
||||
return 0
|
||||
else
|
||||
if (src.amount < 1)
|
||||
user << text("\blue Fingerprints scanned on [M]. Need more cards to print.")
|
||||
else
|
||||
src.amount--
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
F.amount = 1
|
||||
F.add_fingerprint(M)
|
||||
F.icon_state = "fingerprint1"
|
||||
F.name = text("FPrintC- '[M.name]'")
|
||||
|
||||
user << "\blue Done printing."
|
||||
user << "\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]"
|
||||
if ( !M.blood_DNA || !M.blood_DNA.len )
|
||||
user << "\blue No blood found on [M]"
|
||||
if(M.blood_DNA)
|
||||
del(M.blood_DNA)
|
||||
else
|
||||
user << "\blue Blood found on [M]. Analysing..."
|
||||
spawn(15)
|
||||
for(var/blood in M.blood_DNA)
|
||||
user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]"
|
||||
return
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(!in_range(A,user))
|
||||
return
|
||||
if(loc != user)
|
||||
return
|
||||
if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit.
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/f_card))
|
||||
user << "The scanner displays on the screen: \"ERROR 43: Object on Excluded Object List.\""
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
//Special case for blood splaters.
|
||||
if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune))
|
||||
if(!isnull(A.blood_DNA))
|
||||
for(var/blood in A.blood_DNA)
|
||||
user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]"
|
||||
return
|
||||
|
||||
//General
|
||||
if ((!A.fingerprints || !A.fingerprints.len) && !A.suit_fibers && !A.blood_DNA)
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
return 0
|
||||
|
||||
if(add_data(A))
|
||||
user << "\blue Object already in internal memory. Consolidating data..."
|
||||
return
|
||||
|
||||
|
||||
//PRINTS
|
||||
if(!A.fingerprints || !A.fingerprints.len)
|
||||
if(A.fingerprints)
|
||||
del(A.fingerprints)
|
||||
else
|
||||
user << "\blue Isolated [A.fingerprints.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve."
|
||||
|
||||
//FIBERS
|
||||
if(A.suit_fibers)
|
||||
user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve."
|
||||
|
||||
//Blood
|
||||
if (A.blood_DNA)
|
||||
user << "\blue Blood found on [A]. Analysing..."
|
||||
spawn(15)
|
||||
for(var/blood in A.blood_DNA)
|
||||
user << "Blood type: \red [A.blood_DNA[blood]] \t \black DNA: \red [blood]"
|
||||
if(prob(5))
|
||||
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 hear a faint hum of electrical equipment.")
|
||||
return 0
|
||||
else
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]\n[user.gender == MALE ? "He" : "She"] seems to perk up slightly at the readout." ,\
|
||||
"The results of the scan pique your interest.",\
|
||||
"You hear a faint hum of electrical equipment, and someone making a thoughtful noise.")
|
||||
return 0
|
||||
return
|
||||
|
||||
proc/add_data(atom/A as mob|obj|turf|area)
|
||||
//I love hashtables.
|
||||
var/list/data_entry = stored["\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["\ref [A]"] = sum_list
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/healthanalyzer
|
||||
name = "Health Analyzer"
|
||||
icon_state = "health"
|
||||
|
||||
@@ -51,12 +51,13 @@
|
||||
gib.viruses += viruus
|
||||
viruus.holder = gib
|
||||
viruus.spread_type = CONTACT_FEET
|
||||
gib.blood_DNA = list()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA = list(list(MobDNA.unique_enzymes, MobDNA.b_type))
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
else if(istype(src, /obj/effect/gibspawner/xeno))
|
||||
gib.blood_DNA = list(list("UNKNOWN DNA", "X*"))
|
||||
gib.blood_DNA["UNKNOWN DNA"] = "X*"
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA = list(list("Non-human DNA", "A+"))
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
@@ -192,18 +192,13 @@ FINGERPRINT CARD
|
||||
return
|
||||
|
||||
/obj/item/weapon/f_card/proc/display()
|
||||
if(!fingerprints) return
|
||||
if (!istype(src.fingerprints, /list))
|
||||
src.fingerprints = params2list(src.fingerprints)
|
||||
if (length(src.fingerprints))
|
||||
var/dat = "<B>Fingerprints on Card</B><HR>"
|
||||
for(var/i = 1, i < (src.fingerprints.len + 1), i++)
|
||||
var/list/L = params2list(src.fingerprints[i])
|
||||
dat += text("[]<BR>", L["1"])
|
||||
//Foreach goto(41)
|
||||
return dat
|
||||
else
|
||||
if(!fingerprints || !fingerprints.len)
|
||||
return "<B>There are no fingerprints on this card.</B>"
|
||||
else
|
||||
var/dat = "<B>Fingerprints on Card</B><HR>"
|
||||
for(var/name in fingerprints)
|
||||
dat += "[name]<BR>"
|
||||
return dat
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user