diff --git a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs index d1efa72710..d6890e402f 100644 --- a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs @@ -407,7 +407,7 @@ namespace Content.Server.GameObjects.Components.Atmos public virtual void AddSuperconductivityTile(TileAtmosphere tile) { - if (tile?.GridIndex != _gridId) return; + if (tile?.GridIndex != _gridId || !AtmosphereSystem.Superconduction) return; _superconductivityTiles.Add(tile); } @@ -606,7 +606,10 @@ namespace Content.Server.GameObjects.Components.Atmos } _paused = false; - _state = ProcessState.Superconductivity; + // Next state depends on whether superconduction is enabled or not. + // Note: We do this here instead of on the tile equalization step to prevent ending it early. + // Therefore, a change to this CVar might only be applied after that step is over. + _state = AtmosphereSystem.Superconduction ? ProcessState.Superconductivity : ProcessState.PipeNet; break; case ProcessState.Superconductivity: if (!ProcessSuperconductivity(_paused, maxProcessTime)) diff --git a/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs b/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs index be3755f334..c7f549bfa6 100644 --- a/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/AtmosphereSystem.cs @@ -69,6 +69,7 @@ namespace Content.Server.GameObjects.EntitySystems _cfg.OnValueChanged(CCVars.SpaceWind, OnSpaceWindChanged, true); _cfg.OnValueChanged(CCVars.MonstermosEqualization, OnMonstermosEqualizationChanged, true); + _cfg.OnValueChanged(CCVars.Superconduction, OnSuperconductionChanged, true); _cfg.OnValueChanged(CCVars.AtmosMaxProcessTime, OnAtmosMaxProcessTimeChanged, true); _cfg.OnValueChanged(CCVars.AtmosTickRate, OnAtmosTickRateChanged, true); _cfg.OnValueChanged(CCVars.ExcitedGroupsSpaceIsAllConsuming, OnExcitedGroupsSpaceIsAllConsumingChanged, true); @@ -76,6 +77,7 @@ namespace Content.Server.GameObjects.EntitySystems public bool SpaceWind { get; private set; } public bool MonstermosEqualization { get; private set; } + public bool Superconduction { get; private set; } public bool ExcitedGroupsSpaceIsAllConsuming { get; private set; } public float AtmosMaxProcessTime { get; private set; } public float AtmosTickRate { get; private set; } @@ -100,6 +102,11 @@ namespace Content.Server.GameObjects.EntitySystems MonstermosEqualization = obj; } + private void OnSuperconductionChanged(bool obj) + { + Superconduction = obj; + } + private void OnSpaceWindChanged(bool obj) { SpaceWind = obj; diff --git a/Content.Shared/CCVars.cs b/Content.Shared/CCVars.cs index ef62efb83f..9576ce92da 100644 --- a/Content.Shared/CCVars.cs +++ b/Content.Shared/CCVars.cs @@ -234,6 +234,13 @@ namespace Content.Shared public static readonly CVarDef MonstermosEqualization = CVarDef.Create("atmos.monstermos_equalization", true, CVar.SERVERONLY); + /// + /// Whether atmos superconduction is enabled. + /// + /// Disabled by default, superconduction is awful. + public static readonly CVarDef Superconduction = + CVarDef.Create("atmos.superconduction", false, CVar.SERVERONLY); + /// /// Maximum time in milliseconds that atmos can take processing. ///