Skip to content

Commit a1851e3

Browse files
authored
Merge branch 'space-wizards:master' into master
2 parents 6758088 + 75727db commit a1851e3

File tree

4 files changed

+58
-3
lines changed

4 files changed

+58
-3
lines changed

Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
6161
mixtures[5].Temperature = 5000f;
6262

6363
// 6: (Walk-In) Freezer
64-
mixtures[6].AdjustMoles(Gas.Oxygen, Atmospherics.OxygenMolesStandard);
65-
mixtures[6].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesStandard);
66-
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
64+
mixtures[6].AdjustMoles(Gas.Oxygen, Atmospherics.OxygenMolesFreezer);
65+
mixtures[6].AdjustMoles(Gas.Nitrogen, Atmospherics.NitrogenMolesFreezer);
66+
mixtures[6].Temperature = Atmospherics.FreezerTemp; // 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
6767

6868
// 7: Nitrogen (101kpa) for vox rooms
6969
mixtures[7].AdjustMoles(Gas.Nitrogen, Atmospherics.MolesCellStandard);

Content.Shared/Atmos/Atmospherics.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public static class Atmospherics
4040
/// </summary>
4141
public const float T20C = 293.15f;
4242

43+
/// <summary>
44+
/// -38.15ºC in K.
45+
/// This is used to initialize roundstart freezer rooms.
46+
/// </summary>
47+
public const float FreezerTemp = 235f;
48+
4349
/// <summary>
4450
/// Do not allow any gas mixture temperatures to exceed this number. It is occasionally possible
4551
/// to have very small heat capacity (e.g. room that was just unspaced) and for large amounts of
@@ -65,6 +71,12 @@ public static class Atmospherics
6571
/// </summary>
6672
public const float MolesCellStandard = (OneAtmosphere * CellVolume / (T20C * R));
6773

74+
/// <summary>
75+
/// Moles in a 2.5 m^3 cell at 101.325 kPa and -38.15ºC.
76+
/// This is used in fix atmos freezer markers to ensure the air is at the correct atmospheric pressure while still being cold.
77+
/// </summary>
78+
public const float MolesCellFreezer = (OneAtmosphere * CellVolume / (FreezerTemp * R));
79+
6880
/// <summary>
6981
/// Moles in a 2.5 m^3 cell at GasMinerDefaultMaxExternalPressure kPa and 20ºC
7082
/// </summary>
@@ -81,6 +93,9 @@ public static class Atmospherics
8193
public const float OxygenMolesStandard = MolesCellStandard * OxygenStandard;
8294
public const float NitrogenMolesStandard = MolesCellStandard * NitrogenStandard;
8395

96+
public const float OxygenMolesFreezer = MolesCellFreezer * OxygenStandard;
97+
public const float NitrogenMolesFreezer = MolesCellFreezer * NitrogenStandard;
98+
8499
#endregion
85100

86101
/// <summary>

Resources/Prototypes/Atmospherics/thresholds.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,14 @@
114114
threshold: 0.8 # danger below 80% nitrogen
115115
lowerWarnAround: !type:AlarmThresholdSetting
116116
threshold: 1.125 # warning below 90%
117+
118+
- type: alarmThreshold
119+
id: freezerTemperature
120+
upperBound: !type:AlarmThresholdSetting
121+
threshold: 335.15 # T-38.15C (235) + 100
122+
lowerBound: !type:AlarmThresholdSetting
123+
threshold: 135.15 # T-38.15C (235) - 100
124+
upperWarnAround: !type:AlarmThresholdSetting
125+
threshold: 0.8
126+
lowerWarnAround: !type:AlarmThresholdSetting
127+
threshold: 1.1
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
- type: entity
2+
abstract: true
3+
parent: AirSensorBase
4+
id: AirSensorFreezerBase
5+
suffix: Freezer Atmosphere
6+
components:
7+
- type: AtmosMonitor
8+
temperatureThresholdId: freezerTemperature
9+
10+
- type: entity
11+
parent: [AirSensorFreezerBase, AirSensor]
12+
id: AirSensorFreezer
13+
14+
- type: entity
15+
parent: [AirSensorFreezerBase, GasVentPump]
16+
id: GasVentPumpFreezer
17+
18+
- type: entity
19+
parent: [AirSensorFreezerBase, GasVentScrubber]
20+
id: GasVentScrubberFreezer
21+
22+
# air alarm proto with auto: false to prevent the automatic switching of modes overriding the default values
23+
- type: entity
24+
parent: AirAlarm
25+
id: AirAlarmFreezer
26+
suffix: Freezer Atmosphere, auto mode disabled
27+
components:
28+
- type: AirAlarm
29+
autoMode: false

0 commit comments

Comments
 (0)