Move GasMixture to shared (#27480)
* Moved GasMixture to shared * Temp Fix for sandbox violation, idk why Array.Resize isn't working properly. It's already sandboxed. * The most powerful webedit in history
This commit is contained in:
16
Content.Shared/Atmos/GasMixtureStringRepresentation.cs
Normal file
16
Content.Shared/Atmos/GasMixtureStringRepresentation.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace Content.Shared.Atmos;
|
||||
|
||||
public readonly record struct GasMixtureStringRepresentation(float TotalMoles, float Temperature, float Pressure, Dictionary<string, float> MolesPerGas) : IFormattable
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Temperature}K {Pressure} kPa";
|
||||
}
|
||||
|
||||
public string ToString(string? format, IFormatProvider? formatProvider)
|
||||
{
|
||||
return ToString();
|
||||
}
|
||||
|
||||
public static implicit operator string(GasMixtureStringRepresentation rep) => rep.ToString();
|
||||
}
|
||||
Reference in New Issue
Block a user