]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix TritiumFireReaction low fuel limiting behavior (#42407)
authorArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Wed, 14 Jan 2026 05:08:25 +0000 (21:08 -0800)
committerGitHub <noreply@github.com>
Wed, 14 Jan 2026 05:08:25 +0000 (05:08 +0000)
fix fuel burn limiting logic incorrectly taking max instead of min

Content.Server/Atmos/Reactions/TritiumFireReaction.cs

index 45443b5a86d5d8a15fe001d9415c64c5f5f5a268..d6e4b9624e69d4bfb05f4b0b76605ebf8629fe58 100644 (file)
@@ -31,7 +31,8 @@ namespace Content.Server.Atmos.Reactions
             }
             else
             {
-                burnedFuel = Math.Max(initialTrit, mixture.GetMoles(Gas.Oxygen) / Atmospherics.TritiumBurnFuelRatio) / Atmospherics.TritiumBurnTritFactor;
+                // Limit the amount of fuel burned by the limiting reactant, either our initial tritium or the amount of oxygen available given the burn ratio.
+                burnedFuel = Math.Min(initialTrit, mixture.GetMoles(Gas.Oxygen) / Atmospherics.TritiumBurnFuelRatio) / Atmospherics.TritiumBurnTritFactor;
                 mixture.AdjustMoles(Gas.Tritium, -burnedFuel);
                 mixture.AdjustMoles(Gas.Oxygen, -burnedFuel / Atmospherics.TritiumBurnFuelRatio);
                 energyReleased += (Atmospherics.FireHydrogenEnergyReleased * burnedFuel * (Atmospherics.TritiumBurnTritFactor - 1));