]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix solutions flickering when transferring contents (#34838)
authorTayrtahn <tayrtahn@gmail.com>
Sat, 28 Jun 2025 00:13:24 +0000 (20:13 -0400)
committerGitHub <noreply@github.com>
Sat, 28 Jun 2025 00:13:24 +0000 (02:13 +0200)
* 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

Content.Shared/Chemistry/Components/Solution.cs

index c65ba0e80ea3e8f3aaab1e19917f8ec55232f909..9622ccae305e60aa434d1185e7fc049f22ee0f34 100644 (file)
@@ -15,7 +15,7 @@ namespace Content.Shared.Chemistry.Components
     /// </summary>
     [Serializable, NetSerializable]
     [DataDefinition]
-    public sealed partial class Solution : IEnumerable<ReagentQuantity>, ISerializationHooks
+    public sealed partial class Solution : IEnumerable<ReagentQuantity>, ISerializationHooks, IRobustCloneable<Solution>
     {
         // 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;