mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 01:53:35 +01:00
Fixes genetics gene changes not working (#16035)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user