From 517128a53ffbfbe54516a89973e5c46e36ca0f66 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 24 Jan 2019 17:33:16 +0100 Subject: [PATCH] Adds a proper TRAIT_RADIMMUNE check to the portable scanner and cloner. (#42489) * ok hi * Add TRAIT_RADIMMUNE check to the portable gene scanner and to cloning * Add TRAIT_RADIMMUNE check to the portable gene scanner and to cloning * Implemented Suggestions. * "No Sir, im not a synth, check my DNA!" * You got it Boss * Remove a useless Return Co-Authored-By: Gousaid67 * Add a comment, also rerun checks --- code/game/machinery/cloning.dm | 14 +++++++------- code/game/objects/items/devices/scanners.dm | 10 +++++++--- .../living/carbon/human/species_types/skeletons.dm | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 685bcbf88c0..06d813c02ed 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -173,13 +173,13 @@ H.hardset_dna(ui, mutation_index, H.real_name, null, mrace, features) - if(efficiency > 2) - var/list/unclean_mutations = (GLOB.not_good_mutations|GLOB.bad_mutations) - H.dna.remove_mutation_group(unclean_mutations) - if(efficiency > 5 && prob(20)) - H.easy_randmut(POSITIVE) - if(efficiency < 3) - if(prob(50)) + if(!H.has_trait(TRAIT_RADIMMUNE))//dont apply mutations if the species is Mutation proof. + if(efficiency > 2) + var/list/unclean_mutations = (GLOB.not_good_mutations|GLOB.bad_mutations) + H.dna.remove_mutation_group(unclean_mutations) + if(efficiency > 5 && prob(20)) + H.easy_randmut(POSITIVE) + if(efficiency < 3 && prob(50)) var/mob/M = H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) if(ismob(M)) H = M diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index b208c54a2be..114376974ef 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -673,11 +673,15 @@ NANITE SCANNER var/list/discovered = list() //hit a dna console to update the scanners database /obj/item/sequence_scanner/attack(mob/living/M, mob/living/carbon/human/user) - user.visible_message("[user] has analyzed [M]'s genetic sequence.") - add_fingerprint(user) + if (!M.has_trait(TRAIT_RADIMMUNE) && !M.has_trait(TRAIT_BADDNA)) //no scanning if its a husk or DNA-less Species + user.visible_message("[user] has analyzed [M]'s genetic sequence.") + + gene_scan(M, user, src) + else - gene_scan(M, user, src) + user.visible_message("[user] failed to analyse [M]'s genetic sequence.", "[M] has no readable genetic sequence!") + /obj/item/sequence_scanner/afterattack(obj/O, mob/user, proximity) . = ..() diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index 8539e585dfd..f2624a139b7 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -17,4 +17,4 @@ /datum/species/skeleton/check_roundstart_eligible() if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) return TRUE - return ..() \ No newline at end of file + return ..()