Remove redundant null checks for atmos (#2703)

* Remove redundant null checks for atmos

* Remove unnecessary nullability parameter from AtmosphereSystem.GetGridAtmosphere

* Remove more nullability markers

* Bring back null checks for gas tanks

* Remove null checks from GasMixture.Merge and TileAtmosphere.AssumeAir

Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
DrSmugleaf
2020-12-08 12:17:13 +01:00
committed by GitHub
parent a78452c845
commit 074db878bb
6 changed files with 9 additions and 29 deletions

View File

@@ -11,7 +11,6 @@ using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos
@@ -42,7 +41,7 @@ namespace Content.Server.Atmos
public bool Immutable { get; private set; }
[ViewVariables]
public float LastShare { get; private set; } = 0;
public float LastShare { get; private set; }
[ViewVariables]
public readonly Dictionary<GasReaction, float> ReactionResults = new()
@@ -148,7 +147,7 @@ namespace Content.Server.Atmos
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Merge(GasMixture giver)
{
if (Immutable || giver == null) return;
if (Immutable) return;
if (MathF.Abs(Temperature - giver.Temperature) > Atmospherics.MinimumTemperatureDeltaToConsider)
{