Simplified Detective.

-Changed the focus from the high-res scanner to the regular scanner. It will simply scan the fingerprints and display them to the detective. For extra functionality, it'll store it's findings in a log and then you can print it out in a report by using attack_self().

-Detectives can now use the medical computer.
-Removed the pda forensic scanning functionality.
-Got rid of now useless high-res scanner computer. Got rid of the now useless fingerprint cards.
-Added a medical computer to the detective's office and replaced the useless medical cabinet with an empty one.

Other

-Got rid of diseases magically moving down a stage.
-Optimized playsound()
-Added an attack_self() to sprayers so that you can change the reagent use of them between 5 and 10.




git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5168 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-11-23 00:39:18 +00:00
parent 65a2126d9f
commit f1d24f27f9
20 changed files with 197 additions and 1205 deletions
+14 -24
View File
@@ -336,8 +336,10 @@ its easier to just keep the beam vertical.
//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
@@ -346,55 +348,43 @@ its easier to just keep the beam vertical.
H.dna = new /datum/dna(null)
H.dna.real_name = H.real_name
H.check_dna()
//Now, deal with gloves.
if (H.gloves && H.gloves != src)
if(fingerprintslast != H.key)
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), 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
//More adminstuffz
if(fingerprintslast != H.key)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.key
//Make the list if it does not exist.
if(!fingerprints)
fingerprints = list()
//Hash this shit.
var/full_print = md5(H.dna.uni_identity)
//Smudge up dem prints some
for(var/P in fingerprints)
if(P == full_print)
continue
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
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))))
// Add the fingerprints
fingerprints[full_print] = full_print
return 1
else
//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(fingerprintslast != M.key)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
fingerprintslast = M.key
//Cleaning up shit.
if(fingerprints && !fingerprints.len)
del(fingerprints)
@@ -406,8 +396,8 @@ its easier to just keep the beam vertical.
A.fingerprints = list()
if(!istype(A.fingerprintshidden,/list))
A.fingerprintshidden = list()
A.fingerprints |= fingerprints //detective
A.fingerprintshidden |= fingerprintshidden //admin
A.fingerprints |= fingerprints.Copy() //detective
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
A.fingerprintslast = fingerprintslast
+1 -4
View File
@@ -104,14 +104,11 @@
H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
var/obj/item/weapon/storage/box/survival/Evipack = new /obj/item/weapon/storage/box/survival(H)
H.equip_to_slot_or_del(Evipack, slot_r_hand)
new /obj/item/weapon/fcardholder(Evipack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/fcardholder(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
+1 -1
View File
@@ -4,7 +4,7 @@
name = "Medical Records"
desc = "This can be used to check medical records."
icon_state = "medcomp"
req_access = list(access_medical)
req_one_access = list(access_medical, access_forensics_lockers)
circuit = "/obj/item/weapon/circuitboard/med_data"
var/obj/item/weapon/card/id/scan = null
var/authenticated = null
@@ -298,7 +298,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<h4>Security Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png> Security Records</A></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Forensic Scan'><img src=pda_scanner.png> [scanmode == 2 ? "Disable" : "Enable"] Forensic Scanner</a></li>"
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
dat += "<li><a href='byond://?src=\ref[src];choice=46'><img src=pda_cuffs.png> Security Bot Access</a></li>"
dat += "</ul>"
@@ -513,11 +512,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_medical))
scanmode = 1
if("Forensic Scan")
if(scanmode == 2)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_security))
scanmode = 2
if("Reagent Scan")
if(scanmode == 3)
scanmode = 0
@@ -939,27 +933,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
switch(scanmode)
if(2)
if(!istype(A, /obj/item/weapon/f_card))
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/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))
@@ -600,42 +600,6 @@ Code:
menu += "ERROR: Unable to determine current location."
menu += "<br><br><A href='byond://?src=\ref[src];choice=49'>Refresh GPS Locator</a>"
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)
..()
@@ -69,167 +69,3 @@
user << "\blue You successfully forge the ID card."
else
..()
/*
* FINGERPRINT HOLDER
*/
/obj/item/weapon/fcardholder/attack_self(mob/user as mob)
var/dat = "<B>Clipboard</B><BR>"
for(var/obj/item/weapon/f_card/P in src)
dat += text("<A href='?src=\ref[];read=\ref[]'>[]</A> <A href='?src=\ref[];remove=\ref[]'>Remove</A><BR>", src, P, P.name, src, P)
user << browse(dat, "window=fcardholder")
onclose(user, "fcardholder")
return
/obj/item/weapon/fcardholder/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
usr.set_machine(src)
if (href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if ((P && P.loc == src))
usr.put_in_hands(P)
src.add_fingerprint(usr)
P.add_fingerprint(usr)
src.update()
if (href_list["read"])
var/obj/item/weapon/f_card/P = locate(href_list["read"])
if ((P && P.loc == src))
if (!( istype(usr, /mob/living/carbon/human) ))
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", P.name, P.display()), text("window=[]", P.name))
onclose(usr, "[P.name]")
else
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", P.name, P.display()), text("window=[]", P.name))
onclose(usr, "[P.name]")
src.add_fingerprint(usr)
if (ismob(src.loc))
var/mob/M = src.loc
if (M.machine == src)
spawn( 0 )
src.attack_self(M)
return
return
/obj/item/weapon/fcardholder/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/fcardholder/attack_hand(mob/user as mob)
if (user.contents.Find(src))
spawn( 0 )
src.attack_self(user)
return
src.add_fingerprint(user)
else
return ..()
return
/obj/item/weapon/fcardholder/attackby(obj/item/weapon/P as obj, mob/user as mob)
..()
if (istype(P, /obj/item/weapon/f_card))
if (src.contents.len < 30)
user.drop_item()
P.loc = src
add_fingerprint(user)
src.add_fingerprint(user)
else
user << "\blue Not enough space!!!"
else
if (istype(P, /obj/item/weapon/pen))
var/t = input(user, "Holder Label:", text("[]", src.name), null) as text
if (user.get_active_hand() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if (t)
src.name = text("FPCase- '[]'", t)
else
src.name = "Finger Print Case"
else
return
src.update()
spawn( 0 )
attack_self(user)
return
return
/obj/item/weapon/fcardholder/proc/update()
var/i = 0
for(var/obj/item/weapon/f_card/F in src)
i = 1
break
src.icon_state = text("fcardholder[]", (i ? "1" : "0"))
return
/*
* FINGERPRINT CARD
*/
/obj/item/weapon/f_card/examine()
set src in view(2)
..()
usr << text("\blue There are [] on the stack!", src.amount)
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", src.name, display()), text("window=[]", src.name))
onclose(usr, "[src.name]")
return
/obj/item/weapon/f_card/proc/display()
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
/obj/item/weapon/f_card/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/f_card))
if ((src.fingerprints || W.fingerprints))
return
if (src.amount == 10)
return
if (W:amount + src.amount > 10)
src.amount = 10
W:amount = W:amount + src.amount - 10
else
src.amount += W:amount
//W = null
del(W)
src.add_fingerprint(user)
if (W)
W.add_fingerprint(user)
else
if (istype(W, /obj/item/weapon/pen))
var/t = input(user, "Card Label:", text("[]", src.name), null) as text
if (user.get_active_hand() != W)
return
if ((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if (t)
src.name = text("FPrintC- '[]'", t)
else
src.name = "Finger Print Card"
W.add_fingerprint(user)
src.add_fingerprint(user)
return
/obj/item/weapon/f_card/add_fingerprint()
..()
if (!istype(usr, /mob/living/silicon))
if (fingerprints)
if (src.amount > 1)
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card(get_turf(src))
F.amount = --src.amount
amount = 1
icon_state = "fingerprint1"
return
@@ -104,18 +104,6 @@
..()
return
/obj/item/weapon/storage/fcard_kit/New()
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
new /obj/item/weapon/f_card(src)
..()
return
/obj/item/weapon/storage/id_kit/New()
new /obj/item/weapon/card/id(src)
@@ -180,8 +180,6 @@
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/cartridge/detective(src)
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)
+15 -12
View File
@@ -19,10 +19,13 @@
if (vary)
S.frequency = rand(32000, 55000)
for (var/mob/M in range(world.view+extrarange, source)) // Plays for people in range.
if(locate(/mob/, M))
for (var/A in range(world.view+extrarange, source)) // Plays for people in range.
if(ismob(A))
var/mob/M = A
var/mob/M2 = locate(/mob/, M)
if (M2.client)
if (M2 && M2.client)
if(M2.ear_deaf <= 0 || !M.ear_deaf)
if(isturf(source))
var/dx = source.x - M2.x
@@ -30,17 +33,17 @@
M2 << S
if (M.client)
if(M.ear_deaf <= 0 || !M.ear_deaf)
if(isturf(source))
var/dx = source.x - M.x
S.pan = max(-100, min(100, dx/8.0 * 100))
if (M.client)
if(M.ear_deaf <= 0 || !M.ear_deaf)
if(isturf(source))
var/dx = source.x - M.x
S.pan = max(-100, min(100, dx/8.0 * 100))
M << S
M << S
for(var/obj/structure/closet/L in range(world.view+extrarange, source))
if(locate(/mob/, L))
for(var/mob/M in L)
if(istype(A, /obj/structure/closet))
var/obj/O = A
for(var/mob/M in O)
if (M.client)
if(M.ear_deaf <= 0 || !M.ear_deaf)
if(isturf(source))