From e584a7bb150797a09673aaacc01a214518822dca Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Mon, 23 Mar 2020 17:48:28 +0100 Subject: [PATCH 1/3] Makes it so that IRC can't be cloned --- code/game/machinery/computer/cloning.dm | 6 +++--- code/modules/mob/living/carbon/brain/robotic_brain.dm | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 14a8e2b6ddc..3091caa82a2 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -359,12 +359,12 @@ if(scan_brain && !can_brainscan()) return if(isnull(subject) || (!(ishuman(subject))) || (!subject.dna)) - if(isalien(subject)) + if(isalien(subject)) scantemp = "Error: Xenomorphs are not scannable." SSnanoui.update_uis(src) return // can add more conditions for specific non-human messages here - else + else scantemp = "Error: Subject species is not scannable." SSnanoui.update_uis(src) return @@ -372,7 +372,7 @@ var/obj/item/organ/internal/brain/Brn = subject.get_int_organ(/obj/item/organ/internal/brain) if(istype(Brn)) if(NO_SCAN in Brn.dna.species.species_traits) - scantemp = "Error: [subject.dna.species.name_plural] are not scannable." + scantemp = "Error: [Brn.dna.species.name_plural] are not scannable." SSnanoui.update_uis(src) return if(!subject.get_int_organ(/obj/item/organ/internal/brain)) diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm index b051fda9d89..c92b8a92470 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -106,9 +106,18 @@ radio_action.ApplyIcon() /obj/item/mmi/robotic_brain/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/H) + if(!H) + return FALSE + + var/had_dna = TRUE + if(!brainmob.dna) + had_dna = FALSE + brainmob.dna = H.dna.Clone() // Take the new targets dna to ensure the created holder has the correct DNA if(..()) if(imprinted_master) to_chat(H, "You are permanently imprinted to [imprinted_master], obey [imprinted_master]'s every order and assist [imprinted_master.p_them()] in completing [imprinted_master.p_their()] goals at any cost.") + else if(!had_dna) + brainmob.dna = null // Reset it for next use /obj/item/mmi/robotic_brain/proc/transfer_personality(mob/candidate) From 6918a3427743668b421bbac7e708572b4662d595 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Mon, 23 Mar 2020 18:52:06 +0100 Subject: [PATCH 2/3] Better fix --- .../mob/living/carbon/brain/robotic_brain.dm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm index c92b8a92470..de89e1a7aa6 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -106,19 +106,9 @@ radio_action.ApplyIcon() /obj/item/mmi/robotic_brain/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/H) - if(!H) - return FALSE - - var/had_dna = TRUE - if(!brainmob.dna) - had_dna = FALSE - brainmob.dna = H.dna.Clone() // Take the new targets dna to ensure the created holder has the correct DNA if(..()) if(imprinted_master) to_chat(H, "You are permanently imprinted to [imprinted_master], obey [imprinted_master]'s every order and assist [imprinted_master.p_them()] in completing [imprinted_master.p_their()] goals at any cost.") - else if(!had_dna) - brainmob.dna = null // Reset it for next use - /obj/item/mmi/robotic_brain/proc/transfer_personality(mob/candidate) searching = FALSE @@ -215,6 +205,9 @@ brainmob.container = src brainmob.stat = CONSCIOUS brainmob.SetSilence(0) + brainmob.dna = new(brainmob) + brainmob.dna.ResetSE() + brainmob.dna.ResetUI() GLOB.dead_mob_list -= brainmob ..() From afdeb815513fe4dad16d6eb9b439991523a1a34e Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Mon, 23 Mar 2020 18:52:48 +0100 Subject: [PATCH 3/3] MEH --- code/modules/mob/living/carbon/brain/robotic_brain.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm index de89e1a7aa6..908e905c1c8 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -206,6 +206,7 @@ brainmob.stat = CONSCIOUS brainmob.SetSilence(0) brainmob.dna = new(brainmob) + brainmob.dna.species = new /datum/species/machine() // Else it will default to human. And we don't want to clone IRC humans now do we? brainmob.dna.ResetSE() brainmob.dna.ResetUI() GLOB.dead_mob_list -= brainmob