Split up atmos speedup from heat scaling (#22372)
This commit is contained in:
@@ -25,6 +25,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
public float AtmosMaxProcessTime { get; private set; }
|
||||
public float AtmosTickRate { get; private set; }
|
||||
public float Speedup { get; private set; }
|
||||
public float HeatScale { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Time between each atmos sub-update. If you are writing an atmos device, use AtmosDeviceUpdateEvent.dt
|
||||
@@ -51,6 +52,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
_cfg.OnValueChanged(CCVars.AtmosMaxProcessTime, value => AtmosMaxProcessTime = value, true);
|
||||
_cfg.OnValueChanged(CCVars.AtmosTickRate, value => AtmosTickRate = value, true);
|
||||
_cfg.OnValueChanged(CCVars.AtmosSpeedup, value => Speedup = value, true);
|
||||
_cfg.OnValueChanged(CCVars.AtmosHeatScale, value => HeatScale = value, true);
|
||||
_cfg.OnValueChanged(CCVars.ExcitedGroups, value => ExcitedGroups = value, true);
|
||||
_cfg.OnValueChanged(CCVars.ExcitedGroupsSpaceIsAllConsuming, value => ExcitedGroupsSpaceIsAllConsuming = value, true);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
NumericsHelpers.Multiply(moles, GasSpecificHeats, tmp);
|
||||
// Adjust heat capacity by speedup, because this is primarily what
|
||||
// determines how quickly gases heat up/cool.
|
||||
return MathF.Max(NumericsHelpers.HorizontalAdd(tmp), Atmospherics.MinimumHeatCapacity) / Speedup;
|
||||
return MathF.Max(NumericsHelpers.HorizontalAdd(tmp), Atmospherics.MinimumHeatCapacity) / HeatScale;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -69,7 +69,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
/// </summary>
|
||||
public float PumpSpeedup()
|
||||
{
|
||||
return MathF.Sqrt(Speedup);
|
||||
return Speedup;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user