Fix gas cannister slider log spam. (#6628)

This commit is contained in:
Leon Friedrich
2022-02-20 08:15:47 +13:00
committed by GitHub
parent 79f722b4ca
commit 56fc6011f1
5 changed files with 38 additions and 10 deletions

View File

@@ -191,12 +191,12 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
}
}
DirtyUI(uid, canister, nodeContainer, containerManager);
// If last pressure is very close to the current pressure, do nothing.
if (MathHelper.CloseToPercent(canister.Air.Pressure, canister.LastPressure))
return;
DirtyUI(uid, canister, nodeContainer, containerManager);
canister.LastPressure = canister.Air.Pressure;
if (canister.Air.Pressure < 10)