Skip to content

Commit

Permalink
Revert "add atmos stuff for mapping vox boxes (DeltaV-Station#1668)"
Browse files Browse the repository at this point in the history
This reverts commit 6dc5ff7.
  • Loading branch information
MilonPL committed Aug 23, 2024
1 parent 6dc5ff7 commit 6d8db74
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
return;
}

var mixtures = new GasMixture[8]; // DeltaV - vox mixture
var mixtures = new GasMixture[7];
for (var i = 0; i < mixtures.Length; i++)
mixtures[i] = new GasMixture(Atmospherics.CellVolume) { Temperature = Atmospherics.T20C };

Expand Down Expand Up @@ -65,9 +65,6 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
mixtures[6].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesStandard);
mixtures[6].Temperature = 235f; // Little colder than an actual freezer but gives a grace period to get e.g. themomachines set up, should keep warm for a few door openings

// 7: DeltaV Nitrogen (101kpa)
mixtures[7].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesStandard + Atmospherics.OxygenMolesStandard); // DeltaV

foreach (var arg in args)
{
if (!NetEntity.TryParse(arg, out var netEntity) || !TryGetEntity(netEntity, out var euid))
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Atmos/Monitor/Components/AirAlarmComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace Content.Server.Atmos.Monitor.Components;
[RegisterComponent]
public sealed partial class AirAlarmComponent : Component
{
[DataField] public AirAlarmMode CurrentMode { get; set; } = AirAlarmMode.Filtering;
[DataField] public bool AutoMode { get; set; } = true;
[ViewVariables] public AirAlarmMode CurrentMode { get; set; } = AirAlarmMode.Filtering;
[ViewVariables] public bool AutoMode { get; set; } = true;

// Remember to null this afterwards.
[ViewVariables] public IAirAlarmModeUpdate? CurrentModeUpdater { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,31 @@ namespace Content.Server.Atmos.Piping.Trinary.Components
[RegisterComponent]
public sealed partial class GasFilterComponent : Component
{
[DataField]
public bool Enabled = true;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("enabled")]
public bool Enabled { get; set; } = true;

[ViewVariables(VVAccess.ReadWrite)]
[DataField("inlet")]
public string InletName = "inlet";
public string InletName { get; set; } = "inlet";

[ViewVariables(VVAccess.ReadWrite)]
[DataField("filter")]
public string FilterName = "filter";
public string FilterName { get; set; } = "filter";

[ViewVariables(VVAccess.ReadWrite)]
[DataField("outlet")]
public string OutletName = "outlet";
public string OutletName { get; set; } = "outlet";

[DataField]
public float TransferRate = Atmospherics.MaxTransferRate;
[ViewVariables(VVAccess.ReadWrite)]

[DataField]
public float MaxTransferRate = Atmospherics.MaxTransferRate;
[DataField("transferRate")]
public float TransferRate { get; set; } = Atmospherics.MaxTransferRate;

[DataField]
public Gas? FilteredGas;
[DataField("maxTransferRate")]
public float MaxTransferRate { get; set; } = Atmospherics.MaxTransferRate;

[ViewVariables(VVAccess.ReadWrite)]
public Gas? FilteredGas { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@ namespace Content.Server.Atmos.Piping.Unary.Components
[Access(typeof(GasVentScrubberSystem))]
public sealed partial class GasVentScrubberComponent : Component
{
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public bool Enabled { get; set; } = false;

[DataField]
[ViewVariables]
public bool IsDirty { get; set; } = false;

[ViewVariables(VVAccess.ReadWrite)]
[DataField("outlet")]
public string OutletName { get; set; } = "pipe";

[DataField]
public HashSet<Gas> FilterGases = new(GasVentScrubberData.DefaultFilterGases);
[ViewVariables]
public readonly HashSet<Gas> FilterGases = new(GasVentScrubberData.DefaultFilterGases);

[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public ScrubberPumpDirection PumpDirection { get; set; } = ScrubberPumpDirection.Scrubbing;

/// <summary>
/// Target volume to transfer. If <see cref="WideNet"/> is enabled, actual transfer rate will be much higher.
/// </summary>
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public float TransferRate
{
get => _transferRate;
Expand All @@ -36,17 +37,18 @@ public float TransferRate

private float _transferRate = Atmospherics.MaxTransferRate;

[DataField]
[ViewVariables(VVAccess.ReadWrite)]
[DataField("maxTransferRate")]
public float MaxTransferRate = Atmospherics.MaxTransferRate;

/// <summary>
/// As pressure difference approaches this number, the effective volume rate may be smaller than <see
/// cref="TransferRate"/>
/// </summary>
[DataField]
[DataField("maxPressure")]
public float MaxPressure = Atmospherics.MaxOutputPressure;

[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public bool WideNet { get; set; } = false;

public GasVentScrubberData ToAirAlarmData()
Expand Down
14 changes: 0 additions & 14 deletions Resources/Prototypes/Atmospherics/thresholds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,3 @@
id: danger # just any gas you don't want at all
upperBound: !type:AlarmThresholdSetting
threshold: 0.0001

- type: alarmThreshold
id: voxOxygen
upperBound: !type:AlarmThresholdSetting
threshold: 0.02 # 2%
upperWarnAround: !type:AlarmThresholdSetting
threshold: 0.5 # 1%

- type: alarmThreshold
id: voxNitrogen
lowerBound: !type:AlarmThresholdSetting
threshold: 0.8 # danger below 80% nitrogen
lowerWarnAround: !type:AlarmThresholdSetting
threshold: 1.125 # warning below 90%

This file was deleted.

This file was deleted.

0 comments on commit 6d8db74

Please sign in to comment.