AAAAAAAA
This commit is contained in:
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class BZProductionReaction : IGasReactionEffect
|
||||
public sealed partial class BZProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -24,7 +24,7 @@ public sealed class BZProductionReaction : IGasReactionEffect
|
||||
if (initialNitrousOxide - BZFormed * 0.4f < 0 || initialPlasma - (0.8f - BZFormed) < 0 || BZFormed <= 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
var amountDecomposed = 0.0f;
|
||||
var nitrousOxideDecomposedFactor = Math.Max(4.0f * (initialPlasma / (initialNitrousOxide + initialPlasma) - 0.75f), 0);
|
||||
@@ -41,7 +41,7 @@ public sealed class BZProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = BZFormed * (Atmospherics.BZFormationEnergy + nitrousOxideDecomposedFactor * (Atmospherics.NitrousOxideDecompositionEnergy - Atmospherics.BZFormationEnergy));
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class HalonOxygenAbsorptionReaction : IGasReactionEffect
|
||||
public sealed partial class HalonOxygenAbsorptionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -22,14 +22,14 @@ public sealed class HalonOxygenAbsorptionReaction : IGasReactionEffect
|
||||
if (heatEfficiency <= 0f || initialHalon - heatEfficiency < 0f || initialOxygen - heatEfficiency * 20f < 0f)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.Halon, -heatEfficiency);
|
||||
mixture.AdjustMoles(Gas.Oxygen, -heatEfficiency*20f);
|
||||
mixture.AdjustMoles(Gas.CarbonDioxide, heatEfficiency*5f);
|
||||
|
||||
var energyUsed = heatEfficiency * Atmospherics.HalonCombustionEnergy;
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyUsed) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class HealiumProductionReaction : IGasReactionEffect
|
||||
public sealed partial class HealiumProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -22,7 +22,7 @@ public sealed class HealiumProductionReaction : IGasReactionEffect
|
||||
if (heatEfficiency <= 0 || initialFrezon - heatEfficiency * 2.75f < 0 || initialBZ - heatEfficiency * 0.25f < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.Frezon, -heatEfficiency*2.75f);
|
||||
mixture.AdjustMoles(Gas.BZ, -heatEfficiency*0.25f);
|
||||
@@ -30,7 +30,7 @@ public sealed class HealiumProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = heatEfficiency * Atmospherics.HealiumFormationEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@ namespace Content.Server.Atmos.Reactions
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public sealed class HydrogenFireReaction : IGasReactionEffect
|
||||
public sealed partial class HydrogenFireReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var energyReleased = 0f;
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
var temperature = mixture.Temperature;
|
||||
var location = holder as TileAtmosphere;
|
||||
mixture.ReactionResults[GasReaction.Fire] = 0;
|
||||
@@ -38,7 +38,7 @@ namespace Content.Server.Atmos.Reactions
|
||||
|
||||
if (energyReleased > 0)
|
||||
{
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = (temperature * oldHeatCapacity + energyReleased) / newHeatCapacity;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class HyperNobliumProductionReaction : IGasReactionEffect
|
||||
public sealed partial class HyperNobliumProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -21,7 +21,7 @@ public sealed class HyperNobliumProductionReaction : IGasReactionEffect
|
||||
if (nobFormed <= 0 || (initialTritium - 5f) * nobFormed < 0 || (initialNitrogen - 10f) * nobFormed < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
var reductionFactor = Math.Clamp(initialTritium/(initialTritium+initialBZ), 0.001f, 1f);
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed class HyperNobliumProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = nobFormed * (Atmospherics.NobliumFormationEnergy/Math.Max(initialBZ, 1));
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class NitriumDecompositionReaction : IGasReactionEffect
|
||||
public sealed partial class NitriumDecompositionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -21,7 +21,7 @@ public sealed class NitriumDecompositionReaction : IGasReactionEffect
|
||||
if (heatEfficiency <= 0 || initialNitrium - heatEfficiency < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.Nitrium, -heatEfficiency);
|
||||
mixture.AdjustMoles(Gas.Hydrogen, heatEfficiency);
|
||||
@@ -29,7 +29,7 @@ public sealed class NitriumDecompositionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = heatEfficiency * Atmospherics.NitriumDecompositionEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class NitriumProductionReaction : IGasReactionEffect
|
||||
public sealed partial class NitriumProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -23,7 +23,7 @@ public sealed class NitriumProductionReaction : IGasReactionEffect
|
||||
if (heatEfficiency <= 0 || initialTritium - heatEfficiency < 0 || initialNitrogen - heatEfficiency < 0 || initialBZ - heatEfficiency * 0.05f < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
mixture.AdjustMoles(Gas.Tritium, -heatEfficiency);
|
||||
mixture.AdjustMoles(Gas.Nitrogen, -heatEfficiency);
|
||||
mixture.AdjustMoles(Gas.BZ, -heatEfficiency * 0.05f);
|
||||
@@ -31,7 +31,7 @@ public sealed class NitriumProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyUsed = heatEfficiency * Atmospherics.NitriumFormationEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity - energyUsed) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class PluoxiumProductionReaction : IGasReactionEffect
|
||||
public sealed partial class PluoxiumProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -30,8 +30,8 @@ public sealed class PluoxiumProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = producedAmount * Atmospherics.PluoxiumFormationEnergy;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ProtoNitrateBZaseConversionReaction : IGasReactionEffect
|
||||
public sealed partial class ProtoNitrateBZaseConversionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -22,7 +22,7 @@ public sealed class ProtoNitrateBZaseConversionReaction : IGasReactionEffect
|
||||
if (consumedAmount <= 0 || initialBZ - consumedAmount < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.BZ, -consumedAmount);
|
||||
mixture.AdjustMoles(Gas.Nitrogen, consumedAmount*0.4f);
|
||||
@@ -31,7 +31,7 @@ public sealed class ProtoNitrateBZaseConversionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = consumedAmount * Atmospherics.ProtoNitrateBZaseConversionEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ProtoNitrateHydrogenConversionReaction : IGasReactionEffect
|
||||
public sealed partial class ProtoNitrateHydrogenConversionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -21,14 +21,14 @@ public sealed class ProtoNitrateHydrogenConversionReaction : IGasReactionEffect
|
||||
if (producedAmount <= 0 || initialHydrogen-producedAmount < 0f)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.Hydrogen, -producedAmount);
|
||||
mixture.AdjustMoles(Gas.ProtoNitrate, producedAmount*0.5f);
|
||||
|
||||
var energyUsed = producedAmount * Atmospherics.ProtoNitrateHydrogenConversionEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity - energyUsed) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ProtoNitrateProductionReaction : IGasReactionEffect
|
||||
public sealed partial class ProtoNitrateProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -22,7 +22,7 @@ public sealed class ProtoNitrateProductionReaction : IGasReactionEffect
|
||||
if (heatEfficiency <= 0 || initialPluoxium - heatEfficiency * 0.2f < 0 || initialHydrogen - heatEfficiency * 2f < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.Hydrogen, -heatEfficiency * 2f);
|
||||
mixture.AdjustMoles(Gas.Pluoxium, -heatEfficiency * 0.2f);
|
||||
@@ -30,7 +30,7 @@ public sealed class ProtoNitrateProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = heatEfficiency * Atmospherics.ProtoNitrateFormationEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ProtoNitrateTritiumConversionReaction : IGasReactionEffect
|
||||
public sealed partial class ProtoNitrateTritiumConversionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -22,7 +22,7 @@ public sealed class ProtoNitrateTritiumConversionReaction : IGasReactionEffect
|
||||
if (initialTritium - producedAmount < 0 || initialProtoNitrate - producedAmount * 0.01f < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.ProtoNitrate, -producedAmount * 0.01f);
|
||||
mixture.AdjustMoles(Gas.Tritium, -producedAmount);
|
||||
@@ -30,7 +30,7 @@ public sealed class ProtoNitrateTritiumConversionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = producedAmount * Atmospherics.ProtoNitrateTritiumConversionEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ZaukerDecompositionReaction : IGasReactionEffect
|
||||
public sealed partial class ZaukerDecompositionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -21,7 +21,7 @@ public sealed class ZaukerDecompositionReaction : IGasReactionEffect
|
||||
if (burnedFuel <= 0 || initialZauker - burnedFuel < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.Zauker, -burnedFuel);
|
||||
mixture.AdjustMoles(Gas.Oxygen, burnedFuel*0.3f);
|
||||
@@ -29,7 +29,7 @@ public sealed class ZaukerDecompositionReaction : IGasReactionEffect
|
||||
|
||||
var energyReleased = burnedFuel * Atmospherics.ZaukerDecompositionEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity + energyReleased) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ using JetBrains.Annotations;
|
||||
namespace Content.Server.Atmos.Reactions;
|
||||
|
||||
[UsedImplicitly]
|
||||
public sealed class ZaukerProductionReaction : IGasReactionEffect
|
||||
public sealed partial class ZaukerProductionReaction : IGasReactionEffect
|
||||
{
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem)
|
||||
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
|
||||
{
|
||||
var initialHyperNoblium = mixture.GetMoles(Gas.HyperNoblium);
|
||||
if (initialHyperNoblium >= 5.0f && mixture.Temperature > 20f)
|
||||
@@ -22,7 +22,7 @@ public sealed class ZaukerProductionReaction : IGasReactionEffect
|
||||
if (heatEfficiency <= 0 || initialHypernoblium - heatEfficiency * 0.01f < 0 || initialNitrium - heatEfficiency * 0.5f < 0)
|
||||
return ReactionResult.NoReaction;
|
||||
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var oldHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
|
||||
mixture.AdjustMoles(Gas.HyperNoblium, -heatEfficiency * 0.01f);
|
||||
mixture.AdjustMoles(Gas.Nitrium, -heatEfficiency * 0.5f);
|
||||
@@ -30,7 +30,7 @@ public sealed class ZaukerProductionReaction : IGasReactionEffect
|
||||
|
||||
var energyUsed = heatEfficiency * Atmospherics.ZaukerFormationEnergy;
|
||||
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture);
|
||||
var newHeatCapacity = atmosphereSystem.GetHeatCapacity(mixture, true);
|
||||
if (newHeatCapacity > Atmospherics.MinimumHeatCapacity)
|
||||
mixture.Temperature = Math.Max((mixture.Temperature * oldHeatCapacity - energyUsed) / newHeatCapacity, Atmospherics.TCMB);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user