From: Tayrtahn Date: Sat, 28 Jun 2025 00:13:24 +0000 (-0400) Subject: Fix solutions flickering when transferring contents (#34838) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=948ecc82795dad244b494e58afa8bc3e7a3c05b6;p=space-station-14.git Fix solutions flickering when transferring contents (#34838) * Use Solution clones when applying SolutionComponent states * Revert "Use Solution clones when applying SolutionComponent states" This reverts commit 013fd111cf92b22562e00f98a7aaa49bc4b4ed62. * Make Solution implement ICloneable and rename Clone method. * Copy CanReact value when cloning a Solution * Convert to IRobustCloneable --- diff --git a/Content.Shared/Chemistry/Components/Solution.cs b/Content.Shared/Chemistry/Components/Solution.cs index c65ba0e80e..9622ccae30 100644 --- a/Content.Shared/Chemistry/Components/Solution.cs +++ b/Content.Shared/Chemistry/Components/Solution.cs @@ -15,7 +15,7 @@ namespace Content.Shared.Chemistry.Components /// [Serializable, NetSerializable] [DataDefinition] - public sealed partial class Solution : IEnumerable, ISerializationHooks + public sealed partial class Solution : IEnumerable, ISerializationHooks, IRobustCloneable { // This is a list because it is actually faster to add and remove reagents from // a list than a dictionary, though contains-reagent checks are slightly slower, @@ -174,6 +174,7 @@ namespace Content.Shared.Chemistry.Components Volume = solution.Volume; MaxVolume = solution.MaxVolume; Temperature = solution.Temperature; + CanReact = solution.CanReact; _heatCapacity = solution._heatCapacity; _heatCapacityDirty = solution._heatCapacityDirty; _heatCapacityUpdateCounter = solution._heatCapacityUpdateCounter;