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

@@ -2,7 +2,6 @@
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Log;
namespace Content.Server.GameObjects.Components.Atmos.Piping
{
@@ -32,11 +31,6 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping
{
var gridAtmos = EntitySystem.Get<AtmosphereSystem>()
.GetGridAtmosphere(Owner.Transform.GridID);
if (gridAtmos == null)
{
Logger.Error($"{nameof(PipeNetDeviceComponent)} on entity {Owner.Uid} could not find an {nameof(IGridAtmosphereComponent)}.");
return;
}
JoinedGridAtmos = gridAtmos;
JoinedGridAtmos.AddPipeNetDevice(this);
}