Fix errors with creating gas mixtures on class instantiation (#1916)
* Fix errors when gas mixtures are created on class instantiation * Fix mistake
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Body.Circulatory
|
||||
/// </summary>
|
||||
[ViewVariables] public ReagentUnit EmptyVolume => _internalSolution.EmptyVolume;
|
||||
|
||||
[ViewVariables] public GasMixture Air { get; set; } = new GasMixture(6);
|
||||
[ViewVariables] public GasMixture Air { get; set; }
|
||||
|
||||
[ViewVariables] public SolutionComponent Solution => _internalSolution;
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace Content.Server.GameObjects.Components.Body.Circulatory
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
Air = new GasMixture(6);
|
||||
|
||||
serializer.DataField(ref _initialMaxVolume, "maxVolume", ReagentUnit.New(250));
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.GameObjects.Components.Body.Respiratory
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)] private float Pressure { get; set; }
|
||||
|
||||
[ViewVariables] public GasMixture Air { get; set; } = new GasMixture();
|
||||
[ViewVariables] public GasMixture Air { get; set; }
|
||||
|
||||
[ViewVariables] public LungStatus Status { get; set; }
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace Content.Server.GameObjects.Components.Body.Respiratory
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
Air = new GasMixture();
|
||||
|
||||
serializer.DataReadWriteFunction(
|
||||
"volume",
|
||||
6,
|
||||
|
||||
Reference in New Issue
Block a user