using Robust.Shared.Serialization; // ReSharper disable InconsistentNaming namespace Content.Shared.Atmos { /// /// Class to store atmos constants. /// public static class Atmospherics { static Atmospherics() { AdjustedNumberOfGases = MathHelper.NextMultipleOf(TotalNumberOfGases, 4); } #region ATMOS /// /// The universal gas constant, in kPa*L/(K*mol) /// public const float R = 8.314462618f; /// /// 1 ATM in kPA. /// public const float OneAtmosphere = 101.325f; /// /// Maximum external pressure (in kPA) a gas miner will, by default, output to. /// This is used to initialize roundstart atmos rooms. /// public const float GasMinerDefaultMaxExternalPressure = 6500f; /// /// -270.3ºC in K. CMB stands for Cosmic Microwave Background. /// public const float TCMB = 2.7f; /// /// 0ºC in K /// public const float T0C = 273.15f; /// /// 20ºC in K /// public const float T20C = 293.15f; /// /// Liters in a cell. /// public const float CellVolume = 2500f; // Liters in a normal breath public const float BreathVolume = 0.5f; // Amount of air to take from a tile public const float BreathPercentage = BreathVolume / CellVolume; /// /// Moles in a 2.5 m^3 cell at 101.325 kPa and 20ºC /// public const float MolesCellStandard = (OneAtmosphere * CellVolume / (T20C * R)); /// /// Moles in a 2.5 m^3 cell at GasMinerDefaultMaxExternalPressure kPa and 20ºC /// public const float MolesCellGasMiner = (GasMinerDefaultMaxExternalPressure * CellVolume / (T20C * R)); /// /// Compared against for superconduction. /// public const float MCellWithRatio = (MolesCellStandard * 0.005f); public const float OxygenStandard = 0.21f; public const float NitrogenStandard = 0.79f; public const float OxygenMolesStandard = MolesCellStandard * OxygenStandard; public const float NitrogenMolesStandard = MolesCellStandard * NitrogenStandard; #endregion /// /// Visible moles multiplied by this factor to get moles at which gas is at max visibility. /// public const float FactorGasVisibleMax = 20f; /// /// Minimum number of moles a gas can have. /// public const float GasMinMoles = 0.00000005f; public const float OpenHeatTransferCoefficient = 0.4f; /// /// Hack to make vacuums cold, sacrificing realism for gameplay. /// public const float HeatCapacityVacuum = 7000f; /// /// Ratio of air that must move to/from a tile to reset group processing /// public const float MinimumAirRatioToSuspend = 0.1f; /// /// Minimum ratio of air that must move to/from a tile /// public const float MinimumAirRatioToMove = 0.001f; /// /// Minimum amount of air that has to move before a group processing can be suspended /// public const float MinimumAirToSuspend = (MolesCellStandard * MinimumAirRatioToSuspend); public const float MinimumTemperatureToMove = (T20C + 100f); public const float MinimumMolesDeltaToMove = (MolesCellStandard * MinimumAirRatioToMove); /// /// Minimum temperature difference before group processing is suspended /// public const float MinimumTemperatureDeltaToSuspend = 4.0f; /// /// Minimum temperature difference before the gas temperatures are just set to be equal. /// public const float MinimumTemperatureDeltaToConsider = 0.5f; /// /// Minimum temperature for starting superconduction. /// public const float MinimumTemperatureStartSuperConduction = (T20C + 400f); public const float MinimumTemperatureForSuperconduction = (T20C + 80f); /// /// Minimum heat capacity. /// public const float MinimumHeatCapacity = 0.0003f; /// /// For the purposes of making space "colder" /// public const float SpaceHeatCapacity = 7000f; #region Excited Groups /// /// Number of full atmos updates ticks before an excited group breaks down (averages gas contents across turfs) /// public const int ExcitedGroupBreakdownCycles = 4; /// /// Number of full atmos updates before an excited group dismantles and removes its turfs from active /// public const int ExcitedGroupsDismantleCycles = 16; #endregion /// /// Hard limit for zone-based tile equalization. /// public const int MonstermosHardTileLimit = 2000; /// /// Limit for zone-based tile equalization. /// public const int MonstermosTileLimit = 200; /// /// Total number of gases. Increase this if you want to add more! /// public const int TotalNumberOfGases = 9; /// /// This is the actual length of the gases arrays in mixtures. /// Set to the closest multiple of 4 relative to for SIMD reasons. /// public static readonly int AdjustedNumberOfGases; /// /// Amount of heat released per mole of burnt hydrogen or tritium (hydrogen isotope) /// public const float FireHydrogenEnergyReleased = 560000f; public const float FireMinimumTemperatureToExist = T0C + 100f; public const float FireMinimumTemperatureToSpread = T0C + 150f; public const float FireSpreadRadiosityScale = 0.85f; public const float FirePlasmaEnergyReleased = 3000000f; public const float FireGrowthRate = 40000f; public const float SuperSaturationThreshold = 96f; public const float OxygenBurnRateBase = 1.4f; public const float PlasmaMinimumBurnTemperature = (100f+T0C); public const float PlasmaUpperTemperature = (1370f+T0C); public const float PlasmaOxygenFullburn = 10f; public const float PlasmaBurnRateDelta = 9f; /// /// This is calculated to help prevent singlecap bombs (Overpowered tritium/oxygen single tank bombs) /// public const float MinimumTritiumOxyburnEnergy = 2000000f; public const float TritiumBurnOxyFactor = 100f; public const float TritiumBurnTritFactor = 10f; public const float FrezonCoolLowerTemperature = 23.15f; /// /// Frezon cools better at higher temperatures. /// public const float FrezonCoolMidTemperature = 373.15f; public const float FrezonCoolMaximumEnergyModifier = 10f; /// /// Remove X mol of nitrogen for each mol of frezon. /// public const float FrezonNitrogenCoolRatio = 5; public const float FrezonCoolEnergyReleased = -3000000f; public const float FrezonCoolRateModifier = 20f; public const float FrezonProductionMaxEfficiencyTemperature = 73.15f; /// /// 1 mol of N2 is required per X mol of tritium and oxygen. /// public const float FrezonProductionNitrogenRatio = 10f; /// /// 1 mol of Tritium is required per X mol of oxygen. /// public const float FrezonProductionTritRatio = 50.0f; /// /// 1 / X of the tritium is converted into Frezon each tick /// public const float FrezonProductionConversionRate = 50f; /// /// How many mol of frezon can be converted into miasma in one cycle. /// public const float MiasmicSubsumationMaxConversionRate = 5f; /// /// Determines at what pressure the ultra-high pressure red icon is displayed. /// public const float HazardHighPressure = 550f; /// /// Determines when the orange pressure icon is displayed. /// public const float WarningHighPressure = 0.7f * HazardHighPressure; /// /// Determines when the gray low pressure icon is displayed. /// public const float WarningLowPressure = 2.5f * HazardLowPressure; /// /// Determines when the black ultra-low pressure icon is displayed. /// public const float HazardLowPressure = 20f; /// /// The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, /// with the maximum of MaxHighPressureDamage. /// public const float PressureDamageCoefficient = 4; /// /// Maximum amount of damage that can be endured with high pressure. /// public const int MaxHighPressureDamage = 4; /// /// The amount of damage someone takes when in a low pressure area /// (The pressure threshold is so low that it doesn't make sense to do any calculations, /// so it just applies this flat value). /// public const int LowPressureDamage = 4; public const float WindowHeatTransferCoefficient = 0.1f; /// /// Directions that atmos currently supports. Modify in case of multi-z. /// See on the server. /// public const int Directions = 4; /// /// The normal body temperature in degrees Celsius. /// public const float NormalBodyTemperature = 37f; /// /// I hereby decree. This is Arbitrary Suck my Dick /// public const float BreathMolesToReagentMultiplier = 1144; #region Pipes /// /// The default pressure at which pumps and powered equipment max out at, in kPa. /// public const float MaxOutputPressure = 4500; /// /// The default maximum speed powered equipment can work at, in L/s. /// public const float MaxTransferRate = 200; #endregion } /// /// Gases to Ids. Keep these updated with the prototypes! /// [Serializable, NetSerializable] public enum Gas : sbyte { Oxygen = 0, Nitrogen = 1, CarbonDioxide = 2, Plasma = 3, Tritium = 4, WaterVapor = 5, Miasma = 6, NitrousOxide = 7, Frezon = 8 } }