mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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
|
||||
Procs for copying speech, if applicable
|
||||
Procs for targeting
|
||||
Divergence proc, used in mutation to make unique datums.
|
||||
*/
|
||||
/mob/living/simple_animal/xeno/proc/ProcessTraits()
|
||||
if(maleable >= MAX_MALEABLE)
|
||||
@@ -84,8 +85,14 @@ Procs for targeting
|
||||
return 1 //Everything worked out okay.
|
||||
|
||||
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()
|
||||
traitdat = diverge()
|
||||
nameVar = "mutated"
|
||||
if((COLORMUT & mutable))
|
||||
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