Makes atmos superconduction a CVar, disables it by default.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -234,6 +234,13 @@ namespace Content.Shared
|
||||
public static readonly CVarDef<bool> MonstermosEqualization =
|
||||
CVarDef.Create("atmos.monstermos_equalization", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Whether atmos superconduction is enabled.
|
||||
/// </summary>
|
||||
/// <remarks> Disabled by default, superconduction is awful. </remarks>
|
||||
public static readonly CVarDef<bool> Superconduction =
|
||||
CVarDef.Create("atmos.superconduction", false, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Maximum time in milliseconds that atmos can take processing.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user