mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] Genetics Tweaks (#11051)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f2b964cd59
commit
e6206e3f4e
@@ -721,7 +721,7 @@
|
|||||||
|
|
||||||
// Cooldown
|
// Cooldown
|
||||||
injector_ready = FALSE
|
injector_ready = FALSE
|
||||||
addtimer(CALLBACK(src, PROC_REF(injector_cooldown_finish)), 30 SECONDS)
|
addtimer(CALLBACK(src, PROC_REF(injector_cooldown_finish)), 5 SECONDS)
|
||||||
|
|
||||||
// Create it
|
// Create it
|
||||||
var/datum/transhuman/body_record/buf = buffers[buffer_id] // Traitgenes Use bodyrecords
|
var/datum/transhuman/body_record/buf = buffers[buffer_id] // Traitgenes Use bodyrecords
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/obj/item/gene_scanner
|
/obj/item/gene_scanner
|
||||||
name = "DNA identifier"
|
name = "DNA identifier"
|
||||||
desc = "The GenePeeper 3000, scans and identifies traits enabled by a subject's genetics. Can also scan limbs and organs to identify their dna. Decades of genetic research in your pocket, today! "
|
desc = "The GenePeeper 3000, scans and identifies traits enabled by a subject's genetics. Can also scan limbs, organs, and DNA injectors. Decades of genetic research in your pocket, today! "
|
||||||
icon = 'icons/obj/device_alt.dmi'
|
icon = 'icons/obj/device_alt.dmi'
|
||||||
icon_state = "health"
|
icon_state = "health"
|
||||||
flags = NOBLUDGEON
|
flags = NOBLUDGEON
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
/obj/item/gene_scanner/afterattack(atom/movable/AM, mob/user, proximity)
|
/obj/item/gene_scanner/afterattack(atom/movable/AM, mob/user, proximity)
|
||||||
if(!proximity)
|
if(!proximity)
|
||||||
return
|
return
|
||||||
if(!ismob(AM) && !istype(AM,/obj/item/organ))
|
if(!ismob(AM) && !istype(AM,/obj/item/organ) && !istype(AM,/obj/item/dnainjector))
|
||||||
return
|
return
|
||||||
|
|
||||||
to_chat(user,span_boldnotice("You assesses \the [AM]'s genetic traits."))
|
to_chat(user,span_boldnotice("You assesses \the [AM]'s genetic traits."))
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
/obj/item/gene_scanner/proc/scan_genes(atom/movable/AM,mob/user)
|
/obj/item/gene_scanner/proc/scan_genes(atom/movable/AM,mob/user)
|
||||||
var/obj/item/organ/O = AM
|
var/obj/item/organ/O = AM
|
||||||
var/mob/living/L = AM
|
var/mob/living/L = AM
|
||||||
|
var/obj/item/dnainjector/I = AM
|
||||||
var/output = ""
|
var/output = ""
|
||||||
|
|
||||||
// Actually do the scan
|
// Actually do the scan
|
||||||
@@ -70,15 +71,16 @@
|
|||||||
for(var/datum/gene/G in GLOB.dna_genes)
|
for(var/datum/gene/G in GLOB.dna_genes)
|
||||||
if(!L.dna.GetSEState(G.block))
|
if(!L.dna.GetSEState(G.block))
|
||||||
continue
|
continue
|
||||||
|
var/dna_val = L.dna.GetSEValue(G.block)
|
||||||
if(istype(G,/datum/gene/trait))
|
if(istype(G,/datum/gene/trait))
|
||||||
var/datum/gene/trait/TG = G
|
var/datum/gene/trait/TG = G
|
||||||
if(ishuman(L))
|
if(ishuman(L))
|
||||||
output += span_info("-[TG.linked_trait.name]") + span_warning((TG.has_conflict(H.species.traits) ? " (Suppressed)" : "")) + "<br>"
|
output += span_info("-\[[EncodeDNABlock(dna_val)]\]:[TG.linked_trait.name]") + span_warning((TG.has_conflict(H.species.traits) ? " (Suppressed)" : "")) + "<br>"
|
||||||
else
|
else
|
||||||
output += span_info("-[TG.linked_trait.name]") + "<br>"
|
output += span_info("-\[[EncodeDNABlock(dna_val)]\]:[TG.linked_trait.name]") + "<br>"
|
||||||
output += span_infoplain(" [TG.linked_trait.desc]") + "<br>"
|
output += span_infoplain(" [TG.linked_trait.desc]") + "<br>"
|
||||||
else
|
else
|
||||||
output += span_info("-[G.name]") + "<br>"
|
output += span_info("-\[[EncodeDNABlock(dna_val)]\]:[G.name]") + "<br>"
|
||||||
output += span_infoplain(" [G.desc]") + "<br>"
|
output += span_infoplain(" [G.desc]") + "<br>"
|
||||||
|
|
||||||
else if(istype(O)) // Organs
|
else if(istype(O)) // Organs
|
||||||
@@ -90,4 +92,23 @@
|
|||||||
output += span_infoplain("Unique enzymes: [O.data.unique_enzymes]") + "<br>"
|
output += span_infoplain("Unique enzymes: [O.data.unique_enzymes]") + "<br>"
|
||||||
output += span_infoplain("Bloodtype: [O.data.b_type]") + "<br>"
|
output += span_infoplain("Bloodtype: [O.data.b_type]") + "<br>"
|
||||||
|
|
||||||
|
else if(istype(I)) // Dna injectors
|
||||||
|
if(I.buf?.dna)
|
||||||
|
output += span_infoplain("Unique enzymes: [I.buf.dna.unique_enzymes != "" ? I.buf.dna.unique_enzymes : "STRIPPED" ]") + "<br>"
|
||||||
|
output += span_infoplain("Bloodtype: [I.buf.dna.b_type]") + "<br>"
|
||||||
|
output += span_boldnotice("Detected genes:") + "<br>"
|
||||||
|
for(var/datum/gene/G in GLOB.dna_genes)
|
||||||
|
if(!I.buf.dna.GetSEState(G.block))
|
||||||
|
continue
|
||||||
|
var/dna_val = I.buf.dna.GetSEValue(G.block)
|
||||||
|
if(istype(G,/datum/gene/trait))
|
||||||
|
var/datum/gene/trait/TG = G
|
||||||
|
output += span_info("-\[[EncodeDNABlock(dna_val)]\]:[TG.linked_trait.name]") + "<br>"
|
||||||
|
output += span_infoplain(" [TG.linked_trait.desc]") + "<br>"
|
||||||
|
else
|
||||||
|
output += span_info("-\[[EncodeDNABlock(dna_val)]\]:[G.name]") + "<br>"
|
||||||
|
output += span_infoplain(" [G.desc]") + "<br>"
|
||||||
|
else
|
||||||
|
output += span_danger("ERR - Invalid sequencing data.")
|
||||||
|
|
||||||
to_chat(user,output)
|
to_chat(user,output)
|
||||||
|
|||||||
Reference in New Issue
Block a user