From: drakewill-CRL <46307022+drakewill-CRL@users.noreply.github.com> Date: Tue, 17 Sep 2024 19:45:42 +0000 (-0400) Subject: Fix plant mutations carrying over to other plants and future rounds (#32257) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=337af483ca0922050459dcd8e8955c2775387526;p=space-station-14.git 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 --- 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; }