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
_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);
}
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>
/// </summary>
public float PumpSpeedup()
{
- return MathF.Sqrt(Speedup);
+ return Speedup;
}
/// <summary>
energyReleased = burnRate * Atmospherics.FrezonCoolEnergyReleased * energyModifier;
}
- energyReleased /= atmosphereSystem.Speedup; // adjust energy to make sure speedup doesn't cause mega temperature rise
+ energyReleased /= atmosphereSystem.HeatScale; // adjust energy to make sure speedup doesn't cause mega temperature rise
if (energyReleased >= 0f)
return ReactionResult.NoReaction;
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
+ energyReleased /= atmosphereSystem.HeatScale; // adjust energy to make sure speedup doesn't cause mega temperature rise
mixture.ReactionResults[GasReaction.Fire] += plasmaBurnRate * (1 + oxygenBurnRate);
}
}
mixture.ReactionResults[GasReaction.Fire] += burnedFuel;
}
- energyReleased /= atmosphereSystem.Speedup; // adjust energy to make sure speedup doesn't cause mega temperature rise
+ energyReleased /= atmosphereSystem.HeatScale; // adjust energy to make sure speedup doesn't cause mega temperature rise
if (energyReleased > 0)
{
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
/// <summary>
/// Scale factor for how fast things happen in our atmosphere
- /// simulation compared to real life. 1x means that a room takes as
- /// long to heat up in game as real life. Players typically expect
- /// things to happen faster in-game.
+ /// simulation compared to real life. 1x means pumps run at 1x
+ /// speed. Players typically expect things to happen faster
+ /// in-game.
/// </summary>
public static readonly CVarDef<float> AtmosSpeedup =
- CVarDef.Create("atmos.speedup", 64f, CVar.SERVERONLY);
+ CVarDef.Create("atmos.speedup", 8f, CVar.SERVERONLY);
+
+ /// <summary>
+ /// Like atmos.speedup, but only for gas and reaction heat values. 64x means
+ /// gases heat up and cool down 64x faster than real life.
+ /// </summary>
+ public static readonly CVarDef<float> AtmosHeatScale =
+ CVarDef.Create("atmos.heat_scale", 64f, CVar.SERVERONLY);
/*
* MIDI instruments