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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user