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:
drakewill-CRL 2024-09-17 15:45:42 -04:00 committed by deltanedas
parent 73e89c3f81
commit 3951e2dcdf
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}