mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes mutate() in xenobio2 to produce a unique traits datum
Recently brought to me, so I'm fixing it.
This commit is contained in:
@@ -6,6 +6,7 @@ Proc for metabolism
|
|||||||
Proc for mutating
|
Proc for mutating
|
||||||
Procs for copying speech, if applicable
|
Procs for copying speech, if applicable
|
||||||
Procs for targeting
|
Procs for targeting
|
||||||
|
Divergence proc, used in mutation to make unique datums.
|
||||||
*/
|
*/
|
||||||
/mob/living/simple_animal/xeno/proc/ProcessTraits()
|
/mob/living/simple_animal/xeno/proc/ProcessTraits()
|
||||||
if(maleable >= MAX_MALEABLE)
|
if(maleable >= MAX_MALEABLE)
|
||||||
@@ -85,7 +86,13 @@ Procs for targeting
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
/mob/living/simple_animal/xeno/proc/diverge()
|
||||||
|
var/datum/xeno/traits/newtraits = new()
|
||||||
|
newtraits.copy_traits(traitdat)
|
||||||
|
return newtraits
|
||||||
|
|
||||||
/mob/living/simple_animal/xeno/proc/Mutate()
|
/mob/living/simple_animal/xeno/proc/Mutate()
|
||||||
|
traitdat = diverge()
|
||||||
nameVar = "mutated"
|
nameVar = "mutated"
|
||||||
if((COLORMUT & mutable))
|
if((COLORMUT & mutable))
|
||||||
traitdat.traits[TRAIT_XENO_COLOR] = "#"
|
traitdat.traits[TRAIT_XENO_COLOR] = "#"
|
||||||
|
|||||||
4
html/changelogs/Datraen-XenobioUniqueTraitdat.yml
Normal file
4
html/changelogs/Datraen-XenobioUniqueTraitdat.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: Datraen
|
||||||
|
delete-after: True
|
||||||
|
changes:
|
||||||
|
- bugfix: "Xenobiological traits are made unique on each mutate, avoiding mutating other mobs with same trait data."
|
||||||
Reference in New Issue
Block a user