From d2dd7a2c8c5fcb9e8c1f2fd366c1fe5558dfcef2 Mon Sep 17 00:00:00 2001 From: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Date: Sat, 5 Sep 2020 15:46:22 -0400 Subject: [PATCH] Wild Mutation crops now carry over traits from the parent plant. (#53413) This results in wild mutation carrying over possible traits from parent to child, in a way that will also be displayed by the plant analyzer. This means if you gene splice a parent plant and it wild mutates into a different species, the wild mutation will take the trait genes of the parent, with none of the reagents as reagents are specific to the species in most cases, but can be bred back in via cross-pollination. --- code/modules/hydroponics/seeds.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 1c06ba94237..06197e47d1e 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -221,11 +221,13 @@ t_prod.seed.name = initial(new_prod.name) t_prod.seed.desc = initial(new_prod.desc) t_prod.seed.plantname = initial(new_prod.plantname) + for(var/datum/plant_gene/trait/trait in parent.myseed.genes) + if(trait.can_add(t_prod.seed)) + t_prod.seed.genes += trait t_prod.transform = initial(t_prod.transform) t_prod.transform *= TRANSFORM_USING_VARIABLE(t_prod.seed.potency, 100) + 0.5 t_amount++ if(t_prod.seed) - //t_prod.seed = new new_prod t_prod.seed.instability = round(instability * 0.5) continue else