Fix plant mutations carrying over to other plants and future rounds (#32257)
Lists are a reference type, so each component should get a new one, not point at the previous one. Co-authored-by: PraxisMapper <praxismapper@gmail.com>
This commit is contained in:
parent
73e89c3f81
commit
3951e2dcdf
|
|
@ -291,12 +291,13 @@ public partial class SeedData
|
|||
CanScream = CanScream,
|
||||
TurnIntoKudzu = TurnIntoKudzu,
|
||||
SplatPrototype = SplatPrototype,
|
||||
Mutations = Mutations,
|
||||
Mutations = new List<RandomPlantMutation>(),
|
||||
|
||||
// Newly cloned seed is unique. No need to unnecessarily clone if repeatedly modified.
|
||||
Unique = true,
|
||||
};
|
||||
|
||||
newSeed.Mutations.AddRange(Mutations);
|
||||
return newSeed;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue