From: osjarw <62134478+osjarw@users.noreply.github.com> Date: Sat, 29 Jun 2024 16:06:25 +0000 (+0300) Subject: Limit air lost by wrenching/breaking pipes (#29574) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=6af418663eb180756c33027b46f412bbadec5c68;p=space-station-14.git Limit air lost by wrenching/breaking pipes (#29574) Gas lost via wrench/breaking capped --- diff --git a/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs b/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs index fcb3ccde68..f594866fa2 100644 --- a/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs +++ b/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs @@ -82,7 +82,10 @@ namespace Content.Server.Atmos.Piping.EntitySystems continue; var difference = pipe.Air.Pressure - environment.Pressure; - lost += difference * environment.Volume / (environment.Temperature * Atmospherics.R); + lost += Math.Min( + pipe.Volume / pipe.Air.Volume * pipe.Air.TotalMoles, + difference * environment.Volume / (environment.Temperature * Atmospherics.R) + ); timesLost++; }