mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
BS12 Detective Work port.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3229 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
var/level = 2
|
||||
var/flags = FPRINT
|
||||
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
|
||||
var/fingerprints = null
|
||||
var/list/fingerprintshidden = new/list()
|
||||
var/list/fingerprints = list()
|
||||
var/list/fingerprintshidden = list()
|
||||
var/fingerprintslast = null
|
||||
var/blood_DNA = null
|
||||
var/blood_type = null
|
||||
var/list/blood_DNA = list()
|
||||
var/last_bumped = 0
|
||||
var/pass_flags = 0
|
||||
|
||||
@@ -18,6 +17,9 @@
|
||||
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
||||
///Chemistry.
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/atom/original_atom = null
|
||||
|
||||
proc/assume_air(datum/air_group/giver)
|
||||
del(giver)
|
||||
return null
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = null
|
||||
blood_type = null
|
||||
blood_DNA = list()
|
||||
//var/datum/disease2/disease/virus2 = null
|
||||
|
||||
Del()
|
||||
|
||||
@@ -176,8 +176,8 @@
|
||||
icon_state = "sec"
|
||||
icon_deny = "sec-deny"
|
||||
req_access_txt = "1"
|
||||
product_paths = "/obj/item/weapon/handcuffs;/obj/item/weapon/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut"
|
||||
product_amounts = "8;4;5;12"
|
||||
product_paths = "/obj/item/weapon/handcuffs;/obj/item/weapon/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut;/obj/item/weapon/storage/box/evidence"
|
||||
product_amounts = "8;4;5;12;6"
|
||||
product_hidden = "/obj/item/clothing/glasses/sunglasses;/obj/item/kitchen/donut_box"
|
||||
product_hideamt = "2;2"
|
||||
product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?"
|
||||
|
||||
@@ -1505,4 +1505,37 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
|
||||
list += found_string
|
||||
found_char = findtext(cur_text,character,last_found)
|
||||
list += copytext(cur_text,last_found,length(cur_text)+1)
|
||||
return list
|
||||
return list
|
||||
|
||||
/proc/stringmerge(var/text,var/compare,replace = "*")
|
||||
//This proc fills in all spaces with the "replace" var (* by default) with whatever
|
||||
//is in the other string at the same spot (assuming it is not a replace char).
|
||||
//This is used for fingerprints
|
||||
var/newtext = text
|
||||
if(lentext(text) != lentext(compare))
|
||||
return 0
|
||||
for(var/i = 1, i < lentext(text), i++)
|
||||
var/a = copytext(text,i,i+1)
|
||||
var/b = copytext(compare,i,i+1)
|
||||
//if it isn't both the same letter, or if they are both the replacement character
|
||||
//(no way to know what it was supposed to be)
|
||||
if(a != b)
|
||||
if(a == replace) //if A is the replacement char
|
||||
newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1)
|
||||
else if(b == replace) //if B is the replacement char
|
||||
newtext = copytext(newtext,1,i) + a + copytext(newtext, i+1)
|
||||
else //The lists disagree, Uh-oh!
|
||||
return 0
|
||||
return newtext
|
||||
|
||||
/proc/stringpercent(var/text,character = "*")
|
||||
//This proc returns the number of chars of the string that is the character
|
||||
//This is used for detective work to determine fingerprint completion.
|
||||
if(!text || !character)
|
||||
return 0
|
||||
var/count = 0
|
||||
for(var/i = 1, i <= lentext(text), i++)
|
||||
var/a = copytext(text,i,i+1)
|
||||
if(a == character)
|
||||
count++
|
||||
return count
|
||||
@@ -106,33 +106,57 @@
|
||||
if (!( src.flags ) & 256)
|
||||
return
|
||||
if (ishuman(M))
|
||||
add_fibers(M)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (!istype(H.dna, /datum/dna))
|
||||
return 0
|
||||
if (H.gloves)
|
||||
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()
|
||||
if (H.gloves && H.gloves != src)
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
return 0
|
||||
if (!( src.fingerprints ))
|
||||
src.fingerprints = text("[]", md5(H.dna.uni_identity))
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
return 1
|
||||
else
|
||||
var/list/L = params2list(src.fingerprints)
|
||||
L -= md5(H.dna.uni_identity)
|
||||
while(L.len >= 3)
|
||||
L -= L[1]
|
||||
L += md5(H.dna.uni_identity)
|
||||
src.fingerprints = list2params(L)
|
||||
if(src.fingerprintslast != H.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
|
||||
src.fingerprintslast = H.key
|
||||
H.gloves.add_fingerprint(M)
|
||||
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
|
||||
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))))
|
||||
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])
|
||||
return 1
|
||||
else
|
||||
if(src.fingerprintslast != M.key)
|
||||
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
|
||||
src.fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key)
|
||||
src.fingerprintslast = M.key
|
||||
return
|
||||
|
||||
@@ -140,9 +164,17 @@
|
||||
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
|
||||
if (!( istype(M, /mob/living/carbon/human) ))
|
||||
return 0
|
||||
if (!istype(M.dna, /datum/dna))
|
||||
M.dna = new /datum/dna(null)
|
||||
M.check_dna()
|
||||
if (!( src.flags ) & 256)
|
||||
return
|
||||
if (!( src.blood_DNA ))
|
||||
if(!blood_DNA)
|
||||
var/turf/Z = get_turf(src)
|
||||
message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
|
||||
log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
|
||||
return
|
||||
if (blood_DNA.len)
|
||||
if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected.
|
||||
var/obj/item/source2 = src
|
||||
source2.icon_old = src.icon
|
||||
@@ -151,34 +183,53 @@
|
||||
I.Blend(new /icon('blood.dmi', "itemblood"),ICON_MULTIPLY)
|
||||
I.Blend(new /icon(src.icon, src.icon_state),ICON_UNDERLAY)
|
||||
src.icon = I
|
||||
src.blood_DNA = M.dna.unique_enzymes
|
||||
src.blood_type = M.b_type
|
||||
var/inthere = 0
|
||||
for(var/i = 1, i <= src.blood_DNA.len, i++)
|
||||
var/list/templist = src.blood_DNA[i]
|
||||
if(templist[1] == M.dna.unique_enzymes && templist[2] == M.dna.b_type)
|
||||
inthere = 1
|
||||
break
|
||||
if(!inthere)
|
||||
src.blood_DNA.len++
|
||||
src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
else if (istype(src, /turf/simulated))
|
||||
var/turf/simulated/source2 = src
|
||||
var/list/objsonturf = range(0,src)
|
||||
var/i
|
||||
for(i=1, i<=objsonturf.len, i++)
|
||||
if(istype(objsonturf[i],/obj/effect/decal/cleanable/blood))
|
||||
return
|
||||
if(objsonturf)
|
||||
for(var/i=1, i<=objsonturf.len, i++)
|
||||
if(istype(objsonturf[i],/obj/effect/decal/cleanable/blood))
|
||||
var/obj/effect/decal/cleanable/blood/this = objsonturf[i]
|
||||
this.blood_DNA.len++
|
||||
this.blood_DNA[this.blood_DNA.len] = list(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
|
||||
newDisease.holder = this
|
||||
return
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source2)
|
||||
this.blood_DNA = M.dna.unique_enzymes
|
||||
this.blood_type = M.b_type
|
||||
var/list/blood_DNA_temp[1]
|
||||
blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type)
|
||||
this.blood_DNA = blood_DNA_temp
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
this.viruses += newDisease
|
||||
newDisease.holder = this
|
||||
else if (istype(src, /mob/living/carbon/human))
|
||||
src.blood_DNA = M.dna.unique_enzymes
|
||||
src.blood_type = M.b_type
|
||||
var/inthere = 0
|
||||
for(var/i = 1, i <= src.blood_DNA.len, i++)
|
||||
var/list/templist = src.blood_DNA[i]
|
||||
if(templist[1] == M.dna.unique_enzymes && templist[2] == M.dna.b_type)
|
||||
inthere = 1
|
||||
break
|
||||
if(!inthere)
|
||||
src.blood_DNA.len++
|
||||
src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
else
|
||||
return
|
||||
else
|
||||
var/list/L = params2list(src.blood_DNA)
|
||||
L -= M.dna.unique_enzymes
|
||||
while(L.len >= 3)
|
||||
L -= L[1]
|
||||
L += M.dna.unique_enzymes
|
||||
src.blood_DNA = list2params(L)
|
||||
var/list/blood_DNA_temp[1]
|
||||
blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type)
|
||||
src.blood_DNA = blood_DNA_temp
|
||||
return
|
||||
|
||||
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)
|
||||
@@ -200,7 +251,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 = M.dna.unique_enzymes
|
||||
this.blood_DNA = list(list(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
|
||||
@@ -230,23 +281,60 @@
|
||||
|
||||
if (!( src.flags ) & 256)
|
||||
return
|
||||
if ( src.blood_DNA )
|
||||
if(!blood_DNA)
|
||||
var/turf/Z = get_turf(src)
|
||||
message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
|
||||
log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
|
||||
blood_DNA = list()
|
||||
return
|
||||
if ( src.blood_DNA.len )
|
||||
if (istype (src, /mob/living/carbon))
|
||||
var/obj/item/source2 = src
|
||||
source2.blood_DNA = null
|
||||
source2.blood_DNA = list()
|
||||
//var/icon/I = new /icon(source2.icon_old, source2.icon_state) //doesnt have icon_old
|
||||
//source2.icon = I
|
||||
if (istype (src, /obj/item))
|
||||
var/obj/item/source2 = src
|
||||
source2.blood_DNA = null
|
||||
source2.blood_DNA = list()
|
||||
// var/icon/I = new /icon(source2.icon_old, source2.icon_state)
|
||||
source2.icon = source2.icon_old
|
||||
source2.update_icon()
|
||||
if(source2.icon_old)
|
||||
source2.icon = source2.icon_old
|
||||
source2.update_icon()
|
||||
else
|
||||
source2.icon = initial(icon)
|
||||
source2.update_icon()
|
||||
if (istype(src, /turf/simulated))
|
||||
var/obj/item/source2 = src
|
||||
source2.blood_DNA = null
|
||||
var/icon/I = new /icon(source2.icon_old, source2.icon_state)
|
||||
source2.icon = I
|
||||
source2.blood_DNA = list()
|
||||
if(source2.icon_old)
|
||||
var/icon/I = new /icon(source2.icon_old, source2.icon_state)
|
||||
source2.icon = I
|
||||
else
|
||||
source2.icon = initial(icon)
|
||||
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(!src.fingerprints)
|
||||
src.fingerprints = list()
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = src
|
||||
M.update_clothing()
|
||||
return
|
||||
|
||||
/atom/MouseDrop(atom/over_object as mob|obj|turf|area)
|
||||
|
||||
@@ -3,11 +3,71 @@
|
||||
var/unique_enzymes = null
|
||||
var/struc_enzymes = null
|
||||
var/uni_identity = null
|
||||
var/b_type = "A+"
|
||||
|
||||
/datum/dna/proc/check_integrity()
|
||||
//Lazy.
|
||||
if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
|
||||
if(length(struc_enzymes)!= 42) struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4000"
|
||||
/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character)
|
||||
if(character)
|
||||
if(length(uni_identity) != 39)
|
||||
//Lazy.
|
||||
var/temp
|
||||
var/hair = 0
|
||||
var/beard
|
||||
|
||||
// determine DNA fragment from hairstyle
|
||||
// :wtc:
|
||||
|
||||
var/list/styles = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
|
||||
var/hrange = round(4095 / styles.len)
|
||||
|
||||
if(character.hair_style)
|
||||
var/style = styles.Find(character.hair_style.type)
|
||||
if(style)
|
||||
hair = style * hrange - rand(1,hrange-1)
|
||||
|
||||
// Beard dna code - mostly copypasted from hair code to allow for more dynamic facial hair style additions
|
||||
var/list/face_styles = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
|
||||
var/f_hrange = round(4095 / face_styles.len)
|
||||
|
||||
var/f_style = face_styles.Find(character.facial_hair_style.type)
|
||||
if(f_style)
|
||||
beard = f_style * f_hrange - rand(1,f_hrange-1)
|
||||
else
|
||||
beard = 0
|
||||
|
||||
temp = add_zero2(num2hex((character.r_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_hair),1), 3)
|
||||
temp += add_zero2(num2hex((character.r_facial),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_facial),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_facial),1), 3)
|
||||
temp += add_zero2(num2hex(((character.s_tone + 220) * 16),1), 3)
|
||||
temp += add_zero2(num2hex((character.r_eyes),1), 3)
|
||||
temp += add_zero2(num2hex((character.g_eyes),1), 3)
|
||||
temp += add_zero2(num2hex((character.b_eyes),1), 3)
|
||||
|
||||
var/gender
|
||||
|
||||
if (character.gender == MALE)
|
||||
gender = add_zero2(num2hex((rand(1,(2050+BLOCKADD))),1), 3)
|
||||
else
|
||||
gender = add_zero2(num2hex((rand((2051+BLOCKADD),4094)),1), 3)
|
||||
|
||||
temp += gender
|
||||
temp += add_zero2(num2hex((beard),1), 3)
|
||||
temp += add_zero2(num2hex((hair),1), 3)
|
||||
|
||||
uni_identity = temp
|
||||
if(length(struc_enzymes)!= 42)
|
||||
var/mutstring = ""
|
||||
for(var/i = 1, i <= 13, i++)
|
||||
mutstring += add_zero2(num2hex(rand(1,1024)),3)
|
||||
|
||||
struc_enzymes = mutstring
|
||||
if(length(unique_enzymes) != 32)
|
||||
unique_enzymes = md5(character.real_name)
|
||||
else
|
||||
if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
|
||||
if(length(struc_enzymes)!= 42) struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4000"
|
||||
|
||||
/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
|
||||
|
||||
@@ -61,7 +121,9 @@
|
||||
|
||||
uni_identity = temp
|
||||
|
||||
var/mutstring = "2013E85C944C19A4B00185144725785DC6406A4508"
|
||||
var/mutstring = ""
|
||||
for(var/i = 1, i <= 13, i++)
|
||||
mutstring += add_zero2(num2hex(rand(1,1024)),3)
|
||||
|
||||
struc_enzymes = mutstring
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
CIG.light("")
|
||||
H.equip_if_possible(CIG, H.slot_wear_mask)
|
||||
H.equip_if_possible(new /obj/item/clothing/gloves/black(H), H.slot_gloves)
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/fcard_kit(H.back), H.slot_in_backpack)
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/box/evidence(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/clothing/suit/det_suit(H), H.slot_wear_suit)
|
||||
H.equip_if_possible(new /obj/item/device/detective_scanner(H), H.slot_in_backpack)
|
||||
|
||||
@@ -805,8 +805,7 @@
|
||||
H.apply_damage(0.5*damage, BRUTE, "r_arm")
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/B = new(src.loc)
|
||||
B.blood_DNA = H.dna.unique_enzymes
|
||||
B.blood_type = H.b_type
|
||||
B.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
|
||||
|
||||
bloodiness += 4
|
||||
|
||||
|
||||
@@ -14,21 +14,31 @@
|
||||
a_id = null
|
||||
temp = null
|
||||
printing = null
|
||||
can_change_id = 0
|
||||
list/Perp
|
||||
tempname = null
|
||||
|
||||
|
||||
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob)
|
||||
if(istype(O, /obj/item/weapon/card/id) && !scan)
|
||||
usr.drop_item()
|
||||
O.loc = src
|
||||
scan = O
|
||||
user << "You insert [O]."
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/secure_data/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/secure_data/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
//Someone needs to break down the dat += into chunks instead of long ass lines.
|
||||
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
var/dat
|
||||
|
||||
if (temp)
|
||||
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
|
||||
else
|
||||
@@ -36,15 +46,57 @@
|
||||
if (authenticated)
|
||||
switch(screen)
|
||||
if(1.0)
|
||||
dat += text("<A href='?src=\ref[];choice=Search Records'>Search Records</A><BR>\n<A href='?src=\ref[];choice=List Records'>List Records</A><BR>\n<A href='?src=\ref[];choice=Search Fingerprints'>Search Fingerprints</A><BR>\n<A href='?src=\ref[];choice=New Record (General)'>New General Record</A><BR>\n<BR>\n<A href='?src=\ref[];choice=Record Maintenance'>Record Maintenance</A><BR>\n<A href='?src=\ref[];choice=Log Out'>{Log Out}</A><BR>\n", src, src, src, src, src, src)
|
||||
if(2.0)
|
||||
dat += "<B>Record List</B>:<HR>"
|
||||
dat += {"
|
||||
<p style='text-align:center;'>"}
|
||||
dat += text("<A href='?src=\ref[];choice=Search Records'>Search Records</A><BR>", src)
|
||||
dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
|
||||
dat += {"
|
||||
</p>
|
||||
<table style="text-align:center;" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Records:</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>ID</th>
|
||||
<th>Rank</th>
|
||||
<th>Fingerprints</th>
|
||||
<th>Criminal Status</th>
|
||||
</tr>"}
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
dat += text("<A href='?src=\ref[src];choice=Browse Record;d_rec=\ref[R]'>[R.fields["id"]]: [R.fields["name"]] - [R.fields["rank"]]<BR>")
|
||||
dat += text("<HR><A href='?src=\ref[];choice=Return'>Back</A>", src)
|
||||
var/crimstat = ""
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
|
||||
crimstat = E.fields["criminal"]
|
||||
var/background
|
||||
switch(crimstat)
|
||||
if("*Arrest*")
|
||||
background = "'background-color:#DC143C;'"
|
||||
if("Incarcerated")
|
||||
background = "'background-color:#CD853F;'"
|
||||
if("Parolled")
|
||||
background = "'background-color:#CD853F;'"
|
||||
if("Released")
|
||||
background = "'background-color:#3BB9FF;'"
|
||||
if("None")
|
||||
background = "'background-color:#00FF7F;'"
|
||||
if("")
|
||||
background = "'background-color:#FFFFFF;'"
|
||||
crimstat = "No Record."
|
||||
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
||||
dat += text("<td>[]</td>", R.fields["id"])
|
||||
dat += text("<td>[]</td>", R.fields["rank"])
|
||||
dat += text("<td>[]</td>", R.fields["fingerprint"])
|
||||
dat += text("<td>[]</td></tr>", crimstat)
|
||||
dat += "</table><hr width='75%' />"
|
||||
dat += text("<A href='?src=\ref[];choice=Record Maintenance'>Record Maintenance</A><br><br>", src)
|
||||
dat += text("<A href='?src=\ref[];choice=Log Out'>{Log Out}</A>",src)
|
||||
if(2.0)
|
||||
dat += "<B>Records Maintenance</B><HR>"
|
||||
dat += "<BR><A href='?src=\ref[src];choice=Delete All Records'>Delete All Records</A><BR><BR><A href='?src=\ref[src];choice=Return'>Back</A>"
|
||||
if(3.0)
|
||||
dat += text("<B>Records Maintenance</B><HR>\n<A href='?src=\ref[];choice=Delete All Records'>Delete All Records</A><BR>\n<BR>\n<A href='?src=\ref[];choice=Return'>Back</A>", src, src)
|
||||
if(4.0)
|
||||
dat += "<CENTER><B>Security Record</B></CENTER><BR>"
|
||||
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
|
||||
dat += text("Name: <A href='?src=\ref[];choice=Edit Field;field=name'>[]</A> ID: <A href='?src=\ref[];choice=Edit Field;field=id'>[]</A><BR>\nSex: <A href='?src=\ref[];choice=Edit Field;field=sex'>[]</A><BR>\nAge: <A href='?src=\ref[];choice=Edit Field;field=age'>[]</A><BR>\nRank: <A href='?src=\ref[];choice=Edit Field;field=rank'>[]</A><BR>\nFingerprint: <A href='?src=\ref[];choice=Edit Field;field=fingerprint'>[]</A><BR>\nPhysical Status: []<BR>\nMental Status: []<BR>", src, active1.fields["name"], src, active1.fields["id"], src, active1.fields["sex"], src, active1.fields["age"], src, active1.fields["rank"], src, active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"])
|
||||
@@ -62,14 +114,60 @@
|
||||
dat += "<B>Security Record Lost!</B><BR>"
|
||||
dat += text("<A href='?src=\ref[];choice=New Record (Security)'>New Security Record</A><BR><BR>", src)
|
||||
dat += text("\n<A href='?src=\ref[];choice=Delete Record (ALL)'>Delete Record (ALL)</A><BR><BR>\n<A href='?src=\ref[];choice=Print Record'>Print Record</A><BR>\n<A href='?src=\ref[];choice=Return'>Back</A><BR>", src, src, src)
|
||||
if(4.0)
|
||||
if(!Perp.len)
|
||||
dat += text("ERROR. String could not be located.<br><br><A href='?src=\ref[];choice=Return'>Back</A>", src)
|
||||
else
|
||||
dat += {"
|
||||
<table style="text-align:center;" cellspacing="0" width="100%">
|
||||
<tr> "}
|
||||
dat += text("<th>Search Results for '[]':</th>", tempname)
|
||||
dat += {"
|
||||
</tr>
|
||||
</table>
|
||||
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>ID</th>
|
||||
<th>Rank</th>
|
||||
<th>Fingerprints</th>
|
||||
<th>Criminal Status</th>
|
||||
</tr> "}
|
||||
for(var/i=1, i<=Perp.len, i += 2)
|
||||
var/crimstat = ""
|
||||
var/datum/data/record/R = Perp[i]
|
||||
if(istype(Perp[i+1],/datum/data/record/))
|
||||
var/datum/data/record/E = Perp[i+1]
|
||||
crimstat = E.fields["criminal"]
|
||||
var/background
|
||||
switch(crimstat)
|
||||
if("*Arrest*")
|
||||
background = "'background-color:#DC143C;'"
|
||||
if("Incarcerated")
|
||||
background = "'background-color:#CD853F;'"
|
||||
if("Parolled")
|
||||
background = "'background-color:#CD853F;'"
|
||||
if("Released")
|
||||
background = "'background-color:#3BB9FF;'"
|
||||
if("None")
|
||||
background = "'background-color:#00FF7F;'"
|
||||
if("")
|
||||
background = "'background-color:#FFFFFF;'"
|
||||
crimstat = "No Record."
|
||||
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
||||
dat += text("<td>[]</td>", R.fields["id"])
|
||||
dat += text("<td>[]</td>", R.fields["rank"])
|
||||
dat += text("<td>[]</td>", R.fields["fingerprint"])
|
||||
dat += text("<td>[]</td></tr>", crimstat)
|
||||
dat += "</table><hr width='75%' />"
|
||||
dat += text("<br><A href='?src=\ref[];choice=Return'>Return to index.</A>", src)
|
||||
else
|
||||
else
|
||||
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
|
||||
user << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec")
|
||||
user << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec;size=600x400")
|
||||
onclose(user, "secure_rec")
|
||||
return
|
||||
|
||||
|
||||
/*Revised /N
|
||||
I can't be bothered to look more of the actual code outside of switch but that probably needs revising too.
|
||||
What a mess.*/
|
||||
@@ -94,7 +192,10 @@ What a mess.*/
|
||||
|
||||
if("Confirm Identity")
|
||||
if (scan)
|
||||
scan.loc = loc
|
||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
||||
usr.put_in_hand(scan)
|
||||
else
|
||||
scan.loc = get_turf(src)
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.equipped()
|
||||
@@ -124,31 +225,32 @@ What a mess.*/
|
||||
rank = scan.assignment
|
||||
screen = 1
|
||||
//RECORD FUNCTIONS
|
||||
if("List Records")
|
||||
screen = 2
|
||||
active1 = null
|
||||
active2 = null
|
||||
|
||||
if("Search Records")
|
||||
var/t1 = input("Search String: (Name or ID)", "Secure. records", null, null) as text
|
||||
var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text
|
||||
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !in_range(src, usr)))
|
||||
return
|
||||
active1 = null
|
||||
active2 = null
|
||||
Perp = new/list()
|
||||
t1 = lowertext(t1)
|
||||
var/list/components = dd_text2list(t1, " ")
|
||||
if(components.len > 5)
|
||||
return //Lets not let them search too greedily.
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"])))
|
||||
active1 = R
|
||||
if (!( active1 ))
|
||||
temp = text("Could not locate record [].", t1)
|
||||
else
|
||||
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"] + " " + R.fields["rank"]
|
||||
for(var/i = 1, i<=components.len, i++)
|
||||
if(findtext(temptext,components[i]))
|
||||
var/prelist = new/list(2)
|
||||
prelist[1] = R
|
||||
Perp += prelist
|
||||
for(var/i = 1, i<=Perp.len, i+=2)
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
if ((E.fields["name"] == active1.fields["name"] || E.fields["id"] == active1.fields["id"]))
|
||||
active2 = E
|
||||
screen = 4
|
||||
var/datum/data/record/R = Perp[i]
|
||||
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
|
||||
Perp[i+1] = E
|
||||
tempname = t1
|
||||
screen = 4
|
||||
|
||||
if("Record Maintenance")
|
||||
screen = 3
|
||||
screen = 2
|
||||
active1 = null
|
||||
active2 = null
|
||||
|
||||
@@ -163,9 +265,9 @@ What a mess.*/
|
||||
S = E
|
||||
active1 = R
|
||||
active2 = S
|
||||
screen = 4
|
||||
screen = 3
|
||||
|
||||
if ("Search Fingerprints")
|
||||
/* if ("Search Fingerprints")
|
||||
var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
|
||||
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!in_range(src, usr)) && (!istype(usr, /mob/living/silicon))))
|
||||
return
|
||||
@@ -181,7 +283,7 @@ What a mess.*/
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
if ((E.fields["name"] == active1.fields["name"] || E.fields["id"] == active1.fields["id"]))
|
||||
active2 = E
|
||||
screen = 4
|
||||
screen = 3 */
|
||||
|
||||
if ("Print Record")
|
||||
if (!( printing ))
|
||||
@@ -202,7 +304,7 @@ What a mess.*/
|
||||
else
|
||||
P.info += "<B>Security Record Lost!</B><BR>"
|
||||
P.info += "</TT>"
|
||||
P.name = "paper- 'Security Record'"
|
||||
P.name = "paper - 'Security Record'"
|
||||
printing = null
|
||||
//RECORD DELETE
|
||||
if ("Delete All Records")
|
||||
@@ -258,7 +360,7 @@ What a mess.*/
|
||||
R.fields["notes"] = "No notes."
|
||||
data_core.security += R
|
||||
active2 = R
|
||||
screen = 4
|
||||
screen = 3
|
||||
|
||||
if ("New Record (General)")
|
||||
var/datum/data/record/G = new /datum/data/record()
|
||||
@@ -273,6 +375,7 @@ What a mess.*/
|
||||
data_core.general += G
|
||||
active1 = G
|
||||
active2 = null
|
||||
|
||||
//FIELD FUNCTIONS
|
||||
if ("Edit Field")
|
||||
var/a1 = active1
|
||||
@@ -366,6 +469,8 @@ What a mess.*/
|
||||
if ("Change Rank")
|
||||
if (active1)
|
||||
active1.fields["rank"] = href_list["rank"]
|
||||
if(href_list["rank"] in get_all_jobs())
|
||||
active1.fields["real_rank"] = href_list["real_rank"]
|
||||
|
||||
if ("Change Criminal Status")
|
||||
if (active2)
|
||||
@@ -386,22 +491,20 @@ What a mess.*/
|
||||
del(active2)
|
||||
|
||||
if ("Delete Record (ALL) Execute")
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
||||
del(R)
|
||||
else
|
||||
if (active1)
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
||||
del(R)
|
||||
else
|
||||
del(active1)
|
||||
if (active2)
|
||||
del(active2)
|
||||
if (active1)
|
||||
del(active1)
|
||||
else
|
||||
temp = "This function does not appear to be working at the moment. Our apologies."
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/secure_data/detective_computer
|
||||
icon = 'computer.dmi'
|
||||
icon_state = "messyfiles"
|
||||
|
||||
@@ -557,8 +557,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
R.word2 = w2
|
||||
R.word3 = w3
|
||||
R.check_icon()
|
||||
R.blood_DNA = H.dna.unique_enzymes
|
||||
R.blood_type = H.b_type
|
||||
R.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
|
||||
return
|
||||
else
|
||||
user << "The book seems full of illegible scribbles. Is this a joke?"
|
||||
@@ -603,8 +602,7 @@ 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 = H.dna.unique_enzymes
|
||||
R.blood_type = H.b_type
|
||||
R.blood_DNA = list(list(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")
|
||||
|
||||
@@ -903,7 +903,7 @@ var/list/sacrificed = list()
|
||||
culcount++
|
||||
if(culcount >= 5)
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(R.blood_DNA == src.blood_DNA && R.blood_type == src.blood_type)
|
||||
if(R.blood_DNA == src.blood_DNA)
|
||||
for(var/mob/living/M in orange(2,R))
|
||||
M.take_overall_damage(0,15)
|
||||
if (R.invisibility>M.see_invisible)
|
||||
@@ -913,7 +913,7 @@ var/list/sacrificed = list()
|
||||
var/turf/T = get_turf(R)
|
||||
T.hotspot_expose(700,125)
|
||||
for(var/obj/effect/decal/cleanable/blood/B in world)
|
||||
if(B.blood_DNA == src.blood_DNA && B.blood_type == src.blood_type)
|
||||
if(B.blood_DNA == src.blood_DNA)
|
||||
for(var/mob/living/M in orange(1,B))
|
||||
M.take_overall_damage(0,5)
|
||||
M << "\red Blood suddenly ignites, burning you!"
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -766,12 +766,14 @@
|
||||
user << "\blue No fingerprints found on [C]"
|
||||
else
|
||||
user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]")
|
||||
if ( !(C:blood_DNA) )
|
||||
if ( !(C:blood_DNA.len) )
|
||||
user << "\blue No blood found on [C]"
|
||||
else
|
||||
user << "\blue Blood found on [C]. Analysing..."
|
||||
spawn(15)
|
||||
user << "\blue Blood type: [C:blood_type]\nDNA: [C:blood_DNA]"
|
||||
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]]"
|
||||
|
||||
if(4)
|
||||
for (var/mob/O in viewers(C, null))
|
||||
@@ -789,10 +791,20 @@
|
||||
if (!A.fingerprints)
|
||||
user << "\blue Unable to locate any fingerprints on [A]!"
|
||||
else
|
||||
var/list/L = params2list(A:fingerprints)
|
||||
user << "\blue Isolated [L.len] fingerprints."
|
||||
for(var/i in L)
|
||||
user << "\blue \t [i]"
|
||||
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"
|
||||
else
|
||||
user << "\blue Found [complete_prints.len] intact prints"
|
||||
for(var/i in complete_prints)
|
||||
user << "\blue " + i
|
||||
|
||||
if(3)
|
||||
if(!isnull(A.reagents))
|
||||
|
||||
@@ -59,111 +59,209 @@ 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 = "forensic0"
|
||||
icon_state = "forensic1"
|
||||
var/amount = 20.0
|
||||
var/printing = 0.0
|
||||
// var/printing = 0.0
|
||||
var/list/stored = list()
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY
|
||||
|
||||
|
||||
/obj/item/device/detective_scanner/attackby(obj/item/weapon/f_card/W as obj, mob/user as mob)
|
||||
..()
|
||||
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)
|
||||
src.add_fingerprint(user)
|
||||
if (W)
|
||||
W.add_fingerprint(user)
|
||||
return
|
||||
|
||||
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
|
||||
// attack_self(mob/user as mob)
|
||||
// src.printing = !( src.printing )
|
||||
// if(src.printing)
|
||||
// user << "\blue Printing turned on"
|
||||
// else
|
||||
// user << "\blue Printing turned off"
|
||||
// src.icon_state = text("forensic[]", src.printing)
|
||||
// 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
|
||||
src.amount += W.amount
|
||||
//W = null
|
||||
del(W)
|
||||
if (src.amount < 1)
|
||||
user << text("\blue Fingerprints scanned on [M]. Need more cards to print.")
|
||||
// src.printing = 0
|
||||
// src.icon_state = text("forensic[]", src.printing)
|
||||
// if (src.printing)
|
||||
else
|
||||
src.amount--
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
F.amount = 1
|
||||
F.fingerprints += md5(M.dna.uni_identity)
|
||||
F.icon_state = "fingerprint1"
|
||||
F.name = text("FPrintC- '[M.name]'")
|
||||
|
||||
user << "\blue Done printing."
|
||||
user << text("\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]")
|
||||
if ( !(M.blood_DNA.len) )
|
||||
user << "\blue No blood found on [M]"
|
||||
else
|
||||
user << "\blue Blood found on [M]. Analysing..."
|
||||
spawn(15)
|
||||
for(var/i = 1, i <= M.blood_DNA.len, i++)
|
||||
var/list/templist = M.blood_DNA[i]
|
||||
user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]"
|
||||
return
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(!(locate(A) in oview(1,user)))
|
||||
return
|
||||
if(src.loc != user)
|
||||
return 0
|
||||
if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit.
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/f_card))
|
||||
user << "Haha, nice try. Cheater. (It would break stuff anyways.)"
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (W)
|
||||
W.add_fingerprint(user)
|
||||
return
|
||||
if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune))
|
||||
if(!isnull(A.blood_DNA.len))
|
||||
for(var/i = 1, i <= A.blood_DNA.len, i++)
|
||||
var/list/templist = A.blood_DNA[i]
|
||||
user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]"
|
||||
return
|
||||
var/duplicate = 0
|
||||
if ((!A.fingerprints || A.fingerprints.len == 0) && !(A.suit_fibers) && !(A.blood_DNA.len))
|
||||
user << "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!"
|
||||
return 0
|
||||
else if (A.blood_DNA.len)
|
||||
user << "\blue Blood found on [A]. Analysing..."
|
||||
sleep(15)
|
||||
if(!duplicate)
|
||||
duplicate = 1
|
||||
var/i = add_data(A)
|
||||
if(i)
|
||||
user << "\blue Blood already in memory."
|
||||
for(var/i = 1, i < (A.blood_DNA.len + 1), i++)
|
||||
var/list/templist = A.blood_DNA[i]
|
||||
user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]"
|
||||
else
|
||||
user << "\blue No Blood Located"
|
||||
if(!A.fingerprints || A.fingerprints.len == 0)
|
||||
user << "\blue No Fingerprints Located."
|
||||
else
|
||||
user << text("\blue Isolated [A.fingerprints.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve.")
|
||||
if(!duplicate)
|
||||
duplicate = 1
|
||||
var/i = add_data(A)
|
||||
if(i)
|
||||
user << "\blue Fingerprints already in memory."
|
||||
if(!A.suit_fibers)
|
||||
user << "\blue No Fibers/Materials Located."
|
||||
else
|
||||
user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve."
|
||||
|
||||
/obj/item/device/detective_scanner/attack_self(mob/user as mob)
|
||||
if(!duplicate)
|
||||
duplicate = 1
|
||||
var/i = add_data(A)
|
||||
if(i)
|
||||
user << "\blue Fibers/Materials already in memory."
|
||||
// else
|
||||
// if ((src.amount < 1 && src.printing))
|
||||
// user << "\blue Fingerprints found. Need more cards to print."
|
||||
// src.printing = 0
|
||||
// src.icon_state = text("forensic[]", src.printing)
|
||||
// if (src.printing)
|
||||
// src.amount--
|
||||
// var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
// F.amount = 1
|
||||
// F.fingerprints = A.fingerprints
|
||||
// F.icon_state = "fingerprint1"
|
||||
// user << "\blue Done printing."
|
||||
// for(var/i in L)
|
||||
// user << text("\blue \t [i]")
|
||||
// //Foreach goto(186)
|
||||
return
|
||||
|
||||
src.printing = !( src.printing )
|
||||
if(src.printing)
|
||||
user << "\blue Printing turned on"
|
||||
else
|
||||
user << "\blue Printing turned off"
|
||||
src.icon_state = text("forensic[]", src.printing)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/device/detective_scanner/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 && src.printing))
|
||||
user << text("\blue Fingerprints scanned on [M]. Need more cards to print.")
|
||||
src.printing = 0
|
||||
src.icon_state = text("forensic[]", src.printing)
|
||||
if (src.printing)
|
||||
src.amount--
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
F.amount = 1
|
||||
F.fingerprints = md5(M.dna.uni_identity)
|
||||
F.icon_state = "fingerprint1"
|
||||
F.name = text("FPrintC- '[M.name]'")
|
||||
user << "\blue Done printing."
|
||||
user << text("\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]")
|
||||
if ( !(M.blood_DNA) )
|
||||
user << "\blue No blood found on [M]"
|
||||
else
|
||||
user << "\blue Blood found on [M]. Analysing..."
|
||||
spawn(15)
|
||||
user << "\blue Blood type: [M.blood_type]\nDNA: [M.blood_DNA]"
|
||||
return
|
||||
|
||||
/obj/item/device/detective_scanner/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if (istype(A, /obj/effect/decal/cleanable/blood) || istype(A, /obj/effect/rune))
|
||||
if(A.blood_DNA)
|
||||
user << "\blue Blood type: [A.blood_type]\nDNA: [A.blood_DNA]"
|
||||
else if (A.blood_DNA)
|
||||
user << "\blue Blood found on [A]. Analysing..."
|
||||
sleep(15)
|
||||
user << "\blue Blood type: [A.blood_type]\nDNA: [A.blood_DNA]"
|
||||
else
|
||||
user << "\blue No blood found on [A]."
|
||||
if (!( A.fingerprints ))
|
||||
user << "\blue Unable to locate any fingerprints on [A]!"
|
||||
return 0
|
||||
else
|
||||
if ((src.amount < 1 && src.printing))
|
||||
user << "\blue Fingerprints found. Need more cards to print."
|
||||
src.printing = 0
|
||||
src.icon_state = text("forensic[]", src.printing)
|
||||
if (src.printing)
|
||||
src.amount--
|
||||
var/obj/item/weapon/f_card/F = new /obj/item/weapon/f_card( user.loc )
|
||||
F.amount = 1
|
||||
F.fingerprints = A.fingerprints
|
||||
F.icon_state = "fingerprint1"
|
||||
user << "\blue Done printing."
|
||||
var/list/L = params2list(A.fingerprints)
|
||||
user << text("\blue Isolated [L.len] fingerprints.")
|
||||
for(var/i in L)
|
||||
user << text("\blue \t [i]")
|
||||
//Foreach goto(186)
|
||||
return
|
||||
proc/add_data(atom/A as mob|obj|turf|area)
|
||||
var/merged = 0
|
||||
for(var/i = 1, i < (stored.len + 1), i++) //Lets see if the object is already in there!
|
||||
var/list/temp = stored[i]
|
||||
var/atom/checker = temp[1]
|
||||
if(checker.original_atom == A || checker.original_atom == A.original_atom) //It is! Merge!
|
||||
merged = 1
|
||||
var/list/prints = temp[2]
|
||||
if(!prints)
|
||||
prints = list()
|
||||
if(A.fingerprints && A.fingerprints.len)
|
||||
for(var/j = 1, j <= A.fingerprints.len, j++) //Fingerprints~~~
|
||||
var/list/print_test1 = params2list(A.fingerprints[j])
|
||||
var/test_print1 = print_test1[num2text(1)]
|
||||
var/found = 0
|
||||
for(var/k = 1, k <= prints.len, k++) //Lets see if the print is already in there
|
||||
var/list/print_test2 = params2list(prints[k])
|
||||
var/test_print2 = print_test2[num2text(1)]
|
||||
if(test_print2 == test_print1) //It is! Merge!
|
||||
prints[k] = test_print2 + "&" + stringmerge(print_test2[num2text(2)],print_test1[num2text(2)])
|
||||
found = 1
|
||||
break //We found it, we're done here.
|
||||
if(!found) //It isn't! Add!
|
||||
prints += A.fingerprints[j]
|
||||
var/list/fibers = temp[3]
|
||||
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 = temp[4]
|
||||
if(!blood)
|
||||
blood = list()
|
||||
if(A.blood_DNA.len && A.blood_DNA)
|
||||
for(var/j = 1, j <= A.blood_DNA.len, j++) //Blood~~~
|
||||
if(!blood.Find(A.blood_DNA[j])) //It isn't! Add!
|
||||
blood += A.blood_DNA[j]
|
||||
var/list/sum_list[4] //Pack it back up!
|
||||
sum_list[1] = checker
|
||||
sum_list[2] = prints
|
||||
sum_list[3] = fibers
|
||||
sum_list[4] = blood
|
||||
stored[i] = sum_list //Store it!
|
||||
break //We found it, we're done here.
|
||||
if(!merged) //Uh, oh! New data point!
|
||||
var/list/sum_list[4] //Pack it back up!
|
||||
sum_list[1] = A.get_duplicate(src)
|
||||
if(!A.fingerprints)
|
||||
world << "Report this to a dev! [A] was lacking a list() for fingerprints!"
|
||||
sum_list[2] = list()
|
||||
else
|
||||
sum_list[2] = A.fingerprints
|
||||
sum_list[3] = A.suit_fibers
|
||||
sum_list[4] = A.blood_DNA
|
||||
stored.len++
|
||||
stored[stored.len] = sum_list
|
||||
return merged
|
||||
|
||||
|
||||
/obj/item/device/healthanalyzer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//HUMANS
|
||||
|
||||
/proc/gibs(atom/location, var/list/viruses)
|
||||
new /obj/effect/gibspawner/human(get_turf(location),viruses)
|
||||
/proc/gibs(atom/location, var/list/viruses, var/datum/dna/MobDNA)
|
||||
new /obj/effect/gibspawner/human(get_turf(location),viruses,MobDNA)
|
||||
|
||||
/proc/xgibs(atom/location, var/list/viruses)
|
||||
new /obj/effect/gibspawner/xeno(get_turf(location),viruses)
|
||||
@@ -16,13 +16,13 @@
|
||||
var/list/gibamounts = list()
|
||||
var/list/gibdirections = list() //of lists
|
||||
|
||||
New(location, var/list/viruses)
|
||||
New(location, var/list/viruses, var/datum/dna/MobDNA)
|
||||
..()
|
||||
|
||||
if(istype(loc,/turf)) //basically if a badmin spawns it
|
||||
Gib(loc,viruses)
|
||||
Gib(loc,viruses,MobDNA)
|
||||
|
||||
proc/Gib(atom/location, var/list/viruses = list())
|
||||
proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
world << "\red Gib list length mismatch!"
|
||||
return
|
||||
@@ -50,6 +50,12 @@
|
||||
gib.viruses += viruus
|
||||
viruus.holder = gib
|
||||
viruus.spread_type = CONTACT_FEET
|
||||
if(MobDNA)
|
||||
gib.blood_DNA = list(list(MobDNA.unique_enzymes, MobDNA.b_type))
|
||||
else if(istype(src, /obj/effect/gibspawner/xeno))
|
||||
gib.blood_DNA = list(list("UNKNOWN DNA", "X*"))
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA = list(list("Non-human DNA", "A+"))
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
t = "huge"
|
||||
else
|
||||
if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking"
|
||||
usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t)
|
||||
usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA.len ? "" : "bloody ",src, src.name, t)
|
||||
if(src.desc)
|
||||
usr << src.desc
|
||||
return
|
||||
|
||||
@@ -716,4 +716,46 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
"}
|
||||
|
||||
|
||||
/obj/item/weapon/book/manual/detective
|
||||
name = "The Film Noir: Proper Procedures for Investigations"
|
||||
icon_state ="bookHacking"
|
||||
author = "NanoTrasen"
|
||||
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
h2 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Detective Work</h3>
|
||||
|
||||
Between your bouts of self-narration, and drinking whiskey on the rocks, you might get a case or two to solve.<br>
|
||||
To have the best chance to solve your case, follow these directions:
|
||||
<p>
|
||||
<ol>
|
||||
<li>Go to the crime scene. </li>
|
||||
<li>Take your scanner and scan EVERYTHING (Yes, the doors, the tables, even the dog.) </li>
|
||||
<li>Once you are reasonably certain you have every scrap of evidence you can use, find all possible entry points and scan them, too. </li>
|
||||
<li>Return to your office. </li>
|
||||
<li>Using your forensic scanning computer, scan your Scanner to upload all of your evidence into the database.</li>
|
||||
<li>Browse through the resulting dossiers, looking for the one that either has the most complete set of prints, or the most suspicious items handled. </li>
|
||||
<li>If you have 80% or more of the print (The print is displayed) go to step 10, otherwise continue to step 8.</li>
|
||||
<li>Look for clues from the suit fibres you found on your perp, and go about looking for more evidence with this new information, scanning as you go. </li>
|
||||
<li>Try to get a fingerprint card of your perp, as if used in the computer, the prints will be completed on their dossier.</li>
|
||||
<li>Assuming you have enough of a print to see it, grab the biggest complete piece of the print and search the security records for it. </li>
|
||||
<li>Since you now have both your dossier and the name of the person, print both out as evidence, and get security to nab your baddie.</li>
|
||||
<li>Give yourself a pat on the back and a bottle of the ships finest vodka, you did it!. </li>
|
||||
</ol>
|
||||
<p>
|
||||
It really is that easy! Good luck!
|
||||
|
||||
</body>
|
||||
</html>"}
|
||||
@@ -82,7 +82,6 @@
|
||||
|
||||
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
|
||||
src.blood_DNA = from.blood_DNA
|
||||
src.blood_type = from.blood_type
|
||||
src.fingerprints = from.fingerprints
|
||||
src.fingerprintshidden = from.fingerprintshidden
|
||||
src.fingerprintslast = from.fingerprintslast
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
verbs += /client/proc/everyone_random
|
||||
verbs += /client/proc/only_one // Fateweaver suggested I do this - Doohl
|
||||
verbs += /client/proc/deadmin_self
|
||||
verbs += /client/proc/cmd_debug_prints
|
||||
verbs += /client/proc/cmd_debug_blood
|
||||
|
||||
if (holder.level >= 5)//Game Admin********************************************************************
|
||||
verbs += /obj/admins/proc/view_txt_log
|
||||
@@ -417,6 +419,8 @@
|
||||
verbs -= /client/proc/jumptocoord
|
||||
verbs -= /client/proc/everyone_random
|
||||
verbs -= /client/proc/cmd_switch_radio
|
||||
verbs -= /client/proc/cmd_debug_prints
|
||||
verbs -= /client/proc/cmd_debug_blood
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -716,3 +716,73 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
M.update_clothing()
|
||||
return
|
||||
|
||||
/client/proc/cmd_debug_blood()
|
||||
set category = "Debug"
|
||||
set name = "Analyze all blood_DNA"
|
||||
|
||||
// to prevent REALLY stupid activations
|
||||
switch(alert("Are you sure?", ,"Yes", "No"))
|
||||
if("No")
|
||||
return
|
||||
world << "\red ALERT! \black Standby for high CPU bugtesting to determine missing blood_DNA values!"
|
||||
world << "\red THIS WILL PROBABLY LAG LIKE HELL."
|
||||
world << "Initiating in 10 BYOND seconds..."
|
||||
log_admin("[key_name(src)] has initiated a scan of all blood_DNA lists!")
|
||||
message_admins("[key_name_admin(src)] has initiated a scan of all blood_DNA lists!", 0)
|
||||
sleep(100)
|
||||
world << "\red SCAN INITIATED."
|
||||
spawn(0) //I am not stupid enough to leave that in a regular loop.
|
||||
for(var/atom/O in world)
|
||||
if(!islist(O.blood_DNA))
|
||||
var/turf/T = get_turf(O)
|
||||
if(istype(O.loc,/turf))
|
||||
src << "[O] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable! (Last touched by [O.fingerprintslast])"
|
||||
else
|
||||
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list blood_DNA variable! (Last touched by [O.fingerprintslast])"
|
||||
world << "\red SCAN COMPLETE."
|
||||
world << "Thank you for your patience."
|
||||
return
|
||||
|
||||
|
||||
/client/proc/cmd_debug_prints()
|
||||
set category = "Debug"
|
||||
set name = "Analyze all fingerprints"
|
||||
|
||||
// to prevent REALLY stupid activations
|
||||
switch(alert("Are you sure?", ,"Yes", "No"))
|
||||
if("No")
|
||||
return
|
||||
world << "\red ALERT! \black Standby for high CPU bugtesting to determine incorrect fingerprint values!"
|
||||
world << "\red THIS WILL PROBABLY LAG LIKE HELL."
|
||||
world << "Initiating in 10 BYOND seconds..."
|
||||
log_admin("[key_name(src)] has initiated a scan of all fingerprints!")
|
||||
message_admins("[key_name_admin(src)] has initiated a scan of all fingerprints!", 0)
|
||||
sleep(100)
|
||||
world << "\red SCAN INITIATED."
|
||||
spawn(0) //I am not stupid enough to leave that in a regular loop.
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, /mob)) //Lets not.
|
||||
continue
|
||||
if(!islist(O.fingerprints))
|
||||
var/turf/T = get_turf(O)
|
||||
if(istype(O.loc,/turf))
|
||||
src << "[O] at [T.x],[T.y],[T.z] has a non-list fingerprints variable! (Last touched by [O.fingerprintslast])"
|
||||
else
|
||||
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a non-list fingerprints variable! (Last touched by [O.fingerprintslast])"
|
||||
else if (O.fingerprints.len)
|
||||
for(var/i = 1, i <= O.fingerprints.len, i++)
|
||||
if(length(O.fingerprints[i]) != 69)
|
||||
var/turf/T = get_turf(O)
|
||||
if(isnull(T))
|
||||
src << "[O] at [O.loc] has a fingerprints variable of incorrect length! (TURF NOT FOUND). (Last touched by [O.fingerprintslast])"
|
||||
else
|
||||
if(istype(O.loc,/turf))
|
||||
src << "[O] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length! (Last touched by [O.fingerprintslast])"
|
||||
else
|
||||
src << "[O] in [O.loc] at [T.x],[T.y],[T.z] has a fingerprints variable of incorrect length! (Last touched by [O.fingerprintslast])"
|
||||
break
|
||||
|
||||
world << "\red SCAN COMPLETE."
|
||||
world << "Thank you for your patience."
|
||||
return
|
||||
|
||||
@@ -135,8 +135,7 @@ datum
|
||||
var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here
|
||||
if(!blood_prop) //first blood!
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
blood_prop.blood_type = self.data["blood_type"]
|
||||
blood_prop.blood_DNA = list(list(self.data["blood_DNA"],self.data["blood_type"]))
|
||||
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
@@ -148,7 +147,7 @@ datum
|
||||
var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T
|
||||
if(!blood_prop)
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
blood_prop.blood_DNA = list(list("Non-Human DNA","A+"))
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
blood_prop.viruses += newVirus
|
||||
@@ -165,7 +164,7 @@ datum
|
||||
var/obj/effect/decal/cleanable/xenoblood/blood_prop = locate() in T
|
||||
if(!blood_prop)
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
blood_prop.blood_DNA = list(list("UNKNOWN DNA STRUCTURE","X*"))
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
blood_prop.viruses += newVirus
|
||||
|
||||
@@ -933,7 +933,7 @@
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
if(istype(target, /mob/living/carbon/human))//I wish there was some hasproperty operation...
|
||||
var/mob/living/carbon/human/HT = target
|
||||
B.data["blood_type"] = copytext(HT.b_type,1,0)
|
||||
B.data["blood_type"] = copytext(HT.dna.b_type,1,0)
|
||||
var/list/temp_chem = list()
|
||||
for(var/datum/reagent/R in target.reagents.reagent_list)
|
||||
temp_chem += R.name
|
||||
|
||||
832
code/modules/detectivework/detective_work.dm
Normal file
832
code/modules/detectivework/detective_work.dm
Normal file
@@ -0,0 +1,832 @@
|
||||
//gloves w_uniform wear_suit shoes
|
||||
|
||||
atom/var/list/suit_fibers
|
||||
|
||||
atom/proc/add_fibers(mob/living/carbon/human/M)
|
||||
if(M.gloves)
|
||||
if(M.gloves.transfer_blood)
|
||||
if(add_blood(M.gloves.bloody_hands_mob))
|
||||
M.gloves.transfer_blood--
|
||||
//world.log << "[M.gloves] added blood to [src] from [M.gloves.bloody_hands_mob]"
|
||||
else if(M.bloody_hands)
|
||||
if(add_blood(M.bloody_hands_mob))
|
||||
M.bloody_hands--
|
||||
//world.log << "[M] added blood to [src] from [M.bloody_hands_mob]"
|
||||
if(!suit_fibers) suit_fibers = list()
|
||||
var/fibertext
|
||||
var/item_multiplier = istype(src,/obj/item)?1.2:1
|
||||
if(M.wear_suit)
|
||||
fibertext = "Material from \a [M.wear_suit]."
|
||||
if(prob(10*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
suit_fibers += fibertext
|
||||
if(!(M.wear_suit.body_parts_covered & 32))
|
||||
if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(12*item_multiplier) && !(fibertext in suit_fibers)) //Wearing a suit means less of the uniform exposed.
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
suit_fibers += fibertext
|
||||
if(!(M.wear_suit.body_parts_covered & 64))
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
suit_fibers += fibertext
|
||||
else if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(15*item_multiplier) && !(fibertext in suit_fibers))
|
||||
// "Added fibertext: [fibertext]"
|
||||
suit_fibers += fibertext
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
suit_fibers += "Material from a pair of [M.gloves.name]."
|
||||
else if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !(fibertext in suit_fibers))
|
||||
//world.log << "Added fibertext: [fibertext]"
|
||||
suit_fibers += "Material from a pair of [M.gloves.name]."
|
||||
if(!suit_fibers.len) del suit_fibers
|
||||
|
||||
atom/proc/get_duplicate(var/atom/location)
|
||||
var/atom/movable/temp_atom = new /atom/movable(location)
|
||||
temp_atom.name = src.name
|
||||
temp_atom.desc = src.desc
|
||||
temp_atom.icon = src.icon
|
||||
temp_atom.icon_state = src.icon_state
|
||||
temp_atom.fingerprints = src.fingerprints
|
||||
temp_atom.blood_DNA = src.blood_DNA
|
||||
temp_atom.suit_fibers = src.suit_fibers
|
||||
if(src.original_atom)
|
||||
temp_atom.original_atom = src.original_atom
|
||||
else
|
||||
temp_atom.original_atom = src
|
||||
return temp_atom
|
||||
|
||||
#define FINGERPRINT_COMPLETE 6 //This is the output of the stringpercent(print) proc, and means about 80% of
|
||||
//the print must be there for it to be complete. (Prints are 32 digits)
|
||||
|
||||
obj/machinery/computer/forensic_scanning
|
||||
name = "High-Res Forensic Scanning Computer"
|
||||
icon_state = "forensic"
|
||||
var
|
||||
obj/item/scanning
|
||||
temp = ""
|
||||
canclear = 1
|
||||
authenticated = 0
|
||||
|
||||
//Here's the structure for files: each entry is a list, and entry one in that list is the string of their
|
||||
//full and scrambled fingerprint. This acts as the method to arrange evidence. Each subsequent entry is list
|
||||
//in the form (from entries):
|
||||
// 1: Object
|
||||
// 2: All prints on the object
|
||||
// 3: All fibers on the object
|
||||
// 4: All blood on the object
|
||||
//This is then used to show what objects were used to "find" the full print, as well as the fibers on it.
|
||||
list/files
|
||||
//This holds objects (1) without prints, and their fibers(2) and blood(3).
|
||||
list/misc
|
||||
obj/item/weapon/f_card/card
|
||||
|
||||
scan_data = ""
|
||||
scan_name = ""
|
||||
scan_process = 0
|
||||
|
||||
req_access = list(access_forensics_lockers)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/book/manual/detective(get_turf(src))
|
||||
return
|
||||
|
||||
|
||||
attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
var/isai = 0
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
isai = 1
|
||||
if(temp)
|
||||
dat += "<tt>[temp]</tt><br><br>"
|
||||
if(canclear) dat += "<a href='?src=\ref[src];operation=clear'>{Clear Screen}</a>"
|
||||
else
|
||||
if(!authenticated)
|
||||
dat += "<a href='?src=\ref[src];operation=login'>{Log In}</a>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];operation=logout'>{Log Out}</a><br><hr><br>"
|
||||
if(scanning)
|
||||
if(scan_process)
|
||||
dat += "Scan Object: {[scanning.name]}<br>"
|
||||
dat += "<a href='?src=\ref[src];operation=cancel'>{Cancel Scan}</a> {Print}<br>"
|
||||
else
|
||||
if(isai) dat += "Scan Object: {[scanning.name]}<br>"
|
||||
else dat += "Scan Object: <a href='?src=\ref[src];operation=eject'>{[scanning.name]}</a><br>"
|
||||
dat += "<a href='?src=\ref[src];operation=scan'>{Scan}</a> <a href='?src=\ref[src];operation=print'>{Print}</a><br>"
|
||||
else
|
||||
if(isai) dat += "{No Object Inserted}<br>"
|
||||
else dat += "<a href='?src=\ref[src];operation=insert'>{No Object Inserted}</a><br>"
|
||||
dat += "{Scan} <a href='?src=\ref[src];operation=print'>{Print}</a><br>"
|
||||
dat += "<a href='?src=\ref[src];operation=database'>{Access Database}</a><br><br>"
|
||||
dat += "<tt>[scan_data]</tt>"
|
||||
if(scan_data && !scan_process)
|
||||
dat += "<br><a href='?src=\ref[src];operation=erase'>{Erase Data}</a>"
|
||||
user << browse(dat,"window=scanner")
|
||||
onclose(user,"scanner")
|
||||
|
||||
|
||||
Topic(href,href_list)
|
||||
switch(href_list["operation"])
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
if(istype(M,/mob/living/silicon))
|
||||
authenticated = 1
|
||||
updateDialog()
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
if (I && istype(I))
|
||||
if(src.check_access(I))
|
||||
authenticated = 1
|
||||
//usr << "\green Access Granted"
|
||||
//if(!authenticated)
|
||||
//usr << "\red Access Denied"
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
if("clear")
|
||||
if(canclear)
|
||||
temp = null
|
||||
if("eject")
|
||||
if(scanning)
|
||||
scanning.loc = loc
|
||||
scanning = null
|
||||
else
|
||||
temp = "Eject Failed: No Object"
|
||||
if("insert")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
if(I && istype(I))
|
||||
if(istype(I, /obj/item/weapon/evidencebag))
|
||||
scanning = I.contents[1]
|
||||
scanning.loc = src
|
||||
I.overlays -= scanning
|
||||
I.icon_state = "evidenceobj"
|
||||
else
|
||||
scanning = I
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
else
|
||||
usr << "Invalid Object Rejected."
|
||||
if("card")
|
||||
var/mob/M = usr
|
||||
var/obj/item/I = M.equipped()
|
||||
if(!(I && istype(I,/obj/item/weapon/f_card)))
|
||||
I = card
|
||||
if(I && istype(I,/obj/item/weapon/f_card))
|
||||
card = I
|
||||
if(card.amount > 1 || !card.fingerprints.len)
|
||||
usr << "\red ERROR: No prints/too many cards."
|
||||
if(card.loc == src)
|
||||
card.loc = src.loc
|
||||
card = null
|
||||
return
|
||||
M.drop_item()
|
||||
I.loc = src
|
||||
process_card()
|
||||
usr << "You insert the card, and it is destroyed by the machinery in the process of comparing prints."
|
||||
else
|
||||
usr << "\red Invalid Object Rejected."
|
||||
if("database")
|
||||
canclear = 1
|
||||
if(href_list["delete_record"])
|
||||
delete_dossier(text2num(href_list["delete_record"]))
|
||||
if(href_list["delete_aux"])
|
||||
delete_record(text2num(href_list["delete_aux"]))
|
||||
if((!misc || !misc.len) && (!files || !files.len))
|
||||
temp = "Database is empty."
|
||||
for(var/atom/A in contents)
|
||||
if(A == scanning)
|
||||
continue
|
||||
del(A)
|
||||
else
|
||||
if(files && files.len)
|
||||
temp = "<b>Criminal Evidence Database</b><br><br>"
|
||||
temp += "Consolidated data points:<br>"
|
||||
for(var/i = 1, i <= files.len, i++)
|
||||
temp += "<a href='?src=\ref[src];operation=record;identifier=[i]'>{Dossier [i]}</a><br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=card'>{Insert Finger Print Card}</a><br><br><br>"
|
||||
else
|
||||
temp = ""
|
||||
if(misc && misc.len)
|
||||
if(href_list["delete"])
|
||||
delete_record(text2num(href_list["delete"]))
|
||||
temp += "<b>Auxiliary Evidence Database</b><br><br>"
|
||||
temp += "This is where anything without fingerprints goes.<br><br>"
|
||||
for(var/i = 1, i <= misc.len, i++)
|
||||
var/list/temp_list = misc[i]
|
||||
var/item_name = get_name(temp_list[1])
|
||||
temp += "<a href='?src=\ref[src];operation=auxiliary;identifier=[i]'>{[item_name]}</a><br>"
|
||||
if("record")
|
||||
canclear = 0
|
||||
if(files)
|
||||
temp = "<b>Criminal Evidence Database</b><br><br>"
|
||||
temp += "Consolidated data points: Dossier [href_list["identifier"]]<br>"
|
||||
var/identifier = text2num(href_list["identifier"])
|
||||
var/list/dossier = files[identifier]
|
||||
var/list/prints = params2list(dossier[1])
|
||||
var/print_string = "Fingerprints: Print not complete!<br>"
|
||||
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
|
||||
print_string = "Fingerprints: (80% or higher completion reached)<br>" + prints[num2text(2)] + "<br>"
|
||||
temp += print_string
|
||||
for(var/i = 2, i <= dossier.len, i++)
|
||||
var/list/outputs = dossier[i]
|
||||
var/item_name = get_name(outputs[1])
|
||||
var/list/prints_len = outputs[2]
|
||||
temp += "Object: [item_name]<br>"
|
||||
temp += " [prints_len.len] Unique fingerprints found.<br>"
|
||||
var/list/fibers = outputs[3]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j <= fibers.len, j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
temp += " Fibers: [dat]<br>"
|
||||
else
|
||||
temp += " No fibers found.<br>"
|
||||
var/list/blood = outputs[4]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
if(blood.len > 1)
|
||||
for(var/j = 2, j <= blood.len, j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
temp += " Blood: [dat]<br>"
|
||||
else
|
||||
temp += " No blood found.<br>"
|
||||
else
|
||||
temp = "ERROR. Database not found!<br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database;delete_record=[href_list["identifier"]]'>{Delete this Dossier}</a>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=databaseprint;identifier=[href_list["identifier"]]'>{Print}</a>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
|
||||
if("databaseprint")
|
||||
if(files)
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
P.name = "Database File (Dossier [href_list["identifier"]])"
|
||||
P.overlays += "paper_words"
|
||||
P.info = "<b>Criminal Evidence Database</b><br><br>"
|
||||
P.info += "Consolidated data points: Dossier [href_list["identifier"]]<br>"
|
||||
var/list/dossier = files[text2num(href_list["identifier"])]
|
||||
var/list/prints = params2list(dossier[1])
|
||||
var/print_string = "Fingerprints: Print not complete!<br>"
|
||||
if(stringpercent(prints[num2text(2)]) <= FINGERPRINT_COMPLETE)
|
||||
print_string = "Fingerprints: " + prints[num2text(2)] + "<BR>"
|
||||
P.info += print_string
|
||||
for(var/i = 2, i <= dossier.len, i++)
|
||||
var/list/outputs = dossier[i]
|
||||
var/item_name = get_name(outputs[1])
|
||||
var/list/prints_len = outputs[2]
|
||||
P.info += "Object: [item_name]<br>"
|
||||
P.info += " [prints_len.len] Unique fingerprints found.<br>"
|
||||
var/list/fibers = outputs[3]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j <= fibers.len, j++)
|
||||
dat += ",<br> [fibers[j]]"
|
||||
P.info += " Fibers: [dat]<br>"
|
||||
else
|
||||
P.info += " No fibers found.<br>"
|
||||
var/list/blood = outputs[4]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
if(blood.len > 1)
|
||||
for(var/j = 2, j <= blood.len, j++)
|
||||
dat += ",<br> [blood[j]]"
|
||||
P.info += " Blood: [dat]<br>"
|
||||
else
|
||||
P.info += " No blood found."
|
||||
else
|
||||
usr << "ERROR. Database not found!<br>"
|
||||
if("auxiliary")
|
||||
canclear = 0
|
||||
if(misc)
|
||||
temp = "<b>Auxiliary Evidence Database</b><br><br>"
|
||||
var/identifier = text2num(href_list["identifier"])
|
||||
var/list/outputs = misc[identifier]
|
||||
var/item_name = get_name(outputs[1])
|
||||
temp += "Consolidated data points: [item_name]<br>"
|
||||
var/list/fibers = outputs[2]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j <= fibers.len, j++)
|
||||
dat += "<br> [fibers[j]]"
|
||||
temp += " Fibers: [dat]<br>"
|
||||
else
|
||||
temp += " No fibers found."
|
||||
var/list/blood = outputs[3]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
for(var/j = 2, j <= blood.len, j++)
|
||||
dat += "<br> [blood[j]]"
|
||||
temp += " Blood: [dat]<br>"
|
||||
else
|
||||
temp += " No blood found.<br>"
|
||||
else
|
||||
temp = "ERROR. Database not found!<br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database;delete_aux=[href_list["identifier"]]'>{Delete This Record}</a>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=auxiliaryprint;identifier=[href_list["identifier"]]'>{Print}</a>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database'>{Return}</a>"
|
||||
if("auxiliaryprint")
|
||||
if(misc)
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
var/identifier = text2num(href_list["identifier"])
|
||||
var/list/outputs = misc[identifier]
|
||||
var/item_name = get_name(outputs[1])
|
||||
P.name = "Auxiliary Database File ([item_name])"
|
||||
P.overlays += "paper_words"
|
||||
P.info = "<b>Auxiliary Evidence Database</b><br><br>"
|
||||
P.info += "Consolidated data points: [item_name]<br>"
|
||||
var/list/fibers = outputs[2]
|
||||
if(fibers && fibers.len)
|
||||
var/dat = "[fibers[1]]"
|
||||
for(var/j = 2, j <= fibers.len, j++)
|
||||
dat += "<br> [fibers[j]]"
|
||||
P.info += " Fibers: [dat]<br>"
|
||||
else
|
||||
P.info += " No fibers found."
|
||||
var/list/blood = outputs[3]
|
||||
if(blood && blood.len)
|
||||
var/dat = "[blood[1]]"
|
||||
for(var/j = 2, j <= blood.len, j++)
|
||||
dat += "<br> [blood[j]]"
|
||||
P.info += " Blood: [dat]<br>"
|
||||
else
|
||||
P.info += " No blood found.<br>"
|
||||
else
|
||||
usr << "ERROR. Database not found!<br>"
|
||||
if("scan")
|
||||
if(istype(scanning,/obj/item/weapon/f_card))
|
||||
card = scanning
|
||||
scanning = initial(scanning)
|
||||
process_card()
|
||||
else if(scanning)
|
||||
scan_process = 3
|
||||
scan_data = "Scanning [scanning]: 25% complete"
|
||||
updateDialog()
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_data = "Scanning [scanning]: 50% complete"
|
||||
updateDialog()
|
||||
scan_process = 2
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_data = "Scanning [scanning]: 75% complete"
|
||||
updateDialog()
|
||||
scan_process = 1
|
||||
sleep(50)
|
||||
if(!scan_process)
|
||||
scan_data = null
|
||||
updateDialog()
|
||||
return
|
||||
scan_process = 0
|
||||
scan_name = scanning.name
|
||||
scan_data = "<u>[scanning]</u><br><br>"
|
||||
if (scanning.blood_DNA.len)
|
||||
scan_data += "Blood Found:<br>"
|
||||
for(var/i = 1, i <= scanning.blood_DNA.len, i++)
|
||||
var/list/templist = scanning.blood_DNA[i]
|
||||
scan_data += "-Blood type: [templist[2]]\nDNA: [templist[1]]<br><br>"
|
||||
else
|
||||
scan_data += "No Blood Found<br><br>"
|
||||
if (!length(scanning.fingerprints))
|
||||
scan_data += "No Fingerprints Found<br><br>"
|
||||
else
|
||||
var/list/L = scanning.fingerprints
|
||||
scan_data += "Isolated [L.len] Fingerprints. Loaded into database.<br>"
|
||||
add_data(scanning)
|
||||
|
||||
if(!scanning.suit_fibers)
|
||||
/*if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
var/obj/item/device/detective_scanner/scanner = scanning
|
||||
if(scanner.stored_name)
|
||||
scan_data += "Fibers/Materials Data - [scanner.stored_name]:<br>"
|
||||
for(var/data in scanner.stored_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
else
|
||||
scan_data += "No Fibers/Materials Data<br>"
|
||||
else*/
|
||||
scan_data += "No Fibers/Materials Located<br>"
|
||||
else
|
||||
/*if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
var/obj/item/device/detective_scanner/scanner = scanning
|
||||
if(scanner.stored_name)
|
||||
scan_data += "Fibers/Materials Data - [scanner.stored_name]:<br>"
|
||||
for(var/data in scanner.stored_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
else
|
||||
scan_data += "No Fibers/Materials Data<br>"*/
|
||||
|
||||
scan_data += "Fibers/Materials Found:<br>"
|
||||
for(var/data in scanning.suit_fibers)
|
||||
scan_data += "- [data]<br>"
|
||||
if(istype(scanning,/obj/item/device/detective_scanner))
|
||||
scan_data += "<br><b>Data transfered from Scanner to Database.</b><br>"
|
||||
add_data_scanner(scanning)
|
||||
else if(!length(scanning.fingerprints))
|
||||
scan_data += "<br><b><a href='?src=\ref[src];operation=add'>Add to Database?</a></b><br>"
|
||||
else
|
||||
temp = "Scan Failed: No Object"
|
||||
|
||||
|
||||
if("print")
|
||||
if(scan_data)
|
||||
temp = "Scan Data Printed."
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
P.name = "Scan Data ([scan_name])"
|
||||
P.info = "<tt>[scan_data]</tt>"
|
||||
P.overlays += "paper_words"
|
||||
else
|
||||
temp = "Print Failed: No Data"
|
||||
if("erase")
|
||||
scan_data = ""
|
||||
if("cancel")
|
||||
scan_process = 0
|
||||
if("add")
|
||||
if(scanning)
|
||||
add_data(scanning)
|
||||
else
|
||||
temp = "Data Transfer Failed: No Object."
|
||||
updateUsrDialog()
|
||||
|
||||
verb/reset()
|
||||
set name = "Reset Database"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
temp = ""
|
||||
add_fingerprint(usr)
|
||||
files = list()
|
||||
misc = list()
|
||||
for(var/atom/A in contents)
|
||||
if(A == scanning)
|
||||
continue
|
||||
del(A)
|
||||
return
|
||||
|
||||
|
||||
ex_act()
|
||||
return
|
||||
|
||||
|
||||
proc/add_data_scanner(var/obj/item/device/detective_scanner/W)
|
||||
for(var/i = 1, i <= W.stored.len, i++)
|
||||
var/list/data = W.stored[i]
|
||||
add_data(data[1],1,data[2],data[3],data[4])
|
||||
W.stored = list()
|
||||
for(var/atom/A in W.contents)
|
||||
del(A)
|
||||
return
|
||||
|
||||
|
||||
proc/add_data(var/atom/A, var/override = 0, var/tempfingerprints, var/tempsuit_fibers,var/tempblood_DNA)
|
||||
//What follows is massive. It cross references all stored data in the scanner with the other stored data,
|
||||
//and what is already in the computer. Not sure how bad the lag may/may not be.
|
||||
var
|
||||
backup_prints
|
||||
backup_fibers
|
||||
backup_DNA
|
||||
if(override)
|
||||
backup_prints = A.fingerprints
|
||||
A.fingerprints = tempfingerprints
|
||||
backup_fibers = A.suit_fibers
|
||||
A.suit_fibers = tempsuit_fibers
|
||||
backup_DNA = A.blood_DNA
|
||||
A.blood_DNA = tempblood_DNA
|
||||
if((!A.fingerprints || !length(A.fingerprints))) //No prints
|
||||
var/merged = 0
|
||||
if(!misc)
|
||||
misc = list()
|
||||
if(misc)
|
||||
for(var/i = 1, i <= misc.len, i++) //Lets see if we can find it.
|
||||
var/list/templist = misc[i]
|
||||
var/atom/check = templist[1]
|
||||
if(check.original_atom == A || check.original_atom == A.original_atom) //There it is!
|
||||
merged = 1
|
||||
var/list/fibers = templist[2]
|
||||
if(!fibers)
|
||||
fibers = list()
|
||||
if(A.suit_fibers)
|
||||
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 = templist[3]
|
||||
if(!blood)
|
||||
blood = list()
|
||||
if(A.blood_DNA)
|
||||
for(var/j = 1, j <= A.blood_DNA.len, j++) //Blood~~~
|
||||
if(!blood.Find(A.blood_DNA[j])) //It isn't! Add!
|
||||
blood += A.blood_DNA[j]
|
||||
var/list/sum_list[3] //Pack it back up!
|
||||
sum_list[1] = check
|
||||
sum_list[2] = fibers
|
||||
sum_list[3] = blood
|
||||
misc[i] = sum_list //Store it!
|
||||
break //We found it, we're done here.
|
||||
if(!merged) //Nope! Guess we have to add it!
|
||||
var/list/templist[3]
|
||||
templist[1] = A.get_duplicate(src)
|
||||
templist[2] = A.suit_fibers
|
||||
templist[3] = A.blood_DNA
|
||||
misc.len++
|
||||
misc[misc.len] = templist //Store it!
|
||||
return !merged
|
||||
else //Has prints.
|
||||
var/list/found_prints[A.fingerprints.len + 1]
|
||||
for(var/i = 1, i <= found_prints.len, i++)
|
||||
found_prints[i] = 0
|
||||
if(!files)
|
||||
files = list()
|
||||
for(var/i = 1, i <= files.len, i++) //Lets see if we can find the owner of the prints
|
||||
var/list/perp_list = files[i]
|
||||
var/list/perp_prints = params2list(perp_list[1])
|
||||
var/perp = perp_prints[num2text(1)]
|
||||
var/found2 = 0
|
||||
for(var/m = 1, m <= A.fingerprints.len, m++) //Compare database prints with prints on object.
|
||||
var/list/test_prints_list = params2list(A.fingerprints[m])
|
||||
var/checker = test_prints_list[num2text(1)]
|
||||
if(checker == perp) //Found 'em! Merge!
|
||||
found_prints[m] = 1
|
||||
for(var/n = 2, n <= perp_list.len, n++) //Lets see if it is already in the database
|
||||
var/list/target = perp_list[n]
|
||||
var/atom/atom_checker = target[1]
|
||||
if(atom_checker.original_atom == A || atom_checker.original_atom == A.original_atom) //Found the original object!
|
||||
found2 = 1
|
||||
var/list/prints = target[2]
|
||||
if(!prints)
|
||||
prints = list()
|
||||
if(A.fingerprints)
|
||||
for(var/j = 1, j <= A.fingerprints.len, j++) //Fingerprints~~~
|
||||
var/list/print_test1 = params2list(A.fingerprints[j])
|
||||
var/test_print1 = print_test1[num2text(1)]
|
||||
var/found = 0
|
||||
for(var/k = 1, k <= prints.len, k++) //Lets see if the print is already in there
|
||||
var/list/print_test2 = params2list(prints[k])
|
||||
var/test_print2 = print_test2[num2text(1)]
|
||||
if(test_print2 == test_print1) //It is! Merge!
|
||||
prints[k] = "1=" + test_print2 + "&2=" + stringmerge(print_test2[num2text(2)],print_test1[num2text(2)])
|
||||
found = 1
|
||||
break //We found it, we're done here.
|
||||
if(!found) //It isn't! Add!
|
||||
prints += A.fingerprints[j]
|
||||
var/list/fibers = target[3]
|
||||
if(!fibers)
|
||||
fibers = list()
|
||||
if(A.suit_fibers)
|
||||
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 = target[4]
|
||||
if(!blood)
|
||||
blood = list()
|
||||
if(A.blood_DNA)
|
||||
for(var/j = 1, j < A.blood_DNA.len, j++) //Blood~~~
|
||||
if(!blood.Find(A.blood_DNA[j])) //It isn't! Add!
|
||||
blood += A.blood_DNA[j]
|
||||
var/list/sum_list[4] //Pack it back up!
|
||||
sum_list[1] = atom_checker
|
||||
sum_list[2] = prints
|
||||
sum_list[3] = fibers
|
||||
sum_list[4] = blood
|
||||
perp_list[n] = sum_list //Store it!
|
||||
files[i] = perp_list
|
||||
break //We found it, we're done here.
|
||||
if(!found2) //Add a new datapoint to this perp!
|
||||
var/list/sum_list[4]
|
||||
sum_list[1] = A.get_duplicate(src)
|
||||
sum_list[2] = A.fingerprints
|
||||
sum_list[3] = A.suit_fibers
|
||||
sum_list[4] = A.blood_DNA
|
||||
perp_list.len++
|
||||
perp_list[perp_list.len] = sum_list
|
||||
files[i] = perp_list
|
||||
for(var/m = 1, m < found_prints.len, m++) //Uh Oh! A print wasn't used! New datapoint!
|
||||
if(found_prints[m] == 0)
|
||||
var/list/newperp[2]
|
||||
var/list/sum_list[4]
|
||||
sum_list[1] = A.get_duplicate(src)
|
||||
sum_list[2] = A.fingerprints
|
||||
sum_list[3] = A.suit_fibers
|
||||
sum_list[4] = A.blood_DNA
|
||||
newperp[2] = sum_list
|
||||
newperp[1] = A.fingerprints[m]
|
||||
if(!files)
|
||||
files = newperp
|
||||
else
|
||||
files.len++
|
||||
files[files.len] = newperp
|
||||
update_fingerprints() //Lets update the calculated sum of the stored prints.
|
||||
if(override)
|
||||
A.fingerprints = backup_prints
|
||||
A.suit_fibers = backup_fibers
|
||||
A.blood_DNA = backup_DNA
|
||||
return
|
||||
|
||||
|
||||
proc/update_fingerprints() //I am tired, but this updates the master print from evidence, which is used to determine completion of a print.
|
||||
for(var/k = 1, k <= files.len, k++)
|
||||
var/list/perp_list = files[k]
|
||||
var/list/perp_prints = params2list(perp_list[1])
|
||||
var/perp = perp_prints[num2text(1)]
|
||||
var/list/found_prints = list()
|
||||
for(var/i = 2, i <= perp_list.len, i++)
|
||||
var/list/test_list = perp_list[i]
|
||||
var/list/test_prints = test_list[2]
|
||||
for(var/j = 1, j <= test_prints.len, j++)
|
||||
var/list/test_list_2 = params2list(test_prints[j])
|
||||
var/test_prints_2 = test_list_2[num2text(1)]
|
||||
if(test_prints_2 == perp)
|
||||
found_prints += test_list_2[num2text(2)]
|
||||
break
|
||||
for(var/prints in found_prints)
|
||||
perp_prints[num2text(2)] = stringmerge(perp_prints[num2text(2)],prints)
|
||||
perp_list[1] = "1=" + perp + "&2=" + perp_prints[num2text(2)]
|
||||
files[k] = perp_list
|
||||
return
|
||||
|
||||
proc/process_card() //Same as above, but for fingerprint cards
|
||||
if(card.fingerprints && !(card.amount > 1))
|
||||
for(var/k = 1, k <= card.fingerprints.len, k++)
|
||||
var/list/test_prints = params2list(card.fingerprints[k])
|
||||
var/print = test_prints[num2text(1)]
|
||||
for(var/i = 1, i <= files.len, i++)
|
||||
var/list/test_list = files[i]
|
||||
var/list/perp_prints = params2list(test_list[1])
|
||||
var/perp = perp_prints[num2text(1)]
|
||||
if(perp == print)
|
||||
test_list[1] = "1=" + print + "&2=" + print
|
||||
files[i] = test_list
|
||||
break
|
||||
del(card)
|
||||
else
|
||||
usr << "\red ERROR: No prints/too many cards."
|
||||
if(card.loc == src)
|
||||
card.loc = src.loc
|
||||
card = null
|
||||
return
|
||||
return
|
||||
|
||||
proc/delete_record(var/location) //Deletes an entry in the misc database at the given location
|
||||
if(misc && misc.len)
|
||||
for(var/i = location, i < misc.len, i++)
|
||||
misc[i] = misc[i+i]
|
||||
misc.len--
|
||||
return
|
||||
|
||||
proc/get_name(var/atom/A) //HurrDurr
|
||||
return A.name
|
||||
|
||||
proc/delete_dossier(var/location) //Deletes a Dossier at a given location.
|
||||
if(files && files.len)
|
||||
if(files.len > location)
|
||||
for(var/i = location, i < files.len, i++)
|
||||
files[i] = files[i + 1]
|
||||
if(files.len >= location)
|
||||
files[files.len] = list()
|
||||
files.len--
|
||||
return
|
||||
|
||||
detective
|
||||
icon_state = "old"
|
||||
name = "PowerScan Mk.I"
|
||||
|
||||
obj/item/clothing/shoes/var
|
||||
track_blood = 0
|
||||
mob/living/carbon/human/track_blood_mob
|
||||
mob/var
|
||||
bloody_hands = 0
|
||||
mob/living/carbon/human/bloody_hands_mob
|
||||
track_blood
|
||||
mob/living/carbon/human/track_blood_mob
|
||||
obj/item/clothing/gloves/var
|
||||
transfer_blood = 0
|
||||
mob/living/carbon/human/bloody_hands_mob
|
||||
|
||||
|
||||
obj/effect/decal/cleanable/blood/var
|
||||
track_amt = 2
|
||||
mob/blood_owner
|
||||
|
||||
turf/Exited(mob/living/carbon/human/M)
|
||||
if(istype(M,/mob/living))
|
||||
if(!istype(src, /turf/space)) // Bloody tracks code starts here
|
||||
if(M.track_blood > 0)
|
||||
M.track_blood--
|
||||
src.add_bloody_footprints(M.track_blood_mob,1,M.dir,get_tracks(M))
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes)
|
||||
if(M.shoes.track_blood > 0)
|
||||
M.shoes.track_blood--
|
||||
src.add_bloody_footprints(M.shoes.track_blood_mob,1,M.dir,M.shoes.name) // And bloody tracks end here
|
||||
. = ..()
|
||||
turf/Entered(mob/living/carbon/human/M)
|
||||
if(istype(M,/mob/living))
|
||||
if(M.track_blood > 0)
|
||||
M.track_blood--
|
||||
src.add_bloody_footprints(M.track_blood_mob,0,M.dir,get_tracks(M))
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes && !istype(src,/turf/space))
|
||||
if(M.shoes.track_blood > 0)
|
||||
M.shoes.track_blood--
|
||||
src.add_bloody_footprints(M.shoes.track_blood_mob,0,M.dir,M.shoes.name)
|
||||
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src)
|
||||
if(B.track_amt <= 0) continue
|
||||
if(B.type != /obj/effect/decal/cleanable/blood/tracks)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(M.shoes)
|
||||
M.shoes.add_blood(B.blood_owner)
|
||||
M.shoes.track_blood_mob = B.blood_owner
|
||||
M.shoes.track_blood = max(M.shoes.track_blood,8)
|
||||
else
|
||||
M.add_blood(B.blood_owner)
|
||||
M.track_blood_mob = B.blood_owner
|
||||
M.track_blood = max(M.track_blood,rand(4,8))
|
||||
B.track_amt--
|
||||
break
|
||||
. = ..()
|
||||
|
||||
turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info)
|
||||
for(var/obj/effect/decal/cleanable/blood/tracks/T in src)
|
||||
if(T.dir == d)
|
||||
if((leaving && T.icon_state == "steps2") || (!leaving && T.icon_state == "steps1"))
|
||||
T.desc = "These bloody footprints appear to have been made by [info]."
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
T.blood_DNA.len++
|
||||
T.blood_DNA[T.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
return
|
||||
var/obj/effect/decal/cleanable/blood/tracks/this = new(src)
|
||||
this.icon = 'footprints.dmi'
|
||||
if(leaving)
|
||||
this.icon_state = "blood2"
|
||||
else
|
||||
this.icon_state = "blood1"
|
||||
this.dir = d
|
||||
this.desc = "These bloody footprints appear to have been made by [info]."
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(this.blood_DNA.len)
|
||||
this.blood_DNA.len++
|
||||
this.blood_DNA[this.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
|
||||
else
|
||||
this.blood_DNA = list(list(M.dna.unique_enzymes,M.dna.b_type))
|
||||
|
||||
proc/get_tracks(mob/M)
|
||||
if(istype(M,/mob/living))
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
. = "human feet"
|
||||
else if(istype(M,/mob/living/carbon/monkey))
|
||||
. = "monkey paws"
|
||||
else if(istype(M,/mob/living/silicon/robot))
|
||||
. = "robot feet"
|
||||
else
|
||||
. = "an unknown creature"
|
||||
|
||||
proc/blood_incompatible(donor,receiver)
|
||||
var
|
||||
donor_antigen = copytext(donor,1,lentext(donor))
|
||||
receiver_antigen = copytext(receiver,1,lentext(receiver))
|
||||
donor_rh = findtext("+",donor)
|
||||
receiver_rh = findtext("+",receiver)
|
||||
if(donor_rh && !receiver_rh) return 1
|
||||
switch(receiver_antigen)
|
||||
if("A")
|
||||
if(donor_antigen != "A" && donor_antigen != "O") return 1
|
||||
if("B")
|
||||
if(donor_antigen != "B" && donor_antigen != "O") return 1
|
||||
if("O")
|
||||
if(donor_antigen != "O") return 1
|
||||
//AB is a universal receiver.
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, I suppose."
|
||||
w_class = 1
|
||||
icon = 'toy.dmi'
|
||||
icon_state = "rag"
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(istype(A))
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!")
|
||||
if(do_after(user,30))
|
||||
user.visible_message("[user] finishes wiping off the [A]!")
|
||||
A.clean_blood()
|
||||
return
|
||||
69
code/modules/detectivework/evidence.dm
Normal file
69
code/modules/detectivework/evidence.dm
Normal file
@@ -0,0 +1,69 @@
|
||||
//CONTAINS:
|
||||
//Evidence bags and stuff
|
||||
///////////
|
||||
//Shamelessly ripped from Mini's old code.
|
||||
|
||||
/obj/item/weapon/evidencebag
|
||||
name = "evidence bag"
|
||||
desc = "An empty evidence bag."
|
||||
icon = 'storage.dmi'
|
||||
icon_state = "evidenceobj"
|
||||
w_class = 1
|
||||
|
||||
/* buggy and stuff
|
||||
/obj/item/weapon/evidencebag/attackby(obj/item/weapon/O, mob/user as mob)
|
||||
return src.afterattack(O, user)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/storage) && O in user)
|
||||
return ..()
|
||||
if(!(O && istype(O)) || O.anchored == 1)
|
||||
user << "You can't put that inside the [src]!"
|
||||
return ..()
|
||||
if(O in user)
|
||||
user << "You are wearing that."
|
||||
return
|
||||
if(src.contents.len > 0)
|
||||
user << "The [src] already has something inside it."
|
||||
return ..()
|
||||
if(istype(O.loc,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/U = O.loc
|
||||
user.client.screen -= O
|
||||
U.contents.Remove(O)
|
||||
user << "You put the [O] inside the [src]."
|
||||
icon_state = "evidence"
|
||||
src.overlays += O
|
||||
desc = "An evidence bag containing \a [O]. [O.desc]"
|
||||
O.loc = src
|
||||
w_class = O.w_class
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/evidencebag/attack_self(mob/user as mob)
|
||||
if (src.contents.len > 0)
|
||||
var/obj/item/I = src.contents[1]
|
||||
user << "You take the [I] out of the [src]."
|
||||
src.overlays -= I
|
||||
I.loc = get_turf(user.loc)
|
||||
w_class = 1
|
||||
src.icon_state = "evidenceobj"
|
||||
desc = "An empty evidence bag."
|
||||
else
|
||||
user << "[src] is empty."
|
||||
src.icon_state = "evidenceobj"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/box/evidence
|
||||
name = "evidence bag box"
|
||||
desc = "A box claiming to contain evidence bags."
|
||||
New()
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/evidencebag(src)
|
||||
new /obj/item/weapon/f_card(src)
|
||||
..()
|
||||
return
|
||||
@@ -381,7 +381,7 @@
|
||||
if (!t1)
|
||||
t1 = wear_suit.icon_state
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (wear_suit.blood_DNA)
|
||||
if (wear_suit.blood_DNA.len)
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/armor))
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
|
||||
else
|
||||
@@ -406,7 +406,7 @@
|
||||
if (!t1)
|
||||
t1 = head.icon_state
|
||||
overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (head.blood_DNA)
|
||||
if (head.blood_DNA.len)
|
||||
overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER)
|
||||
head.screen_loc = ui_oclothing
|
||||
|
||||
|
||||
@@ -35,20 +35,20 @@
|
||||
skipears = src.head.flags_inv & HIDEEARS
|
||||
|
||||
if (src.w_uniform && !skipjumpsuit)
|
||||
if (src.w_uniform.blood_DNA)
|
||||
usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!"
|
||||
if (src.w_uniform.blood_DNA.len)
|
||||
usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA.len ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!"
|
||||
else
|
||||
usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]."
|
||||
|
||||
if (src.wear_suit)
|
||||
if (src.wear_suit.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!"
|
||||
if (src.wear_suit.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on."
|
||||
|
||||
if (src.head)
|
||||
if (src.head.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.head.blood_DNA ? " bloody " : " "] \icon[src.head] [src.head.name] on his head!"
|
||||
if (src.head.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.head.blood_DNA.len ? " bloody " : " "] \icon[src.head] [src.head.name] on his head!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.head] [src.head.name] on."
|
||||
|
||||
@@ -59,47 +59,47 @@
|
||||
usr << "\blue [src.name] has a \icon[src.ears] [src.ears.name] by [t_his] mouth."
|
||||
|
||||
if (src.wear_mask && !skipmask)
|
||||
if (src.wear_mask.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!"
|
||||
if (src.wear_mask.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.wear_mask.blood_DNA.len ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face."
|
||||
|
||||
if (src.l_hand)
|
||||
if (src.l_hand.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.l_hand.blood_DNA ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!"
|
||||
if (src.l_hand.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.l_hand.blood_DNA.len ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand."
|
||||
|
||||
if (src.r_hand)
|
||||
if (src.r_hand.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.r_hand.blood_DNA ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!"
|
||||
if (src.r_hand.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.r_hand.blood_DNA.len ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand."
|
||||
|
||||
if (src.belt)
|
||||
if (src.belt.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!"
|
||||
if (src.belt.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.belt.blood_DNA.len ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt."
|
||||
if(src.s_store && !skipsuitstorage)
|
||||
if(src.s_store.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!"
|
||||
if(src.s_store.blood_DNA.len)
|
||||
usr << "\red [src.name] has a[src.s_store.blood_DNA.len ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]."
|
||||
usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA.len ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]."
|
||||
|
||||
if (src.shoes && !skipshoes)
|
||||
usr << "[src.shoes.blood_DNA ? "\red" : "\blue"] [src.name] is wearing[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet."
|
||||
usr << "[src.shoes.blood_DNA.len ? "\red" : "\blue"] [src.name] is wearing[src.shoes.blood_DNA.len ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet."
|
||||
|
||||
if (src.gloves && !skipgloves)
|
||||
if (src.gloves.blood_DNA)
|
||||
if (src.gloves.blood_DNA.len)
|
||||
usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!"
|
||||
else
|
||||
usr << "\blue [src.name] has \icon[src.gloves] [src.gloves.name] on [t_his] hands."
|
||||
else if (src.blood_DNA)
|
||||
usr << "\red [src.name] has[src.blood_DNA ? " bloody " : " "] hands!"
|
||||
else if (src.blood_DNA.len)
|
||||
usr << "\red [src.name] has[src.blood_DNA.len ? " bloody " : " "] hands!"
|
||||
|
||||
if (src.glasses && !skipeyes)
|
||||
if (src.glasses.blood_DNA)
|
||||
if (src.glasses.blood_DNA.len)
|
||||
usr << "\red [src.name] has bloody \icon[src.glasses] [src.glasses.name] on [t_his] eyes!"
|
||||
else
|
||||
usr << "\blue [src.name] has \icon[src.glasses] [src.glasses.name] on [t_his] eyes."
|
||||
|
||||
@@ -853,7 +853,7 @@
|
||||
overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER)
|
||||
else
|
||||
overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER)
|
||||
if (w_uniform.blood_DNA)
|
||||
if (w_uniform.blood_DNA.len)
|
||||
var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
|
||||
@@ -874,10 +874,10 @@
|
||||
if (!t1)
|
||||
t1 = gloves.icon_state
|
||||
overlays += image("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (gloves.blood_DNA)
|
||||
if (gloves.blood_DNA.len)
|
||||
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
else if (blood_DNA)
|
||||
else if (blood_DNA.len)
|
||||
var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
// Glasses
|
||||
@@ -892,7 +892,7 @@
|
||||
if (shoes)
|
||||
var/t1 = shoes.icon_state
|
||||
overlays += image("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (shoes.blood_DNA)
|
||||
if (shoes.blood_DNA.len)
|
||||
var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio
|
||||
/* if (w_radio)
|
||||
@@ -946,7 +946,7 @@
|
||||
var/t1 = wear_suit.icon_state
|
||||
overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (wear_suit)
|
||||
if (wear_suit.blood_DNA)
|
||||
if (wear_suit.blood_DNA.len)
|
||||
var/icon/stain_icon = null
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat))
|
||||
stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]")
|
||||
@@ -982,7 +982,7 @@
|
||||
var/t1 = wear_mask.icon_state
|
||||
overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||
if (!istype(wear_mask, /obj/item/clothing/mask/cigarette))
|
||||
if (wear_mask.blood_DNA)
|
||||
if (wear_mask.blood_DNA.len)
|
||||
var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
wear_mask.screen_loc = ui_mask
|
||||
@@ -994,7 +994,7 @@
|
||||
if(istype(head,/obj/item/clothing/head/kitty))
|
||||
head_icon = (( lying ) ? head:mob2 : head:mob)
|
||||
overlays += image("icon" = head_icon, "layer" = MOB_LAYER)
|
||||
if (head.blood_DNA)
|
||||
if (head.blood_DNA.len)
|
||||
var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]")
|
||||
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||
head.screen_loc = ui_head
|
||||
@@ -2274,4 +2274,8 @@ It can still be worn/put on as normal.
|
||||
/mob/living/carbon/human/Paralyse(amount)
|
||||
if(mutations & HULK)
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/check_dna()
|
||||
dna.check_integrity(src)
|
||||
return
|
||||
@@ -367,6 +367,7 @@
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
new_character.dna.ready_dna(new_character)
|
||||
new_character.dna.b_type = preferences.b_type
|
||||
if(mind)
|
||||
mind.transfer_to(new_character)
|
||||
mind.original = new_character
|
||||
|
||||
@@ -601,7 +601,6 @@ datum/preferences
|
||||
character.gender = gender
|
||||
|
||||
character.age = age
|
||||
character.b_type = b_type
|
||||
|
||||
character.r_eyes = r_eyes
|
||||
character.g_eyes = g_eyes
|
||||
|
||||
@@ -91,6 +91,14 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">01/04/2012</h2>
|
||||
<h3 class="author">SkyMarshal updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Ported BS12 Detective Work System</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">1 March 2012</h2>
|
||||
<h3 class="author">Petethegoat updated:</h3>
|
||||
|
||||
BIN
icons/effects/footprints.dmi
Normal file
BIN
icons/effects/footprints.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 742 B |
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 54 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
16425
maps/tgstation.2.0.8.dmm
16425
maps/tgstation.2.0.8.dmm
File diff suppressed because it is too large
Load Diff
@@ -90,6 +90,7 @@
|
||||
#define FILE_DIR "code/modules/clothing/uniforms"
|
||||
#define FILE_DIR "code/modules/critters"
|
||||
#define FILE_DIR "code/modules/critters/hivebots"
|
||||
#define FILE_DIR "code/modules/detectivework"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
#define FILE_DIR "code/modules/food"
|
||||
#define FILE_DIR "code/modules/mining"
|
||||
@@ -176,12 +177,12 @@
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/effects"
|
||||
#define FILE_DIR "sound/hallucinations"
|
||||
#define FILE_DIR "sound/items"
|
||||
#define FILE_DIR "sound/machines"
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#define FILE_DIR "sound/scary"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
// END_FILE_DIR
|
||||
@@ -788,6 +789,8 @@
|
||||
#include "code\modules\critters\critter_defenses.dm"
|
||||
#include "code\modules\critters\critters.dm"
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\detectivework\detective_work.dm"
|
||||
#include "code\modules\detectivework\evidence.dm"
|
||||
#include "code\modules\flufftext\Dreaming.dm"
|
||||
#include "code\modules\flufftext\Hallucination.dm"
|
||||
#include "code\modules\flufftext\TextFilters.dm"
|
||||
|
||||
Reference in New Issue
Block a user