From adde40854ad2ff0742967cd71455accda785aaa9 Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Sat, 24 May 2025 18:58:14 -0400 Subject: [PATCH] Gene Scanner Tool (#17733) * Gene scanner * loot and lathe for gene scanner * show suppressed genes --- .../objects/items/devices/scanners/gene.dm | 93 +++++++++++++++++++ .../objects/items/weapons/storage/belt.dm | 3 +- .../objects/items/weapons/storage/pouches.dm | 2 + code/game/objects/structures/loot_piles.dm | 2 + code/modules/research/designs/medical.dm | 7 ++ vorestation.dme | 1 + 6 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 code/game/objects/items/devices/scanners/gene.dm diff --git a/code/game/objects/items/devices/scanners/gene.dm b/code/game/objects/items/devices/scanners/gene.dm new file mode 100644 index 0000000000..aa9d88aa4b --- /dev/null +++ b/code/game/objects/items/devices/scanners/gene.dm @@ -0,0 +1,93 @@ +/obj/item/gene_scanner + name = "DNA identifier" + desc = "Assess the cargo sale value of items." + icon = 'icons/obj/device_alt.dmi' + icon_state = "health" + flags = NOBLUDGEON + slot_flags = SLOT_BELT + w_class = ITEMSIZE_SMALL + origin_tech = list(TECH_DATA = 1) + +// Always face the user when put on a table +/obj/item/gene_scanner/afterattack(atom/movable/AM, mob/user, proximity) + if(!proximity) + return + if(!ismob(AM) && !istype(AM,/obj/item/organ)) + return + + to_chat(user,span_boldnotice("You assesses \the [AM]'s genetic traits.")) + playsound(src, 'sound/misc/bloop.ogg', 50, 1) + flick("health2", src) + + if(do_after(user,6 SECONDS,AM)) + scan_genes(AM,user) + +/obj/item/gene_scanner/proc/scan_genes(atom/movable/AM,mob/user) + var/obj/item/organ/O = AM + var/mob/living/L = AM + var/output = "" + + // Actually do the scan + if(isliving(L)) // Mobs + if(!L.dna) + output += span_danger("Inconclusive.") + to_chat(user,output) + return + + if(SKELETON in L.mutations) + output += span_vdanger("SUBJECT IS SPOOKY SCARY SKELETON") + to_chat(user,output) + return + + var/mob/living/carbon/human/H = L + if(ishuman(L)) + if(H.species.flags & NO_DNA) + output += span_warning("Subject incompatible.") + to_chat(user,output) + return + if(H.species.flags & NO_SLEEVE) + output += span_danger("!!Subject incompatible with cloning!!") + "
" + output += span_infoplain("Unique enzymes: [L.dna.unique_enzymes]") + "
" + output += span_infoplain("Bloodtype: [L.dna.b_type]") + "
" + + if(L.radiation > 0) + if(L.radiation > 200) + output += span_danger("Subject is severely irradiated") + "
" + else + output += span_warning("Subject is irradiated") + "
" + if(L.getCloneLoss()) + if(L.getCloneLoss() > 50) + output += span_danger("[L.getCloneLoss()] Genetic damage") + "
" + else + output += span_warning("[L.getCloneLoss()] Genetic damage") + "
" + + if(NOCLONE in L.mutations) + output += span_warning("Subject's dna is unstable") + "
" + if(HUSK in L.mutations) + output += span_warning("Subject's anatomical structure is destroyed") + "
" + + output += span_boldnotice("Detected genes:") + "
" + for(var/datum/gene/G in GLOB.dna_genes) + if(!L.dna.GetSEState(G.block)) + continue + if(istype(G,/datum/gene/trait)) + var/datum/gene/trait/TG = G + if(ishuman(L)) + output += span_info("-[TG.linked_trait.name]") + span_warning((TG.has_conflict(H.species.traits) ? " (Suppressed)" : "")) + "
" + else + output += span_info("-[TG.linked_trait.name]") + "
" + output += span_infoplain(" [TG.linked_trait.desc]") + "
" + else + output += span_info("-[G.name]") + "
" + output += span_infoplain(" [G.desc]") + "
" + + else if(istype(O)) // Organs + if(!O.data) + output += span_danger("Inconclusive.") + to_chat(user,output) + return + + output += span_infoplain("Unique enzymes: [O.data.unique_enzymes]") + "
" + output += span_infoplain("Bloodtype: [O.data.b_type]") + "
" + + to_chat(user,output) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 4b3f29f6b3..41023dde05 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -248,7 +248,8 @@ /obj/item/mass_spectrometer, /obj/item/surgical, /obj/item/clothing/mask/chewable/candy/lolli, - /obj/item/extrapolator + /obj/item/extrapolator, + /obj/item/gene_scanner, ) /obj/item/storage/belt/medical/emt diff --git a/code/game/objects/items/weapons/storage/pouches.dm b/code/game/objects/items/weapons/storage/pouches.dm index 8a3552a65c..8158e479ba 100644 --- a/code/game/objects/items/weapons/storage/pouches.dm +++ b/code/game/objects/items/weapons/storage/pouches.dm @@ -159,6 +159,8 @@ /obj/item/taperoll/medical, /obj/item/storage/box/freezer, /obj/item/clothing/mask/chewable/candy/lolli, + /obj/item/extrapolator, + /obj/item/gene_scanner, ) //Vorestation add - added a bunch of misc medical stuff max_storage_space = ITEMSIZE_COST_SMALL*3 //Vorestation Add - makes it slightly smaller since its a lot of stuff with pocket access remove_delay = 5 //Vorestation Add - .5 second delay, get the medical things faster because there is no reason to use this otherwise. still gotta stop moving to take things out. diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm index 28e6c889db..b07abc1cf1 100644 --- a/code/game/objects/structures/loot_piles.dm +++ b/code/game/objects/structures/loot_piles.dm @@ -383,6 +383,8 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/cartridge/engineering, /obj/item/analyzer, /obj/item/healthanalyzer, + /obj/item/extrapolator, + /obj/item/gene_scanner, /obj/item/robotanalyzer, /obj/item/lightreplacer, /obj/item/radio, diff --git a/code/modules/research/designs/medical.dm b/code/modules/research/designs/medical.dm index bd6ff8f4f4..87ab6158d9 100644 --- a/code/modules/research/designs/medical.dm +++ b/code/modules/research/designs/medical.dm @@ -97,6 +97,13 @@ build_path = /obj/item/healthanalyzer/advanced sort_string = "KBAAC" +/datum/design/item/medical/gene_scanner + name = "Gene Scanner" + id = "gene_scanner" + req_tech = list(TECH_DATA = 1, TECH_BIO = 2) + build_path = /obj/item/gene_scanner + sort_string = "KBAAD" + /datum/design/item/medical/advanced_roller name = "advanced roller bed" desc = "A more advanced version of the regular roller bed, with inbuilt surgical stabilisers and an improved folding system." diff --git a/vorestation.dme b/vorestation.dme index fa4dfc0170..aae00602ab 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1446,6 +1446,7 @@ #include "code\game\objects\items\devices\radio\radio_vr.dm" #include "code\game\objects\items\devices\radio\radiopack.dm" #include "code\game\objects\items\devices\scanners\gas.dm" +#include "code\game\objects\items\devices\scanners\gene.dm" #include "code\game\objects\items\devices\scanners\guide.dm" #include "code\game\objects\items\devices\scanners\halogen.dm" #include "code\game\objects\items\devices\scanners\health.dm"