Skip to content

Commit 95b6c58

Browse files
authored
Revert "Removal of Maxcaps via cvar (space-wizards#31437)"
This reverts commit 4b357a3.
1 parent 9519535 commit 95b6c58

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

Content.Server/Atmos/EntitySystems/GasTankSystem.cs

+5-12
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
using Robust.Shared.Audio.Systems;
1818
using Robust.Shared.Containers;
1919
using Robust.Shared.Random;
20-
using Robust.Shared.Configuration;
21-
using Content.Shared.CCVar;
2220

2321
namespace Content.Server.Atmos.EntitySystems
2422
{
@@ -34,12 +32,10 @@ public sealed class GasTankSystem : EntitySystem
3432
[Dependency] private readonly UserInterfaceSystem _ui = default!;
3533
[Dependency] private readonly IRobustRandom _random = default!;
3634
[Dependency] private readonly ThrowingSystem _throwing = default!;
37-
[Dependency] private readonly IConfigurationManager _cfg = default!;
3835

3936
private const float TimerDelay = 0.5f;
4037
private float _timer = 0f;
4138
private const float MinimumSoundValvePressure = 10.0f;
42-
private float _maxExplosionRange;
4339

4440
public override void Initialize()
4541
{
@@ -55,12 +51,6 @@ public override void Initialize()
5551
SubscribeLocalEvent<GasTankComponent, GasAnalyzerScanEvent>(OnAnalyzed);
5652
SubscribeLocalEvent<GasTankComponent, PriceCalculationEvent>(OnGasTankPrice);
5753
SubscribeLocalEvent<GasTankComponent, GetVerbsEvent<AlternativeVerb>>(OnGetAlternativeVerb);
58-
Subs.CVar(_cfg, CCVars.AtmosTankFragment, UpdateMaxRange, true);
59-
}
60-
61-
private void UpdateMaxRange(float value)
62-
{
63-
_maxExplosionRange = value;
6454
}
6555

6656
private void OnGasShutdown(Entity<GasTankComponent> gasTank, ref ComponentShutdown args)
@@ -330,7 +320,7 @@ public void CheckStatus(Entity<GasTankComponent> ent)
330320

331321
var pressure = component.Air.Pressure;
332322

333-
if (pressure > component.TankFragmentPressure && _maxExplosionRange > 0)
323+
if (pressure > component.TankFragmentPressure)
334324
{
335325
// Give the gas a chance to build up more pressure.
336326
for (var i = 0; i < 3; i++)
@@ -343,7 +333,10 @@ public void CheckStatus(Entity<GasTankComponent> ent)
343333

344334
// Let's cap the explosion, yeah?
345335
// !1984
346-
range = Math.Min(Math.Min(range, GasTankComponent.MaxExplosionRange), _maxExplosionRange);
336+
if (range > GasTankComponent.MaxExplosionRange)
337+
{
338+
range = GasTankComponent.MaxExplosionRange;
339+
}
347340

348341
_explosions.TriggerExplosive(owner, radius: range);
349342

Content.Shared/CCVar/CCVars.cs

-7
Original file line numberDiff line numberDiff line change
@@ -1240,13 +1240,6 @@ public static readonly CVarDef<bool>
12401240
public static readonly CVarDef<float> AtmosHeatScale =
12411241
CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY);
12421242

1243-
/// <summary>
1244-
/// Maximum explosion radius for explosions caused by bursting a gas tank ("max caps").
1245-
/// Setting this to zero disables the explosion but still allows the tank to burst and leak.
1246-
/// </summary>
1247-
public static readonly CVarDef<float> AtmosTankFragment =
1248-
CVarDef.Create("atmos.max_explosion_range", 26f, CVar.SERVERONLY);
1249-
12501243
/*
12511244
* MIDI instruments
12521245
*/

Resources/ConfigPresets/WizardsDen/wizardsDen.toml

-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,3 @@ see_own_notes = true
3838
deadmin_on_join = true
3939
new_player_threshold = 600
4040
alert.min_players_sharing_connection = 2
41-
42-
[atmos]
43-
max_explosion_range = 5

0 commit comments

Comments
 (0)