_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.AtmosHeatScale, value => { HeatScale = value; InitializeGases(); }, true);
_cfg.OnValueChanged(CCVars.ExcitedGroups, value => ExcitedGroups = value, true);
_cfg.OnValueChanged(CCVars.ExcitedGroupsSpaceIsAllConsuming, value => ExcitedGroupsSpaceIsAllConsuming = value, true);
}
for (var i = 0; i < GasPrototypes.Length; i++)
{
- _gasSpecificHeats[i] = GasPrototypes[i].SpecificHeat;
+ _gasSpecificHeats[i] = GasPrototypes[i].SpecificHeat / HeatScale;
GasReagents[i] = GasPrototypes[i].Reagent;
}
}
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) / HeatScale;
+ return MathF.Max(NumericsHelpers.HorizontalAdd(tmp), Atmospherics.MinimumHeatCapacity);
}
/// <summary>
/// in-game.
/// </summary>
public static readonly CVarDef<float> AtmosSpeedup =
- CVarDef.Create("atmos.speedup", 1f, 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", 1f, CVar.SERVERONLY);
+ CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY);
/*
* MIDI instruments