mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
CSI Eridani: Detective content update (#27512)
* Ports Bay/ss220 detective work * Removs detective scanner from circulation * forensic supply crate * Ports Bay/ss220 detective work * Removs detective scanner from circulation * forensic supply crate * Mapping changes * Mapping changes * Ports Bay/ss220 detective work * Removs detective scanner from circulation * makes linters work * i hate vscode * fixes some nonsence * may fix CI * restore maps to CURRENT * QOL * makes gunshot residue actually work. * fixes cursed logic * adds scene cards again * scene cards but real! * fix med records, breaks attack chain * Revives the PR * fixes swabs * TGUI update * lewc and dgl first reviews * dna medical records * LINTERS FIX * linter fix 2 * blood fix and linters again * oops * updated but broke * help * Chuga suggestion * Fix shoes ending up with a null blood_DNA entry * replace astype() because linters are still in the stone age * 2 fixes, adds fingerprint cards to HOP locker. * check user intent instead of target intent when swabbing * adds 2 boxes of swabs to the det drobe * comma important * adds new det tools to sec belt * Chuga review * fuckin github * should fix TM * oops * how about now * also fixes cere * fixes mobvars * Update code/modules/detective_work/swabs.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Update code/game/objects/effects/decals/cleanable.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Update code/game/objects/structures/crates_lockers/closets/secure/security_lockers.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Lewc review easy changes Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * Updated related bugfixes * add swab to lathe * fix metastation * Fixes scene_cards * fix cerestation * fixes forensic kits * Changes and fixes forensic_machines * changes /obj/item/sample to use initialize * spaces * fix initialize to use a capital I * mapload * fixes linters probably * meta fix * swab fix maybe * oops * actual fix probably * ma ybe * bundle rebuild * fixes fingerprint cards * remove duplicate proc call * /obj/item/sample migration * /obj/item/forensics migration * microscope and dnaforensics machines migrated * I FORGOT DA VARS * linter fix * linter fix 2 * Funny review part 1 Co-authored-by: Charlie Nolan <funnyman3595@gmail.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * bundle update * contra/funny review * fixes CI probably * CI fix * cere mapping fix yipee * screwdriver panel fixes * improve forensic machine interactions * improve open panel msg * pollard review Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * linter fix * Apply suggestions from pope review Co-authored-by: PopeDaveThe3th <80988376+PopeDaveThe3th@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * rebuild * rebuild * Detective Rework --------- Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Chuga <98280110+chuga-git@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Arthri <41360489+a@users.noreply.github.com> Co-authored-by: Toastical <20125180+Toastical@users.noreply.github.com> Co-authored-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: PopeDaveThe3th <80988376+PopeDaveThe3th@users.noreply.github.com>
This commit is contained in:
co-authored by
Luc
Charlie Nolan
PollardTheDragon
PopeDaveThe3th
Burzah
Chuga
Arthri
Toastical
parent
ff457fb613
commit
bf750135d0
@@ -80,3 +80,179 @@
|
||||
else
|
||||
to_chat(user, "[src] is empty.")
|
||||
icon_state = "evidenceobj"
|
||||
|
||||
/obj/item/sample
|
||||
name = "\improper Forensic sample"
|
||||
icon = 'icons/obj/forensics/forensics.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/list/evidence = list()
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/sample/Initialize(mapload, atom/supplied)
|
||||
. = ..()
|
||||
if(supplied)
|
||||
transfer_evidence(supplied)
|
||||
name = "[initial(name)] ([supplied])"
|
||||
|
||||
/obj/item/sample/print/New(newloc, atom/supplied)
|
||||
. = ..()
|
||||
if(length(evidence))
|
||||
icon_state = "fingerprint1"
|
||||
|
||||
/obj/item/sample/proc/transfer_evidence(atom/supplied)
|
||||
if(length(supplied.suit_fibers))
|
||||
evidence = supplied.suit_fibers.Copy()
|
||||
supplied.suit_fibers.Cut()
|
||||
|
||||
/obj/item/sample/proc/merge_evidence(obj/item/sample/supplied, mob/user)
|
||||
if(!length(supplied.evidence))
|
||||
return FALSE
|
||||
evidence |= supplied.evidence
|
||||
name = "[initial(name)] (combined)"
|
||||
to_chat(user, "<span class='notice'>You add [supplied] to [src].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/sample/print/merge_evidence(obj/item/sample/supplied, mob/user)
|
||||
if(!supplied || !length(supplied.evidence))
|
||||
return FALSE
|
||||
for(var/print in supplied.evidence)
|
||||
if(evidence[print])
|
||||
evidence[print] = stringmerge(evidence[print], supplied.evidence[print])
|
||||
else
|
||||
evidence[print] = supplied.evidence[print]
|
||||
name = "[initial(name)] (combined)"
|
||||
to_chat(user, "<span class='notice'>You overlay [src] and [supplied], combining the print records.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/sample/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, src.type))
|
||||
user.unequip(used)
|
||||
if(merge_evidence(used, user))
|
||||
qdel(used)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
/obj/item/sample/print
|
||||
name = "fingerprint card"
|
||||
desc = "Preserves fingerprints."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
icon_state = "fingerprint0"
|
||||
item_state = "paper"
|
||||
/// boolean variable, indicates if print card is in the used state
|
||||
var/used
|
||||
|
||||
/obj/item/sample/print/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "fingerprint0"
|
||||
if(used)
|
||||
icon_state = "fingerprint1"
|
||||
|
||||
|
||||
/obj/item/sample/print/activate_self(mob/user)
|
||||
if(..() || length(evidence) || !ishuman(user))
|
||||
return FINISH_ATTACK
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.gloves)
|
||||
to_chat(user, "<span class='warning'>Take [H.gloves] off first.</span>")
|
||||
return FINISH_ATTACK
|
||||
|
||||
to_chat(user, "<span class='notice'>You press your fingertips firmly against the card.</span>")
|
||||
var/fullprint = H.get_full_print()
|
||||
evidence[fullprint] = fullprint
|
||||
name = "[initial(name)] ([H])"
|
||||
used = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/sample/print/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(user.zone_selected == "r_hand" || user.zone_selected == "l_hand")
|
||||
|
||||
if(!ishuman(target))
|
||||
return ..()
|
||||
|
||||
if(length(evidence))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(H.gloves)
|
||||
to_chat(user, "<span class='warning'>[H] is wearing gloves.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user != H && H.stat == CONSCIOUS && !H.restrained())
|
||||
user.visible_message("<span class='danger'>[user] tried to fingerprint [H], but he resists.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/has_hand = (H.has_organ("r_hand") || H.has_organ("l_hand"))
|
||||
if(!has_hand)
|
||||
to_chat(user, "<span class='warning'>[H] has no hands!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!do_after(user, 2 SECONDS, target = H))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
user.visible_message("<span class='notice'>[user] makes a copy of [H]'s fingerprints'.</span>")
|
||||
var/fullprint = H.get_full_print()
|
||||
evidence[fullprint] = fullprint
|
||||
transfer_evidence(src)
|
||||
name = "[initial(name)] ([H])"
|
||||
used = TRUE
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to target [H]'s hands to obtain fingerprints!'.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/sample/print/transfer_evidence(atom/supplied)
|
||||
if(length(supplied.fingerprints))
|
||||
for(var/print in supplied.fingerprints)
|
||||
evidence[print] = supplied.fingerprints[print]
|
||||
supplied.fingerprints.Cut()
|
||||
|
||||
/obj/item/sample/fibers
|
||||
name = "fiber bag"
|
||||
desc = "Used to store fiber evidence for forensic examianation."
|
||||
icon_state = "fiberbag"
|
||||
|
||||
/obj/item/forensics
|
||||
icon = 'icons/obj/forensics/forensics.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/forensics/sample_kit
|
||||
name = "fiber collection kit"
|
||||
desc = "A magnifying glass and pair of tweezers. Used to lift fabric fibers from crime scene objects. Use on harm intent to collect samples without disturbing the scene."
|
||||
icon_state = "m_glass"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
/// naming for individual evidence items
|
||||
var/evidence_type = "fibers"
|
||||
var/evidence_path = /obj/item/sample/fibers
|
||||
/obj/item/forensics/sample_kit/proc/can_take_sample(mob/user, atom/supplied)
|
||||
return length(supplied.suit_fibers)
|
||||
|
||||
/obj/item/forensics/sample_kit/proc/take_sample(mob/user, atom/supplied)
|
||||
var/obj/item/sample/S = new evidence_path(get_turf(user))
|
||||
S.transfer_evidence(supplied)
|
||||
to_chat(user, "<span class='notice'>You move [S.evidence.len] [S.evidence.len > 1 ? "[evidence_type]s" : "[evidence_type]"] into [S].</span>")
|
||||
|
||||
/obj/item/forensics/sample_kit/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
if(can_take_sample(user, target))
|
||||
take_sample(user, target)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot find [evidence_type] on [target].</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/forensics/sample_kit/MouseDrop(atom/over)
|
||||
if(ismob(src.loc))
|
||||
interact_with_atom(over, loc)
|
||||
|
||||
/obj/item/forensics/sample_kit/powder
|
||||
name = "fingerprint powder"
|
||||
desc = "A jar of aluminum powder and a specialized brush. Use on harm intent to collect samples without leaving additional prints."
|
||||
icon_state = "dust"
|
||||
evidence_type = "prints"
|
||||
evidence_path = /obj/item/sample/print
|
||||
|
||||
/obj/item/forensics/sample_kit/powder/can_take_sample(mob/user, atom/supplied)
|
||||
return length(supplied.fingerprints)
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
// Boxes
|
||||
/obj/item/storage/box/swabs
|
||||
name = "box of forensic swabs"
|
||||
desc = "A sterile box full of forensic swabs, used to acquire DNA samples and test for lingering weapon residue."
|
||||
icon_state = "sec_box"
|
||||
|
||||
/obj/item/storage/box/swabs/populate_contents()
|
||||
..()
|
||||
new /obj/item/forensics/swab(src)
|
||||
new /obj/item/forensics/swab(src)
|
||||
new /obj/item/forensics/swab(src)
|
||||
new /obj/item/forensics/swab(src)
|
||||
new /obj/item/forensics/swab(src)
|
||||
new /obj/item/forensics/swab(src)
|
||||
|
||||
/obj/item/storage/box/fingerprints
|
||||
name = "box of fingerprint cards"
|
||||
desc = "A sealed box full of fingerprint cards, used to acquire print sets from humanoids."
|
||||
icon_state = "id_prisoner_box"
|
||||
|
||||
/obj/item/storage/box/fingerprints/populate_contents()
|
||||
..()
|
||||
new /obj/item/sample/print(src)
|
||||
new /obj/item/sample/print(src)
|
||||
new /obj/item/sample/print(src)
|
||||
new /obj/item/sample/print(src)
|
||||
new /obj/item/sample/print(src)
|
||||
new /obj/item/sample/print(src)
|
||||
|
||||
// Crime scene kit
|
||||
/obj/item/storage/briefcase/crimekit
|
||||
name = "crime scene kit"
|
||||
desc = "A stainless-steel case containing everything a detective could need. It's quite heavy."
|
||||
icon = 'icons/obj/forensics/forensics.dmi'
|
||||
icon_state = "case"
|
||||
lefthand_file = 'icons/obj/forensics/items_lefthand.dmi'
|
||||
righthand_file = 'icons/obj/forensics/items_righthand.dmi'
|
||||
item_state = "case"
|
||||
|
||||
/obj/item/storage/briefcase/crimekit/populate_contents()
|
||||
..()
|
||||
new /obj/item/storage/box/swabs(src)
|
||||
new /obj/item/storage/box/fingerprints(src)
|
||||
new /obj/item/forensics/sample_kit(src)
|
||||
new /obj/item/forensics/sample_kit/powder(src)
|
||||
new /obj/item/storage/csi_markers(src)
|
||||
|
||||
/obj/item/storage/csi_markers
|
||||
name = "crime scene markers box"
|
||||
desc = "A cardboard box full of crime scene marker cards."
|
||||
icon = 'icons/obj/boxes.dmi'
|
||||
icon_state = "sec_box"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/storage/csi_markers/populate_contents()
|
||||
new /obj/item/csi_marker/n1(src)
|
||||
new /obj/item/csi_marker/n2(src)
|
||||
new /obj/item/csi_marker/n3(src)
|
||||
new /obj/item/csi_marker/n4(src)
|
||||
new /obj/item/csi_marker/n5(src)
|
||||
new /obj/item/csi_marker/n6(src)
|
||||
new /obj/item/csi_marker/n7(src)
|
||||
@@ -0,0 +1,289 @@
|
||||
// DNA machine
|
||||
/obj/machinery/dnaforensics
|
||||
name = "\improper DNA analyzer"
|
||||
desc = "A high-tech machine that is designed to sequence DNA samples."
|
||||
icon = 'icons/obj/forensics/forensics.dmi'
|
||||
icon_state = "dna-open"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
var/obj/item/forensics/swab = null
|
||||
/// is currently scanning
|
||||
var/scanning = FALSE
|
||||
/// Global number of reports ran from that machine type
|
||||
var/report_num = FALSE
|
||||
|
||||
/obj/machinery/dnaforensics/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/dnaforensics(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/dnaforensics/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'><b>Click while holding a sample</b> to insert a sample.</span>"
|
||||
. += "<span class='notice'><b>Alt-Click</b> to eject the current sample.</span>"
|
||||
. += "<span class='notice'><b>Click with an empty hand</b> to analyze the current sample.</span>"
|
||||
|
||||
/obj/machinery/dnaforensics/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/forensics))
|
||||
return ..()
|
||||
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You must close the panel!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(swab)
|
||||
to_chat(user, "<span class='warning'>There is already a sample inside the scanner.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(used, /obj/item/forensics/swab))
|
||||
to_chat(user, "<span class='notice'>You insert [used] into [src].</span>")
|
||||
user.unequip(used)
|
||||
used.forceMove(src)
|
||||
swab = used
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This is not a compatible sample!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/machinery/dnaforensics/attack_hand(mob/user)
|
||||
|
||||
if(!swab)
|
||||
to_chat(user, "<span class='warning'>The scanner is empty!</span>")
|
||||
return
|
||||
scanning = TRUE
|
||||
update_appearance(UPDATE_ICON)
|
||||
to_chat(user, "<span class='notice'>The scanner begins to hum as you analyze [swab].</span>")
|
||||
|
||||
if(!do_after(user, 2.5 SECONDS, src) || QDELETED(swab))
|
||||
to_chat(user, "<span class='notice'>You have stopped analyzing [swab || "the swab"].</span>")
|
||||
scanning = FALSE
|
||||
update_appearance(UPDATE_ICON)
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>Printing report...</span>")
|
||||
var/obj/item/paper/report = new(get_turf(src))
|
||||
report.stamped = list(/obj/item/stamp)
|
||||
report_num++
|
||||
|
||||
var/obj/item/forensics/swab/bloodswab = swab
|
||||
report.name = ("DNA scanner report no. [++report_num]: [bloodswab.name]")
|
||||
// dna data itself
|
||||
var/data = "No analysis data available."
|
||||
if(!isnull(bloodswab.dna))
|
||||
data = "Spectrometric analysis on the provided sample determined the presence of DNA. DNA String(s) found: [length(bloodswab.dna)].<br><br>"
|
||||
for(var/blood in bloodswab.dna)
|
||||
data += "<span class='notice'>Blood type: [bloodswab.dna[blood]]<br>\nDNA: [blood]<br><br></span>"
|
||||
else
|
||||
data += "\nNo DNA found.<br>"
|
||||
report.info = "<b>Report number: [report_num]</b><br>"
|
||||
report.info += "<b>\nAnalyzed object:</b><br>[bloodswab.name]<br>[bloodswab.desc]<br><br>" + data
|
||||
report.forceMove(get_turf(src))
|
||||
report.update_icon()
|
||||
scanning = FALSE
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/obj/machinery/dnaforensics/proc/remove_sample(mob/living/remover)
|
||||
if(!istype(remover) || HAS_TRAIT(remover, TRAIT_HANDS_BLOCKED) || !Adjacent(remover))
|
||||
return
|
||||
if(!swab)
|
||||
to_chat(remover, "<span class='warning'>There is no sample inside the scanner!</span>")
|
||||
return
|
||||
to_chat(remover, "<span class='notice'>You remove [swab] from the scanner.</span>")
|
||||
swab.forceMove(get_turf(src))
|
||||
remover.put_in_hands(swab)
|
||||
swab = null
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/dnaforensics/AltClick()
|
||||
remove_sample(usr)
|
||||
|
||||
/obj/machinery/dnaforensics/MouseDrop(atom/other)
|
||||
if(usr == other)
|
||||
remove_sample(usr)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/dnaforensics/update_icon_state()
|
||||
if(scanning)
|
||||
icon_state = "dna-working"
|
||||
else if(swab)
|
||||
icon_state = "dna-closed"
|
||||
else
|
||||
icon_state = "dna-open"
|
||||
|
||||
/obj/machinery/dnaforensics/screwdriver_act(mob/user, obj/item/I)
|
||||
if(swab)
|
||||
return
|
||||
. = TRUE
|
||||
default_deconstruction_screwdriver(user, "dna-open-unpowered", "dna-open", I)
|
||||
|
||||
/obj/machinery/dnaforensics/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
default_unfasten_wrench(user, I)
|
||||
|
||||
/obj/machinery/dnaforensics/crowbar_act(mob/user, obj/item/I)
|
||||
if(swab)
|
||||
return
|
||||
. = TRUE
|
||||
default_deconstruction_crowbar(user, I)
|
||||
|
||||
// Microscope code itself
|
||||
/obj/machinery/microscope
|
||||
name = "microscope"
|
||||
desc = "A microscope capable of magnifying images up to 3000 times."
|
||||
icon = 'icons/obj/forensics/forensics.dmi'
|
||||
icon_state = "microscope"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
var/obj/item/sample = null
|
||||
var/report_num = 0
|
||||
var/fingerprint_complete = 6
|
||||
|
||||
/obj/machinery/microscope/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/microscope(null)
|
||||
component_parts += new /obj/item/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/stack/sheet/glass(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/microscope/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'><b>Click while holding a sample</b> to insert a sample.</span>"
|
||||
. += "<span class='notice'><b>Alt-Click</b> to eject the current sample.</span>"
|
||||
. += "<span class='notice'><b>Click with an empty hand</b> to study the current sample.</span>"
|
||||
|
||||
/obj/machinery/microscope/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/forensics/swab) && !istype(used, /obj/item/sample))
|
||||
return ..()
|
||||
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You must close the panel!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(sample)
|
||||
to_chat(user, "<span class='warning'>There is already a sample in the microscope!</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(used, /obj/item/forensics/swab)|| istype(used, /obj/item/sample/fibers) || istype(used, /obj/item/sample/print))
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>You insert [used] into the microscope.</span>")
|
||||
user.unequip(used)
|
||||
used.forceMove(src)
|
||||
sample = used
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/machinery/microscope/attack_hand(mob/user)
|
||||
|
||||
if(!sample)
|
||||
to_chat(user, "<span class='warning'>There is no sample in the microscope to study.</span>")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>The microscope buzzes as you study [sample].</span>")
|
||||
|
||||
if(!do_after(user, 2.5 SECONDS, src) || !sample)
|
||||
to_chat(user, "<span class='notice'>You stop studying [sample].</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>Printing Report...</span>")
|
||||
var/obj/item/paper/report = new(get_turf(src))
|
||||
report.stamped = list(/obj/item/stamp)
|
||||
report_num++
|
||||
|
||||
if(istype(sample, /obj/item/forensics/swab))
|
||||
var/obj/item/forensics/swab/swab = sample
|
||||
|
||||
report.name = ("Forensic report no. [++report_num]: [swab.name]")
|
||||
report.info = "<b>Report number: [report_num]</b><br>"
|
||||
report.info += "<b>Analyzed object:</b><br>[swab.name]<br><br>"
|
||||
|
||||
if(swab.gsr)
|
||||
report.info += "Gunpowder residue found. Caliber: [swab.gsr]."
|
||||
else
|
||||
report.info += "Powder residue from the bullet was not found."
|
||||
|
||||
else if(istype(sample, /obj/item/sample/fibers))
|
||||
var/obj/item/sample/fibers/fibers = sample
|
||||
report.name = ("Report on fiber sample no. [++report_num]: [fibers.name]")
|
||||
report.info = "<b>Report number: [report_num]</b><br>"
|
||||
report.info += "<b>Analyzed object:</b><br>[fibers.name]<br><br>"
|
||||
if(fibers.evidence)
|
||||
report.info += "Molecular analysis on the provided sample determined the presence of the following unique fiber strands:<br><br>"
|
||||
for(var/fiber in fibers.evidence)
|
||||
report.info += "<span class='notice'>Most Likely Match: [fiber]<br><br></span>"
|
||||
else
|
||||
report.info += "No fibers found."
|
||||
else if(istype(sample, /obj/item/sample/print))
|
||||
report.name = ("Fingerprint Analysis Report No. [report_num]: [sample.name]")
|
||||
report.info = "<b>Report number: [report_num]</b><br>"
|
||||
report.info += "<b>Fingerprint Analysis Report No. [report_num]</b>: [sample.name]<br>"
|
||||
var/obj/item/sample/print/card = sample
|
||||
if(card.evidence && card.evidence.len)
|
||||
report.info += "<br>Surface analysis identified the following unique fingerprints:<br><br>"
|
||||
for(var/prints in card.evidence)
|
||||
report.info += "<span class='notice'>Fingerprint: </span>"
|
||||
if(!is_complete_print(prints))
|
||||
report.info += "INCOMPLETE PRINT"
|
||||
else
|
||||
report.info += "[prints]"
|
||||
report.info += "<br>"
|
||||
else
|
||||
report.info += "No analysis information available."
|
||||
|
||||
if(report)
|
||||
report.update_icon()
|
||||
if(report.info)
|
||||
to_chat(user, report.info)
|
||||
return
|
||||
|
||||
/obj/machinery/microscope/proc/remove_sample(mob/living/remover)
|
||||
if(!istype(remover) || remover.incapacitated() || !Adjacent(remover))
|
||||
return
|
||||
if(!sample)
|
||||
to_chat(remover, "<span class='warning'>There is no sample inside the microscope!</span>")
|
||||
return
|
||||
to_chat(remover, "<span class='notice'>you removed [sample] from the microscope.</span>")
|
||||
sample.forceMove(get_turf(src))
|
||||
remover.put_in_hands(sample)
|
||||
sample = null
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/microscope/proc/is_complete_print(print)
|
||||
return stringpercent(print) <= fingerprint_complete
|
||||
|
||||
/obj/machinery/microscope/AltClick()
|
||||
remove_sample(usr)
|
||||
|
||||
/obj/machinery/microscope/MouseDrop(atom/other)
|
||||
if(usr == other)
|
||||
remove_sample(usr)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/microscope/update_icon_state()
|
||||
icon_state = "microscope"
|
||||
if(sample)
|
||||
icon_state += "slide"
|
||||
|
||||
/obj/machinery/microscope/screwdriver_act(mob/user, obj/item/I)
|
||||
if(sample)
|
||||
return
|
||||
. = TRUE
|
||||
default_deconstruction_screwdriver(user, "microscope_off", "microscope", I)
|
||||
|
||||
/obj/machinery/microscope/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
default_unfasten_wrench(user, I)
|
||||
|
||||
/obj/machinery/microscope/crowbar_act(mob/user, obj/item/I)
|
||||
if(sample)
|
||||
return
|
||||
. = TRUE
|
||||
default_deconstruction_crowbar(user, I)
|
||||
@@ -0,0 +1,35 @@
|
||||
/obj/item/csi_marker
|
||||
name = "crime scene marker"
|
||||
desc = "Plastic cards used to mark points of interests on the scene. Just like in the holoshows!"
|
||||
icon = 'icons/obj/forensics/forensics.dmi'
|
||||
icon_state = "card1"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
/// Used for the number on the marker
|
||||
var/number
|
||||
|
||||
/obj/item/csi_marker/n1
|
||||
number = 1
|
||||
|
||||
/obj/item/csi_marker/n2
|
||||
number = 2
|
||||
icon_state = "card2"
|
||||
|
||||
/obj/item/csi_marker/n3
|
||||
number = 3
|
||||
icon_state = "card3"
|
||||
|
||||
/obj/item/csi_marker/n4
|
||||
number = 4
|
||||
icon_state = "card4"
|
||||
|
||||
/obj/item/csi_marker/n5
|
||||
number = 5
|
||||
icon_state = "card5"
|
||||
|
||||
/obj/item/csi_marker/n6
|
||||
number = 6
|
||||
icon_state = "card6"
|
||||
|
||||
/obj/item/csi_marker/n7
|
||||
number = 7
|
||||
icon_state = "card7"
|
||||
@@ -0,0 +1,102 @@
|
||||
/obj/item/forensics/swab
|
||||
name = "sample collection kit"
|
||||
desc = "A sterile cotton swab and test tube for collecting samples."
|
||||
icon_state = "swab"
|
||||
/// currently in machine
|
||||
var/dispenser = FALSE
|
||||
/// gunshot residue data
|
||||
var/gsr = FALSE
|
||||
/// DNA sample data
|
||||
var/list/dna
|
||||
/// boolean, used or not
|
||||
var/used
|
||||
|
||||
/obj/item/forensics/swab/proc/is_used()
|
||||
return used
|
||||
|
||||
/obj/item/forensics/swab/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(isstorage(target)) // Storage handling. Maybe add an intent check?
|
||||
return ..()
|
||||
|
||||
if(is_used())
|
||||
to_chat(user, "<span class='warning'>This sample kit is already used.</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
add_fingerprint(user)
|
||||
in_use = TRUE
|
||||
to_chat(user, "<span class='notice'>You start collecting evidence...</span>")
|
||||
if(do_after(user, 2 SECONDS, target = user))
|
||||
var/list/choices = list()
|
||||
var/list/found_blood = list()
|
||||
|
||||
// This is utterly hateful, yes, but so is blood_DNA. - Chuga
|
||||
if(issimulatedturf(target))
|
||||
for(var/obj/effect/decal/cleanable/C in target.contents)
|
||||
if(istype(C, /obj/effect/decal/cleanable/blood) || istype(C, /obj/effect/decal/cleanable/trail_holder))
|
||||
found_blood |= C.blood_DNA
|
||||
else if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
found_blood |= L.get_blood_dna_list()
|
||||
else
|
||||
if(target.blood_DNA)
|
||||
found_blood |= target.blood_DNA
|
||||
|
||||
if(length(found_blood))
|
||||
choices |= "Blood"
|
||||
if(istype(target, /obj/item/clothing/gloves))
|
||||
choices |= "Gunpowder particles"
|
||||
|
||||
var/choice
|
||||
if(!length(choices))
|
||||
to_chat(user, "<span class='warning'>There is no evidence on [target].</span>")
|
||||
in_use = FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else if(length(choices) == 1)
|
||||
choice = choices[1]
|
||||
else
|
||||
choice = tgui_input_list(user, "What evidence are you looking for?", "Collection of evidence", choices)
|
||||
|
||||
if(!choice)
|
||||
in_use = FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/sample_type
|
||||
var/target_dna
|
||||
var/target_gsr
|
||||
if(choice == "Blood")
|
||||
target_dna = found_blood
|
||||
sample_type = "blood"
|
||||
|
||||
else if(choice == "Gunpowder particles")
|
||||
var/obj/item/clothing/B = target
|
||||
if(!istype(B) || !B.gunshot_residue)
|
||||
to_chat(user, "<span class='warning'>There is not a hint of gunpowder on [target].</span>")
|
||||
in_use = FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
target_gsr = B.gunshot_residue
|
||||
sample_type = "powder"
|
||||
|
||||
if(sample_type)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] takes a swab from [target] for analysis.</span>",
|
||||
"<span class='notice'>You take a swab from [target] for analysis.</span>")
|
||||
if(!dispenser)
|
||||
dna = target_dna
|
||||
gsr = target_gsr
|
||||
set_used(sample_type, target)
|
||||
else
|
||||
var/obj/item/forensics/swab/S = new(get_turf(user))
|
||||
S.dna = target_dna
|
||||
S.gsr = target_gsr
|
||||
S.set_used(sample_type, target)
|
||||
in_use = FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/forensics/swab/proc/set_used(sample_str, atom/source)
|
||||
name = "[initial(name)] ([sample_str] - [source])"
|
||||
desc = "[initial(desc)] The label on the bottle reads: 'Sample [sample_str] - [source].'."
|
||||
icon_state = "swab_used"
|
||||
used = TRUE
|
||||
|
||||
/obj/item/forensics/swab/cyborg
|
||||
dispenser = TRUE
|
||||
Reference in New Issue
Block a user