Air alarm fixes (again, oops) (#7715)

* fixes critical issue

* alright, this might be the actual fix

* removes useless null checks

* couple more

* removes default functions from unary device data
This commit is contained in:
Flipp Syder
2022-04-22 23:21:00 -07:00
committed by GitHub
parent 669d5a9406
commit 565bfa86a4
8 changed files with 32 additions and 64 deletions

View File

@@ -39,7 +39,7 @@ namespace Content.Server.Atmos.Piping.Unary.Components
}
private float _externalPressureBound = Atmospherics.OneAtmosphere;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("internalPressureBound")]
public float InternalPressureBound
@@ -74,8 +74,6 @@ namespace Content.Server.Atmos.Piping.Unary.Components
public GasVentPumpData ToAirAlarmData()
{
if (!IsDirty) return new GasVentPumpData { Dirty = IsDirty };
return new GasVentPumpData
{
Enabled = Enabled,
@@ -91,10 +89,10 @@ namespace Content.Server.Atmos.Piping.Unary.Components
{
Enabled = data.Enabled;
IsDirty = data.Dirty;
PumpDirection = (VentPumpDirection) data.PumpDirection!;
PressureChecks = (VentPressureBound) data.PressureChecks!;
ExternalPressureBound = (float) data.ExternalPressureBound!;
InternalPressureBound = (float) data.InternalPressureBound!;
PumpDirection = data.PumpDirection;
PressureChecks = data.PressureChecks;
ExternalPressureBound = data.ExternalPressureBound;
InternalPressureBound = data.InternalPressureBound;
}
}
}

View File

@@ -56,8 +56,6 @@ namespace Content.Server.Atmos.Piping.Unary.Components
public GasVentScrubberData ToAirAlarmData()
{
if (!IsDirty) return new GasVentScrubberData { Dirty = IsDirty };
return new GasVentScrubberData
{
Enabled = Enabled,
@@ -73,11 +71,11 @@ namespace Content.Server.Atmos.Piping.Unary.Components
{
Enabled = data.Enabled;
IsDirty = data.Dirty;
PumpDirection = (ScrubberPumpDirection) data.PumpDirection!;
TransferRate = (float) data.VolumeRate!;
PumpDirection = data.PumpDirection;
TransferRate = data.VolumeRate;
WideNet = data.WideNet;
if (!data.FilterGases!.SequenceEqual(FilterGases))
if (!data.FilterGases.SequenceEqual(FilterGases))
{
FilterGases.Clear();
foreach (var gas in data.FilterGases!)