mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
Limit air lost by wrenching/breaking pipes (#29574)
Gas lost via wrench/breaking capped
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user