From 337af483ca0922050459dcd8e8955c2775387526 Mon Sep 17 00:00:00 2001 From: drakewill-CRL <46307022+drakewill-CRL@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:45:42 -0400 Subject: [PATCH] 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 --- Content.Server/Botany/SeedPrototype.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Botany/SeedPrototype.cs b/Content.Server/Botany/SeedPrototype.cs index 7a3e08883d..5608338f22 100644 --- a/Content.Server/Botany/SeedPrototype.cs +++ b/Content.Server/Botany/SeedPrototype.cs @@ -291,12 +291,13 @@ public partial class SeedData CanScream = CanScream, TurnIntoKudzu = TurnIntoKudzu, SplatPrototype = SplatPrototype, - Mutations = Mutations, + Mutations = new List(), // Newly cloned seed is unique. No need to unnecessarily clone if repeatedly modified. Unique = true, }; + newSeed.Mutations.AddRange(Mutations); return newSeed; } -- 2.52.0