Forensics fixes/tweaks.

This commit is contained in:
Zuhayr
2015-12-10 18:27:59 +10:30
parent 60e785da97
commit c4c63b5d19
7 changed files with 45 additions and 30 deletions

View File

@@ -421,7 +421,6 @@ its easier to just keep the beam vertical.
blood_DNA = null
return 1
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return
var/cur_x = null

View File

@@ -34,6 +34,7 @@ var/global/list/image/splatter_cache=list()
invisibility = 100
amount = 0
processing_objects -= src
..(ignore=1)
/obj/effect/decal/cleanable/blood/Destroy()
for(var/datum/disease/D in viruses)

View File

@@ -121,7 +121,8 @@ var/global/list/image/fluidtrack_cache=list()
updated=1
dirs |= comingdir|realgoing
blood_DNA |= DNA.Copy()
if(islist(blood_DNA))
blood_DNA |= DNA.Copy()
if(updated)
update_icon()

View File

@@ -1,8 +1,11 @@
/obj/effect/decal/cleanable
var/list/random_icon_states = list()
/obj/effect/decal/cleanable/clean_blood()
qdel(src)
/obj/effect/decal/cleanable/clean_blood(var/ignore = 0)
if(!ignore)
qdel(src)
return
..()
/obj/effect/decal/cleanable/New()
if (random_icon_states && length(src.random_icon_states) > 0)

View File

@@ -16,8 +16,8 @@
/turf/simulated/clean_blood()
for(var/obj/effect/decal/cleanable/blood/B in contents)
B.fluorescent = 0
B.invisibility = 100
B.clean_blood()
..()
/turf/simulated/New()
..()
@@ -122,6 +122,8 @@
if(istype(M))
for(var/obj/effect/decal/cleanable/blood/B in contents)
if(!B.blood_DNA)
B.blood_DNA = list()
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
B.virus2 = virus_copylist(M.virus2)

View File

@@ -89,18 +89,26 @@
user << report.info
return
/obj/machinery/microscope/AltClick()
if(usr.lying || !Adjacent(usr) || !ishuman(usr))
/obj/machinery/microscope/proc/remove_sample(var/mob/living/remover)
if(!istype(remover) || remover.incapacitated() || !Adjacent(remover))
return ..()
if(!sample)
usr << "<span class='warning'>\The [src] does not have a sample in it.</span>"
remover << "<span class='warning'>\The [src] does not have a sample in it.</span>"
return
usr << "<span class='notice'>You remove \the [sample] from \the [src].</span>"
remover << "<span class='notice'>You remove \the [sample] from \the [src].</span>"
sample.forceMove(get_turf(src))
usr.put_in_hands(sample)
remover.put_in_hands(sample)
sample = null
update_icon()
return
/obj/machinery/microscope/AltClick()
remove_sample(usr)
/obj/machinery/microscope/MouseDrop(var/atom/other)
if(usr == other)
remove_sample(usr)
else
return ..()
/obj/machinery/microscope/update_icon()
icon_state = "microscope"

View File

@@ -15,30 +15,30 @@
return ..()
if(is_used())
return 0
return
var/mob/living/carbon/human/H = M
var/sample_type
if(H.wear_mask)
user << "<span class='warning'>\The [H] is wearing a mask.</span>"
return 1
return
if(!H.dna || !H.dna.unique_enzymes)
user << "<span class='warning'>They don't seem to have DNA!</span>"
return 1
return
if(user != H && H.a_intent != "help" && !H.lying)
user.visible_message("<span class='danger'>\The [user] tries to take a swab sample from \the [H], but they move away.</span>")
return 1
return
if(user.zone_sel.selecting == "mouth")
if(!H.organs_by_name["head"])
user << "<span class='warning'>They don't have a head.</span>"
return 1
return
if(!H.check_has_mouth())
user << "<span class='warning'>They don't have a mouth.</span>"
return 1
return
user.visible_message("[user] swabs \the [H]'s mouth for a saliva sample.")
dna = list(H.dna.unique_enzymes)
sample_type = "DNA"
@@ -54,24 +54,21 @@
has_hand = 1
if(!has_hand)
user << "<span class='warning'>They don't have any hands.</span>"
return 1
return
user.visible_message("[user] swabs [H]'s palm for a sample.")
sample_type = "GSR"
gsr = H.gunshot_residue
else
return 0
return
if(sample_type)
used = 1
name = "[initial(name)] ([sample_type] - [H])"
desc = "[initial(desc)] The label on the vial reads 'Sample of [sample_type] from [H].'."
icon_state = "swab_used"
return 1
return 0
set_used(sample_type, H)
return
return 1
/obj/item/weapon/forensics/swab/afterattack(var/atom/A, var/mob/user, var/proximity)
if(!proximity || istype(A, /obj/item/weapon/forensics/slide))
if(!proximity || istype(A, /obj/item/weapon/forensics/slide) || istype(A, /obj/machinery/dnaforensics))
return
if(is_used())
@@ -103,6 +100,7 @@
if(!A.blood_DNA || !A.blood_DNA.len) return
dna = A.blood_DNA.Copy()
sample_type = "blood"
else if(choice == "Gunshot Residue")
var/obj/item/clothing/B = A
if(!istype(B) || !B.gunshot_residue)
@@ -113,7 +111,10 @@
if(sample_type)
user.visible_message("\The [user] swabs \the [A] for a sample.", "You swab \the [A] for a sample.")
name = "[initial(name)] ([sample_type] - [A])"
desc = "[initial(desc)] The label on the vial reads 'Sample of [sample_type] from [A].'."
icon_state = "swab_used"
set_used(sample_type, A)
/obj/item/weapon/forensics/swab/proc/set_used(var/sample_str, var/atom/source)
name = "[initial(name)] ([sample_str] - [source])"
desc = "[initial(desc)] The label on the vial reads 'Sample of [sample_str] from [source].'."
icon_state = "swab_used"
used = 1