Files
Paradise/code/modules/detective_work/swabs.dm
Silverplate bf750135d0 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>
2025-08-23 15:27:38 +00:00

103 lines
3.1 KiB
Plaintext

/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