From a427ee694010a58b59bb867c548925df82643b4c Mon Sep 17 00:00:00 2001 From: Aviu00 Date: Thu, 25 Jan 2024 15:27:59 +0300 Subject: [PATCH] AAAAAAAA --- Content.Server/Atmos/Reactions/BZProductionReaction.cs | 8 ++++---- .../Atmos/Reactions/HalonOxygenAbsorptionReaction.cs | 8 ++++---- .../Atmos/Reactions/HealiumProductionReaction.cs | 8 ++++---- Content.Server/Atmos/Reactions/HydrogenFireReaction.cs | 8 ++++---- .../Atmos/Reactions/HyperNobliumProductionReaction.cs | 8 ++++---- .../Atmos/Reactions/NitriumDecompositionReaction.cs | 8 ++++---- .../Atmos/Reactions/NitriumProductionReaction.cs | 8 ++++---- .../Atmos/Reactions/PluoxiumProductionReaction.cs | 8 ++++---- .../Atmos/Reactions/ProtoNitrateBZaseActionReaction.cs | 8 ++++---- .../Reactions/ProtoNitrateHydrogenConversionReaction.cs | 8 ++++---- .../Atmos/Reactions/ProtoNitrateProductionReaction.cs | 8 ++++---- .../Reactions/ProtoNitrateTritiumDeirradiationReaction.cs | 8 ++++---- .../Atmos/Reactions/ZaukerDecompositionReaction.cs | 8 ++++---- .../Atmos/Reactions/ZaukerProductionReaction.cs | 8 ++++---- 14 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Content.Server/Atmos/Reactions/BZProductionReaction.cs b/Content.Server/Atmos/Reactions/BZProductionReaction.cs index 06b22015f3..a87e4a0340 100644 --- a/Content.Server/Atmos/Reactions/BZProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/BZProductionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/HalonOxygenAbsorptionReaction.cs b/Content.Server/Atmos/Reactions/HalonOxygenAbsorptionReaction.cs index e3b717d1c4..5a34ccbf02 100644 --- a/Content.Server/Atmos/Reactions/HalonOxygenAbsorptionReaction.cs +++ b/Content.Server/Atmos/Reactions/HalonOxygenAbsorptionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/HealiumProductionReaction.cs b/Content.Server/Atmos/Reactions/HealiumProductionReaction.cs index 8e2d5c5c08..b949cf9e43 100644 --- a/Content.Server/Atmos/Reactions/HealiumProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/HealiumProductionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/HydrogenFireReaction.cs b/Content.Server/Atmos/Reactions/HydrogenFireReaction.cs index e89c22c142..9e055d863f 100644 --- a/Content.Server/Atmos/Reactions/HydrogenFireReaction.cs +++ b/Content.Server/Atmos/Reactions/HydrogenFireReaction.cs @@ -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; } diff --git a/Content.Server/Atmos/Reactions/HyperNobliumProductionReaction.cs b/Content.Server/Atmos/Reactions/HyperNobliumProductionReaction.cs index d72a5b6f17..b04728cb1f 100644 --- a/Content.Server/Atmos/Reactions/HyperNobliumProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/HyperNobliumProductionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/NitriumDecompositionReaction.cs b/Content.Server/Atmos/Reactions/NitriumDecompositionReaction.cs index 6ebda1afca..9dae931249 100644 --- a/Content.Server/Atmos/Reactions/NitriumDecompositionReaction.cs +++ b/Content.Server/Atmos/Reactions/NitriumDecompositionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/NitriumProductionReaction.cs b/Content.Server/Atmos/Reactions/NitriumProductionReaction.cs index a78950f7e0..05116040a6 100644 --- a/Content.Server/Atmos/Reactions/NitriumProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/NitriumProductionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/PluoxiumProductionReaction.cs b/Content.Server/Atmos/Reactions/PluoxiumProductionReaction.cs index 3673c589b2..ce9594da8f 100644 --- a/Content.Server/Atmos/Reactions/PluoxiumProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/PluoxiumProductionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/ProtoNitrateBZaseActionReaction.cs b/Content.Server/Atmos/Reactions/ProtoNitrateBZaseActionReaction.cs index 7a4b97dd1b..574e136cdb 100644 --- a/Content.Server/Atmos/Reactions/ProtoNitrateBZaseActionReaction.cs +++ b/Content.Server/Atmos/Reactions/ProtoNitrateBZaseActionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/ProtoNitrateHydrogenConversionReaction.cs b/Content.Server/Atmos/Reactions/ProtoNitrateHydrogenConversionReaction.cs index 78021899fe..92660deae7 100644 --- a/Content.Server/Atmos/Reactions/ProtoNitrateHydrogenConversionReaction.cs +++ b/Content.Server/Atmos/Reactions/ProtoNitrateHydrogenConversionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/ProtoNitrateProductionReaction.cs b/Content.Server/Atmos/Reactions/ProtoNitrateProductionReaction.cs index 835c2eedbf..6449aa8d97 100644 --- a/Content.Server/Atmos/Reactions/ProtoNitrateProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/ProtoNitrateProductionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/ProtoNitrateTritiumDeirradiationReaction.cs b/Content.Server/Atmos/Reactions/ProtoNitrateTritiumDeirradiationReaction.cs index 246d719ea6..2e660fd1e5 100644 --- a/Content.Server/Atmos/Reactions/ProtoNitrateTritiumDeirradiationReaction.cs +++ b/Content.Server/Atmos/Reactions/ProtoNitrateTritiumDeirradiationReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/ZaukerDecompositionReaction.cs b/Content.Server/Atmos/Reactions/ZaukerDecompositionReaction.cs index c5243fed78..589a694386 100644 --- a/Content.Server/Atmos/Reactions/ZaukerDecompositionReaction.cs +++ b/Content.Server/Atmos/Reactions/ZaukerDecompositionReaction.cs @@ -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); diff --git a/Content.Server/Atmos/Reactions/ZaukerProductionReaction.cs b/Content.Server/Atmos/Reactions/ZaukerProductionReaction.cs index 1535e3fde5..af5d80a4f5 100644 --- a/Content.Server/Atmos/Reactions/ZaukerProductionReaction.cs +++ b/Content.Server/Atmos/Reactions/ZaukerProductionReaction.cs @@ -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);