CCVars.Atmos.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. using Robust.Shared.Configuration;
  2. namespace Content.Shared.CCVar;
  3. public sealed partial class CCVars
  4. {
  5. /// <summary>
  6. /// Whether gas differences will move entities.
  7. /// </summary>
  8. public static readonly CVarDef<bool> SpaceWind =
  9. CVarDef.Create("atmos.space_wind", false, CVar.SERVERONLY);
  10. /// <summary>
  11. /// Divisor from maxForce (pressureDifference * 2.25f) to force applied on objects.
  12. /// </summary>
  13. public static readonly CVarDef<float> SpaceWindPressureForceDivisorThrow =
  14. CVarDef.Create("atmos.space_wind_pressure_force_divisor_throw", 15f, CVar.SERVERONLY);
  15. /// <summary>
  16. /// Divisor from maxForce (pressureDifference * 2.25f) to force applied on objects.
  17. /// </summary>
  18. public static readonly CVarDef<float> SpaceWindPressureForceDivisorPush =
  19. CVarDef.Create("atmos.space_wind_pressure_force_divisor_push", 2500f, CVar.SERVERONLY);
  20. /// <summary>
  21. /// The maximum velocity (not force) that may be applied to an object by atmospheric pressure differences.
  22. /// Useful to prevent clipping through objects.
  23. /// </summary>
  24. public static readonly CVarDef<float> SpaceWindMaxVelocity =
  25. CVarDef.Create("atmos.space_wind_max_velocity", 30f, CVar.SERVERONLY);
  26. /// <summary>
  27. /// The maximum force that may be applied to an object by pushing (i.e. not throwing) atmospheric pressure differences.
  28. /// A "throwing" atmospheric pressure difference ignores this limit, but not the max. velocity limit.
  29. /// </summary>
  30. public static readonly CVarDef<float> SpaceWindMaxPushForce =
  31. CVarDef.Create("atmos.space_wind_max_push_force", 20f, CVar.SERVERONLY);
  32. /// <summary>
  33. /// Whether monstermos tile equalization is enabled.
  34. /// </summary>
  35. public static readonly CVarDef<bool> MonstermosEqualization =
  36. CVarDef.Create("atmos.monstermos_equalization", true, CVar.SERVERONLY);
  37. /// <summary>
  38. /// Whether monstermos explosive depressurization is enabled.
  39. /// Needs <see cref="MonstermosEqualization"/> to be enabled to work.
  40. /// </summary>
  41. public static readonly CVarDef<bool> MonstermosDepressurization =
  42. CVarDef.Create("atmos.monstermos_depressurization", true, CVar.SERVERONLY);
  43. /// <summary>
  44. /// Whether monstermos explosive depressurization will rip tiles..
  45. /// Needs <see cref="MonstermosEqualization"/> and <see cref="MonstermosDepressurization"/> to be enabled to work.
  46. /// WARNING: This cvar causes MAJOR contrast issues, and usually tends to make any spaced scene look very cluttered.
  47. /// This not only usually looks strange, but can also reduce playability for people with impaired vision. Please think twice before enabling this on your server.
  48. /// Also looks weird on slow spacing for unrelated reasons. If you do want to enable this, you should probably turn on instaspacing.
  49. /// </summary>
  50. public static readonly CVarDef<bool> MonstermosRipTiles =
  51. CVarDef.Create("atmos.monstermos_rip_tiles", false, CVar.SERVERONLY);
  52. /// <summary>
  53. /// Whether explosive depressurization will cause the grid to gain an impulse.
  54. /// Needs <see cref="MonstermosEqualization"/> and <see cref="MonstermosDepressurization"/> to be enabled to work.
  55. /// </summary>
  56. public static readonly CVarDef<bool> AtmosGridImpulse =
  57. CVarDef.Create("atmos.grid_impulse", false, CVar.SERVERONLY);
  58. /// <summary>
  59. /// What fraction of air from a spaced tile escapes every tick.
  60. /// 1.0 for instant spacing, 0.2 means 20% of remaining air lost each time
  61. /// </summary>
  62. public static readonly CVarDef<float> AtmosSpacingEscapeRatio =
  63. CVarDef.Create("atmos.mmos_spacing_speed", 0.15f, CVar.SERVERONLY);
  64. /// <summary>
  65. /// Minimum amount of air allowed on a spaced tile before it is reset to 0 immediately in kPa
  66. /// Since the decay due to SpacingEscapeRatio follows a curve, it would never reach 0.0 exactly
  67. /// unless we truncate it somewhere.
  68. /// </summary>
  69. public static readonly CVarDef<float> AtmosSpacingMinGas =
  70. CVarDef.Create("atmos.mmos_min_gas", 2.0f, CVar.SERVERONLY);
  71. /// <summary>
  72. /// How much wind can go through a single tile before that tile doesn't depressurize itself
  73. /// (I.e spacing is limited in large rooms heading into smaller spaces)
  74. /// </summary>
  75. public static readonly CVarDef<float> AtmosSpacingMaxWind =
  76. CVarDef.Create("atmos.mmos_max_wind", 500f, CVar.SERVERONLY);
  77. /// <summary>
  78. /// Whether atmos superconduction is enabled.
  79. /// </summary>
  80. /// <remarks> Disabled by default, superconduction is awful. </remarks>
  81. public static readonly CVarDef<bool> Superconduction =
  82. CVarDef.Create("atmos.superconduction", false, CVar.SERVERONLY);
  83. /// <summary>
  84. /// Heat loss per tile due to radiation at 20 degC, in W.
  85. /// </summary>
  86. public static readonly CVarDef<float> SuperconductionTileLoss =
  87. CVarDef.Create("atmos.superconduction_tile_loss", 30f, CVar.SERVERONLY);
  88. /// <summary>
  89. /// Whether excited groups will be processed and created.
  90. /// </summary>
  91. public static readonly CVarDef<bool> ExcitedGroups =
  92. CVarDef.Create("atmos.excited_groups", true, CVar.SERVERONLY);
  93. /// <summary>
  94. /// Whether all tiles in an excited group will clear themselves once being exposed to space.
  95. /// Similar to <see cref="MonstermosDepressurization"/>, without none of the tile ripping or
  96. /// things being thrown around very violently.
  97. /// Needs <see cref="ExcitedGroups"/> to be enabled to work.
  98. /// </summary>
  99. public static readonly CVarDef<bool> ExcitedGroupsSpaceIsAllConsuming =
  100. CVarDef.Create("atmos.excited_groups_space_is_all_consuming", false, CVar.SERVERONLY);
  101. /// <summary>
  102. /// Maximum time in milliseconds that atmos can take processing.
  103. /// </summary>
  104. public static readonly CVarDef<float> AtmosMaxProcessTime =
  105. CVarDef.Create("atmos.max_process_time", 3f, CVar.SERVERONLY);
  106. /// <summary>
  107. /// Atmos tickrate in TPS. Atmos processing will happen every 1/TPS seconds.
  108. /// </summary>
  109. public static readonly CVarDef<float> AtmosTickRate =
  110. CVarDef.Create("atmos.tickrate", 1f, CVar.SERVERONLY);
  111. /// <summary>
  112. /// Scale factor for how fast things happen in our atmosphere
  113. /// simulation compared to real life. 1x means pumps run at 1x
  114. /// speed. Players typically expect things to happen faster
  115. /// in-game.
  116. /// </summary>
  117. public static readonly CVarDef<float> AtmosSpeedup =
  118. CVarDef.Create("atmos.speedup", 8f, CVar.SERVERONLY);
  119. /// <summary>
  120. /// Like atmos.speedup, but only for gas and reaction heat values. 64x means
  121. /// gases heat up and cool down 64x faster than real life.
  122. /// </summary>
  123. public static readonly CVarDef<float> AtmosHeatScale =
  124. CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY);
  125. /// <summary>
  126. /// Maximum explosion radius for explosions caused by bursting a gas tank ("max caps").
  127. /// Setting this to zero disables the explosion but still allows the tank to burst and leak.
  128. /// </summary>
  129. public static readonly CVarDef<float> AtmosTankFragment =
  130. CVarDef.Create("atmos.max_explosion_range", 26f, CVar.SERVERONLY);
  131. }