Revert "Solution Entities" (#23160)

Revert "Solution Entities (#21916)"

This reverts commit d75e743dd7.
This commit is contained in:
Emisse
2023-12-28 20:45:42 -07:00
committed by GitHub
parent c2c76c2035
commit 938d6d9945
180 changed files with 2959 additions and 3543 deletions

View File

@@ -71,7 +71,6 @@ namespace Content.Shared.Chemistry.Components
/// <summary>
/// The name of this solution, if it is contained in some <see cref="SolutionContainerManagerComponent"/>
/// </summary>
[DataField]
public string? Name;
/// <summary>
@@ -101,7 +100,7 @@ namespace Content.Shared.Chemistry.Components
foreach (var (reagent, quantity) in Contents)
{
_heatCapacity += (float) quantity *
protoMan.Index<ReagentPrototype>(reagent.Prototype).SpecificHeat;
protoMan.Index<ReagentPrototype>(reagent.Prototype).SpecificHeat;
}
}
@@ -159,12 +158,10 @@ namespace Content.Shared.Chemistry.Components
public Solution(Solution solution)
{
Contents = solution.Contents.ShallowClone();
Volume = solution.Volume;
MaxVolume = solution.MaxVolume;
Temperature = solution.Temperature;
_heatCapacity = solution._heatCapacity;
_heatCapacityDirty = solution._heatCapacityDirty;
Contents = solution.Contents.ShallowClone();
ValidateSolution();
}
@@ -177,7 +174,7 @@ namespace Content.Shared.Chemistry.Components
public void ValidateSolution()
{
// sandbox forbids: [Conditional("DEBUG")]
#if DEBUG
#if DEBUG
// Correct volume
DebugTools.Assert(Contents.Select(x => x.Quantity).Sum() == Volume);
@@ -195,7 +192,7 @@ namespace Content.Shared.Chemistry.Components
UpdateHeatCapacity(null);
DebugTools.Assert(MathHelper.CloseTo(_heatCapacity, cur));
}
#endif
#endif
}
void ISerializationHooks.AfterDeserialization()