Add atmos time compression (#21954)
Add atmos.speedup which is effectively a atmos-only time compression CVar. This adjusts heat capacities and transfer rates to effectively globally speed up the time constants of atmos. This allows faster response to heating/cooling changes and faster cleanups (by buffing scrubbers, pumps, and everything else) that is tunable through one global time compression CVar. It also achieves this without any thermodynamic unsoundness.
This commit is contained in:
@@ -45,6 +45,7 @@ public sealed partial class FrezonCoolantReaction : IGasReactionEffect
|
||||
energyReleased = burnRate * Atmospherics.FrezonCoolEnergyReleased * energyModifier;
|
||||
}
|
||||
|
||||
energyReleased /= atmosphereSystem.Speedup; // adjust energy to make sure speedup doesn't cause mega temperature rise
|
||||
if (energyReleased >= 0f)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace Content.Server.Atmos.Reactions
|
||||
mixture.AdjustMoles(Gas.CarbonDioxide, plasmaBurnRate * (1.0f - supersaturation));
|
||||
|
||||
energyReleased += Atmospherics.FirePlasmaEnergyReleased * plasmaBurnRate;
|
||||
energyReleased /= atmosphereSystem.Speedup; // adjust energy to make sure speedup doesn't cause mega temperature rise
|
||||
mixture.ReactionResults[GasReaction.Fire] += plasmaBurnRate * (1 + oxygenBurnRate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace Content.Server.Atmos.Reactions
|
||||
mixture.ReactionResults[GasReaction.Fire] += burnedFuel;
|
||||
}
|
||||
|
||||
energyReleased /= atmosphereSystem.Speedup; // adjust energy to make sure speedup doesn't cause mega temperature rise
|
||||
if (energyReleased > 0)
|
||||
{
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
|
||||
Reference in New Issue
Block a user