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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user