1
0

CCVars.Shuttle.cs 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. using Content.Shared.Administration;
  2. using Content.Shared.CCVar.CVarAccess;
  3. using Robust.Shared.Configuration;
  4. namespace Content.Shared.CCVar;
  5. public sealed partial class CCVars
  6. {
  7. /// <summary>
  8. /// Delay for auto-orientation. Used for people arriving via arrivals.
  9. /// </summary>
  10. public static readonly CVarDef<double> AutoOrientDelay =
  11. CVarDef.Create("shuttle.auto_orient_delay", 2.0, CVar.SERVER | CVar.REPLICATED);
  12. /// <summary>
  13. /// If true then the camera will match the grid / map and is unchangeable.
  14. /// - When traversing grids it will snap to 0 degrees rotation.
  15. /// False means the player has control over the camera rotation.
  16. /// - When traversing grids it will snap to the nearest cardinal which will generally be imperceptible.
  17. /// </summary>
  18. public static readonly CVarDef<bool> CameraRotationLocked =
  19. CVarDef.Create("shuttle.camera_rotation_locked", false, CVar.REPLICATED);
  20. /// <summary>
  21. /// Whether the arrivals terminal should be on a planet map.
  22. /// </summary>
  23. public static readonly CVarDef<bool> ArrivalsPlanet =
  24. CVarDef.Create("shuttle.arrivals_planet", true, CVar.SERVERONLY);
  25. /// <summary>
  26. /// Whether the arrivals shuttle is enabled.
  27. /// </summary>
  28. public static readonly CVarDef<bool> ArrivalsShuttles =
  29. CVarDef.Create("shuttle.arrivals", false, CVar.SERVERONLY);
  30. /// <summary>
  31. /// The map to use for the arrivals station.
  32. /// </summary>
  33. public static readonly CVarDef<string> ArrivalsMap =
  34. CVarDef.Create("shuttle.arrivals_map", "/Maps/civ/nomads_classic.yml", CVar.SERVERONLY);
  35. /// <summary>
  36. /// Cooldown between arrivals departures. This should be longer than the FTL time or it will double cycle.
  37. /// </summary>
  38. public static readonly CVarDef<float> ArrivalsCooldown =
  39. CVarDef.Create("shuttle.arrivals_cooldown", 50f, CVar.SERVERONLY);
  40. /// <summary>
  41. /// Are players allowed to return on the arrivals shuttle.
  42. /// </summary>
  43. public static readonly CVarDef<bool> ArrivalsReturns =
  44. CVarDef.Create("shuttle.arrivals_returns", false, CVar.SERVERONLY);
  45. /// <summary>
  46. /// Should all players who spawn at arrivals have godmode until they leave the map?
  47. /// </summary>
  48. public static readonly CVarDef<bool> GodmodeArrivals =
  49. CVarDef.Create("shuttle.godmode_arrivals", false, CVar.SERVERONLY);
  50. /// <summary>
  51. /// If a grid is split then hide any smaller ones under this mass (kg) from the map.
  52. /// This is useful to avoid split grids spamming out labels.
  53. /// </summary>
  54. public static readonly CVarDef<int> HideSplitGridsUnder =
  55. CVarDef.Create("shuttle.hide_split_grids_under", 30, CVar.SERVERONLY);
  56. /// <summary>
  57. /// Whether to automatically spawn escape shuttles.
  58. /// </summary>
  59. public static readonly CVarDef<bool> GridFill =
  60. CVarDef.Create("shuttle.grid_fill", true, CVar.SERVERONLY);
  61. /// <summary>
  62. /// Whether to automatically preloading grids by GridPreloaderSystem
  63. /// </summary>
  64. public static readonly CVarDef<bool> PreloadGrids =
  65. CVarDef.Create("shuttle.preload_grids", true, CVar.SERVERONLY);
  66. /// <summary>
  67. /// How long the warmup time before FTL start should be.
  68. /// </summary>
  69. public static readonly CVarDef<float> FTLStartupTime =
  70. CVarDef.Create("shuttle.startup_time", 5.5f, CVar.SERVERONLY);
  71. /// <summary>
  72. /// How long a shuttle spends in FTL.
  73. /// </summary>
  74. public static readonly CVarDef<float> FTLTravelTime =
  75. CVarDef.Create("shuttle.travel_time", 20f, CVar.SERVERONLY);
  76. /// <summary>
  77. /// How long the final stage of FTL before arrival should be.
  78. /// </summary>
  79. public static readonly CVarDef<float> FTLArrivalTime =
  80. CVarDef.Create("shuttle.arrival_time", 5f, CVar.SERVERONLY);
  81. /// <summary>
  82. /// How much time needs to pass before a shuttle can FTL again.
  83. /// </summary>
  84. public static readonly CVarDef<float> FTLCooldown =
  85. CVarDef.Create("shuttle.cooldown", 10f, CVar.SERVERONLY);
  86. /// <summary>
  87. /// The maximum <see cref="PhysicsComponent.Mass"/> a grid can have before it becomes unable to FTL.
  88. /// Any value equal to or less than zero will disable this check.
  89. /// </summary>
  90. public static readonly CVarDef<float> FTLMassLimit =
  91. CVarDef.Create("shuttle.mass_limit", 300f, CVar.SERVERONLY);
  92. /// <summary>
  93. /// How long to knock down entities for if they aren't buckled when FTL starts and stops.
  94. /// </summary>
  95. public static readonly CVarDef<float> HyperspaceKnockdownTime =
  96. CVarDef.Create("shuttle.hyperspace_knockdown_time", 5f, CVar.SERVERONLY);
  97. /// <summary>
  98. /// Is the emergency shuttle allowed to be early launched.
  99. /// </summary>
  100. public static readonly CVarDef<bool> EmergencyEarlyLaunchAllowed =
  101. CVarDef.Create("shuttle.emergency_early_launch_allowed", false, CVar.SERVERONLY);
  102. /// <summary>
  103. /// How long the emergency shuttle remains docked with the station, in seconds.
  104. /// </summary>
  105. public static readonly CVarDef<float> EmergencyShuttleDockTime =
  106. CVarDef.Create("shuttle.emergency_dock_time", 180f, CVar.SERVERONLY);
  107. /// <summary>
  108. /// If the emergency shuttle can't dock at a priority port, the dock time will be multiplied with this value.
  109. /// </summary>
  110. public static readonly CVarDef<float> EmergencyShuttleDockTimeMultiplierOtherDock =
  111. CVarDef.Create("shuttle.emergency_dock_time_multiplier_other_dock", 1.6667f, CVar.SERVERONLY);
  112. /// <summary>
  113. /// If the emergency shuttle can't dock at all, the dock time will be multiplied with this value.
  114. /// </summary>
  115. public static readonly CVarDef<float> EmergencyShuttleDockTimeMultiplierNoDock =
  116. CVarDef.Create("shuttle.emergency_dock_time_multiplier_no_dock", 2f, CVar.SERVERONLY);
  117. /// <summary>
  118. /// How long after the console is authorized for the shuttle to early launch.
  119. /// </summary>
  120. public static readonly CVarDef<float> EmergencyShuttleAuthorizeTime =
  121. CVarDef.Create("shuttle.emergency_authorize_time", 10f, CVar.SERVERONLY);
  122. /// <summary>
  123. /// The minimum time for the emergency shuttle to arrive at centcomm.
  124. /// Actual minimum travel time cannot be less than <see cref="ShuttleSystem.DefaultArrivalTime"/>
  125. /// </summary>
  126. public static readonly CVarDef<float> EmergencyShuttleMinTransitTime =
  127. CVarDef.Create("shuttle.emergency_transit_time_min", 60f, CVar.SERVERONLY);
  128. /// <summary>
  129. /// The maximum time for the emergency shuttle to arrive at centcomm.
  130. /// </summary>
  131. public static readonly CVarDef<float> EmergencyShuttleMaxTransitTime =
  132. CVarDef.Create("shuttle.emergency_transit_time_max", 180f, CVar.SERVERONLY);
  133. /// <summary>
  134. /// Whether the emergency shuttle is enabled or should the round just end.
  135. /// </summary>
  136. public static readonly CVarDef<bool> EmergencyShuttleEnabled =
  137. CVarDef.Create("shuttle.emergency", true, CVar.SERVERONLY);
  138. /// <summary>
  139. /// The percentage of time passed from the initial call to when the shuttle can no longer be recalled.
  140. /// ex. a call time of 10min and turning point of 0.5 means the shuttle cannot be recalled after 5 minutes.
  141. /// </summary>
  142. public static readonly CVarDef<float> EmergencyRecallTurningPoint =
  143. CVarDef.Create("shuttle.recall_turning_point", 0.5f, CVar.SERVERONLY);
  144. /// <summary>
  145. /// Time in minutes after round start to auto-call the shuttle. Set to zero to disable.
  146. /// </summary>
  147. [CVarControl(AdminFlags.Server | AdminFlags.Mapping, min: 0, max: int.MaxValue)]
  148. public static readonly CVarDef<int> EmergencyShuttleAutoCallTime =
  149. CVarDef.Create("shuttle.auto_call_time", 0, CVar.SERVERONLY);
  150. /// <summary>
  151. /// Time in minutes after the round was extended (by recalling the shuttle) to call
  152. /// the shuttle again.
  153. /// </summary>
  154. public static readonly CVarDef<int> EmergencyShuttleAutoCallExtensionTime =
  155. CVarDef.Create("shuttle.auto_call_extension_time", 45, CVar.SERVERONLY);
  156. }