Remove atmos archiving.
This commit is contained in:
@@ -26,9 +26,6 @@ namespace Content.Server.Atmos
|
||||
[DataField("moles")] [ViewVariables]
|
||||
public float[] Moles = new float[Atmospherics.AdjustedNumberOfGases];
|
||||
|
||||
[DataField("molesArchived")] [ViewVariables]
|
||||
public float[] MolesArchived = new float[Atmospherics.AdjustedNumberOfGases];
|
||||
|
||||
[DataField("temperature")] [ViewVariables]
|
||||
private float _temperature = Atmospherics.TCMB;
|
||||
|
||||
@@ -73,9 +70,6 @@ namespace Content.Server.Atmos
|
||||
}
|
||||
}
|
||||
|
||||
[DataField("temperatureArchived")] [ViewVariables]
|
||||
public float TemperatureArchived { get; private set; }
|
||||
|
||||
[DataField("volume")] [ViewVariables]
|
||||
public float Volume { get; set; }
|
||||
|
||||
@@ -96,13 +90,6 @@ namespace Content.Server.Atmos
|
||||
Immutable = true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Archive()
|
||||
{
|
||||
Moles.AsSpan().CopyTo(MolesArchived.AsSpan());
|
||||
TemperatureArchived = Temperature;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public float GetMoles(int gasId)
|
||||
{
|
||||
@@ -253,7 +240,6 @@ namespace Content.Server.Atmos
|
||||
{
|
||||
// The arrays MUST have a specific length.
|
||||
Array.Resize(ref Moles, Atmospherics.AdjustedNumberOfGases);
|
||||
Array.Resize(ref MolesArchived, Atmospherics.AdjustedNumberOfGases);
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
@@ -268,12 +254,10 @@ namespace Content.Server.Atmos
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return Moles.SequenceEqual(other.Moles)
|
||||
&& MolesArchived.SequenceEqual(other.MolesArchived)
|
||||
&& _temperature.Equals(other._temperature)
|
||||
&& ReactionResults.SequenceEqual(other.ReactionResults)
|
||||
&& Immutable == other.Immutable
|
||||
&& LastShare.Equals(other.LastShare)
|
||||
&& TemperatureArchived.Equals(other.TemperatureArchived)
|
||||
&& Volume.Equals(other.Volume);
|
||||
}
|
||||
|
||||
@@ -284,13 +268,10 @@ namespace Content.Server.Atmos
|
||||
for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
|
||||
{
|
||||
var moles = Moles[i];
|
||||
var molesArchived = MolesArchived[i];
|
||||
hashCode.Add(moles);
|
||||
hashCode.Add(molesArchived);
|
||||
}
|
||||
|
||||
hashCode.Add(_temperature);
|
||||
hashCode.Add(TemperatureArchived);
|
||||
hashCode.Add(Immutable);
|
||||
hashCode.Add(LastShare);
|
||||
hashCode.Add(Volume);
|
||||
@@ -303,11 +284,9 @@ namespace Content.Server.Atmos
|
||||
var newMixture = new GasMixture()
|
||||
{
|
||||
Moles = (float[])Moles.Clone(),
|
||||
MolesArchived = (float[])MolesArchived.Clone(),
|
||||
_temperature = _temperature,
|
||||
Immutable = Immutable,
|
||||
LastShare = LastShare,
|
||||
TemperatureArchived = TemperatureArchived,
|
||||
Volume = Volume,
|
||||
};
|
||||
return newMixture;
|
||||
|
||||
Reference in New Issue
Block a user