17
17
using Robust . Shared . Audio . Systems ;
18
18
using Robust . Shared . Containers ;
19
19
using Robust . Shared . Random ;
20
- using Robust . Shared . Configuration ;
21
- using Content . Shared . CCVar ;
22
20
23
21
namespace Content . Server . Atmos . EntitySystems
24
22
{
@@ -34,12 +32,10 @@ public sealed class GasTankSystem : EntitySystem
34
32
[ Dependency ] private readonly UserInterfaceSystem _ui = default ! ;
35
33
[ Dependency ] private readonly IRobustRandom _random = default ! ;
36
34
[ Dependency ] private readonly ThrowingSystem _throwing = default ! ;
37
- [ Dependency ] private readonly IConfigurationManager _cfg = default ! ;
38
35
39
36
private const float TimerDelay = 0.5f ;
40
37
private float _timer = 0f ;
41
38
private const float MinimumSoundValvePressure = 10.0f ;
42
- private float _maxExplosionRange ;
43
39
44
40
public override void Initialize ( )
45
41
{
@@ -55,12 +51,6 @@ public override void Initialize()
55
51
SubscribeLocalEvent < GasTankComponent , GasAnalyzerScanEvent > ( OnAnalyzed ) ;
56
52
SubscribeLocalEvent < GasTankComponent , PriceCalculationEvent > ( OnGasTankPrice ) ;
57
53
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 ;
64
54
}
65
55
66
56
private void OnGasShutdown ( Entity < GasTankComponent > gasTank , ref ComponentShutdown args )
@@ -330,7 +320,7 @@ public void CheckStatus(Entity<GasTankComponent> ent)
330
320
331
321
var pressure = component . Air . Pressure ;
332
322
333
- if ( pressure > component . TankFragmentPressure && _maxExplosionRange > 0 )
323
+ if ( pressure > component . TankFragmentPressure )
334
324
{
335
325
// Give the gas a chance to build up more pressure.
336
326
for ( var i = 0 ; i < 3 ; i ++ )
@@ -343,7 +333,10 @@ public void CheckStatus(Entity<GasTankComponent> ent)
343
333
344
334
// Let's cap the explosion, yeah?
345
335
// !1984
346
- range = Math . Min ( Math . Min ( range , GasTankComponent . MaxExplosionRange ) , _maxExplosionRange ) ;
336
+ if ( range > GasTankComponent . MaxExplosionRange )
337
+ {
338
+ range = GasTankComponent . MaxExplosionRange ;
339
+ }
347
340
348
341
_explosions . TriggerExplosive ( owner , radius : range ) ;
349
342
0 commit comments