Merge branch 'master' into upstream-merge-37476
This commit is contained in:
@@ -45,6 +45,6 @@
|
||||
else if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off the [A]!", "<span class='notice'>You finish wiping off the [A].</span>")
|
||||
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
|
||||
A.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
// TODO: Split everything into easy to manage procs.
|
||||
|
||||
/obj/item/device/detective_scanner
|
||||
/obj/item/detective_scanner
|
||||
name = "forensic scanner"
|
||||
desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "forensicnew"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_state = "electronic"
|
||||
@@ -22,11 +23,11 @@
|
||||
name = "Display Forensic Scanner Results"
|
||||
|
||||
/datum/action/item_action/displayDetectiveScanResults/Trigger()
|
||||
var/obj/item/device/detective_scanner/scanner = target
|
||||
var/obj/item/detective_scanner/scanner = target
|
||||
if(istype(scanner))
|
||||
scanner.displayDetectiveScanResults(usr)
|
||||
|
||||
/obj/item/device/detective_scanner/attack_self(mob/user)
|
||||
/obj/item/detective_scanner/attack_self(mob/user)
|
||||
if(log.len && !scanning)
|
||||
scanning = 1
|
||||
to_chat(user, "<span class='notice'>Printing report, please wait...</span>")
|
||||
@@ -34,10 +35,10 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The scanner has no logs or is in use.</span>")
|
||||
|
||||
/obj/item/device/detective_scanner/attack(mob/living/M, mob/user)
|
||||
/obj/item/detective_scanner/attack(mob/living/M, mob/user)
|
||||
return
|
||||
|
||||
/obj/item/device/detective_scanner/proc/PrintReport()
|
||||
/obj/item/detective_scanner/proc/PrintReport()
|
||||
// Create our paper
|
||||
var/obj/item/paper/P = new(get_turf(src))
|
||||
P.name = "paper- 'Scanner Report'"
|
||||
@@ -56,11 +57,11 @@
|
||||
log = list()
|
||||
scanning = 0
|
||||
|
||||
/obj/item/device/detective_scanner/afterattack(atom/A, mob/user, params)
|
||||
/obj/item/detective_scanner/afterattack(atom/A, mob/user, params)
|
||||
scan(A, user)
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/detective_scanner/proc/scan(atom/A, mob/user)
|
||||
/obj/item/detective_scanner/proc/scan(atom/A, mob/user)
|
||||
set waitfor = 0
|
||||
if(!scanning)
|
||||
// Can remotely scan objects and mobs.
|
||||
@@ -164,7 +165,7 @@
|
||||
scanning = 0
|
||||
return
|
||||
|
||||
/obj/item/device/detective_scanner/proc/add_log(msg, broadcast = 1)
|
||||
/obj/item/detective_scanner/proc/add_log(msg, broadcast = 1)
|
||||
if(scanning)
|
||||
if(broadcast && ismob(loc))
|
||||
var/mob/M = loc
|
||||
@@ -175,8 +176,8 @@
|
||||
|
||||
/proc/get_timestamp()
|
||||
return time2text(world.time + 432000, ":ss")
|
||||
|
||||
/obj/item/device/detective_scanner/AltClick(mob/living/user)
|
||||
|
||||
/obj/item/detective_scanner/AltClick(mob/living/user)
|
||||
// Best way for checking if a player can use while not incapacitated, etc
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
return
|
||||
@@ -189,7 +190,7 @@
|
||||
to_chat(user, "<span class='notice'>The scanner logs are cleared.</span>")
|
||||
log = list()
|
||||
|
||||
/obj/item/device/detective_scanner/proc/displayDetectiveScanResults(mob/living/user)
|
||||
/obj/item/detective_scanner/proc/displayDetectiveScanResults(mob/living/user)
|
||||
// No need for can-use checks since the action button should do proper checks
|
||||
if(!LAZYLEN(log))
|
||||
to_chat(user, "<span class='notice'>Cannot display logs, the scanner has no logs.</span>")
|
||||
|
||||
Reference in New Issue
Block a user