Fixes genetics gene changes not working (#16035)

This commit is contained in:
Farie82
2021-05-16 10:29:34 +02:00
committed by GitHub
parent e76e7e9be4
commit dd0ef504e2
3 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -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)
+2
View File
@@ -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)
+2
View File
@@ -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))