From dd0ef504e2eeeb57710325b06f56ba4450a9f1ba Mon Sep 17 00:00:00 2001 From: Farie82 Date: Sun, 16 May 2021 10:29:34 +0200 Subject: [PATCH] Fixes genetics gene changes not working (#16035) --- code/game/dna/dna2_domutcheck.dm | 3 ++- code/game/dna/mutations/_mutations.dm | 2 ++ code/game/dna/mutations/monkey.dm | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm index f12b4685e69..8da02df0806 100644 --- a/code/game/dna/dna2_domutcheck.dm +++ b/code/game/dna/dna2_domutcheck.dm @@ -3,7 +3,8 @@ // M: Mob to mess with // flags: See below, bitfield. /proc/domutcheck(mob/living/M, flags = 0) - for(var/datum/mutation/mutation in GLOB.dna_mutations) + for(var/mutation_type in GLOB.dna_mutations) + var/datum/mutation/mutation = GLOB.dna_mutations[mutation_type] if(!M || !M.dna) return if(!mutation.block) diff --git a/code/game/dna/mutations/_mutations.dm b/code/game/dna/mutations/_mutations.dm index 48fb974b561..8ed4022c5be 100644 --- a/code/game/dna/mutations/_mutations.dm +++ b/code/game/dna/mutations/_mutations.dm @@ -31,6 +31,7 @@ // Called when the gene activates. Do your magic here. /datum/mutation/proc/activate(mob/living/M) + SHOULD_CALL_PARENT(TRUE) M.gene_stability -= instability M.active_mutations |= type // |= is probably not required but just in case for(var/thing in traits_to_add) @@ -43,6 +44,7 @@ // Called when the gene deactivates. Undo your magic here. // Only called when the block is deactivated. /datum/mutation/proc/deactivate(mob/living/M) + SHOULD_CALL_PARENT(TRUE) M.gene_stability += instability M.active_mutations -= type for(var/thing in traits_to_add) diff --git a/code/game/dna/mutations/monkey.dm b/code/game/dna/mutations/monkey.dm index 4ebe366bfb7..c9e91179527 100644 --- a/code/game/dna/mutations/monkey.dm +++ b/code/game/dna/mutations/monkey.dm @@ -9,6 +9,7 @@ return ishuman(M) /datum/mutation/monkey/activate(mob/living/carbon/human/H) + ..() if(!istype(H)) return if(issmall(H)) @@ -42,6 +43,7 @@ return H /datum/mutation/monkey/deactivate(mob/living/carbon/human/H) + ..() if(!istype(H)) return if(!issmall(H))