From 169147e55af1a8a4c7154db528878b8a16d31dfb Mon Sep 17 00:00:00 2001 From: Casey Date: Sun, 8 May 2022 05:48:29 -0400 Subject: [PATCH] Merge pull request #12896 from FartMaster69420/dna-patch Fixes some issues with DNA code --- code/game/dna/dna2_helpers.dm | 6 ++++-- code/game/dna/dna_modifier.dm | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 3d945e5816..931b298091 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -24,14 +24,16 @@ /proc/randmutb(var/mob/living/M) if(!M) return M.dna.check_integrity() - var/block = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK) + //var/block = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK) // Most of these are disabled anyway. + var/block = pick(FAKEBLOCK,CLUMSYBLOCK,BLINDBLOCK,DEAFBLOCK) M.dna.SetSEState(block, 1) // Give Random Good Mutation to M /proc/randmutg(var/mob/living/M) if(!M) return M.dna.check_integrity() - var/block = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK) + //var/block = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK) // Much like above, most of these blocks are disabled in code. + var/block = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,REGENERATEBLOCK,REMOTETALKBLOCK) M.dna.SetSEState(block, 1) // Random Appearance Mutation diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 1f2815426b..58338edf22 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -24,7 +24,7 @@ var/languages=null var/list/flavor=null var/gender = null - var/list/body_descriptors = null + var/list/body_descriptors = null // Guess we'll keep null. var/list/genetic_modifiers = list() // Modifiers with the MODIFIER_GENETIC flag are saved. Note that only the type is saved, not an instance. /datum/dna2/record/proc/GetData() @@ -54,7 +54,8 @@ newrecord.implant = implant newrecord.flavor = flavor newrecord.gender = gender - newrecord.body_descriptors = body_descriptors.Copy() + if(body_descriptors) + newrecord.body_descriptors = body_descriptors.Copy() newrecord.genetic_modifiers = genetic_modifiers.Copy() return newrecord