* Forensic scanner can now remotely scan things, making it easier for the detective.

This commit is contained in:
Giacomand
2014-01-06 17:12:35 +00:00
parent dedefdd8ba
commit 618e998574
+12 -12
View File
@@ -3,8 +3,8 @@
// TODO: Split everything into easy to manage procs.
/obj/item/device/detective_scanner
name = "scanner"
desc = "Used to scan objects for DNA and fingerprints. Can print a report of the findings."
name = "forensic scanner"
desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings."
icon_state = "forensic1"
w_class = 3.0
item_state = "electronic"
@@ -40,25 +40,25 @@
user << "<span class='notice'>The scanner has no logs or is in use.</span>"
/obj/item/device/detective_scanner/attack(mob/living/M as mob, mob/user as mob)
scan(M, user)
return
/obj/item/device/detective_scanner/afterattack(atom/A as obj|turf|area, mob/user as mob,proximity)
if(!proximity)
return
if(!isturf(A) && !isobj(A))
return
if(loc != user)
return
/obj/item/device/detective_scanner/afterattack(atom/A, mob/user as mob, proximity)
scan(A, user)
/obj/item/device/detective_scanner/proc/scan(var/atom/A, var/mob/user)
if(!scanning)
// Can remotely scan objects and mobs.
if(!in_range(A, user) && !(A in view(world.view, user)))
return
if(loc != user)
return
scanning = 1
user.visible_message("\The [user] scans \the [A] with \the [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]")
user << "<span class='notice'>You scan [A]. The scanner is analysing the results...</span>"
user.visible_message("\The [user] points the [src.name] at \the [A] and performs a forensic scan.")
user << "<span class='notice'>You scan \the [A]. The scanner is now analysing the results...</span>"
// GATHER INFORMATION