Replace MaybeNullWhen(false) with NotNullWhen(true)
This commit is contained in:
@@ -130,7 +130,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
// Already get the pressure before Dirty(), because we can't get the EntitySystem in that thread or smth
|
||||
var pressure = 0f;
|
||||
var gam = EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(Owner.Transform.GridID);
|
||||
var tile = gam?.GetTile(Owner.Transform.Coordinates).Air;
|
||||
var tile = gam?.GetTile(Owner.Transform.Coordinates)?.Air;
|
||||
if (tile != null)
|
||||
{
|
||||
pressure = tile.Pressure;
|
||||
@@ -190,7 +190,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
var atmosSystem = EntitySystem.Get<AtmosphereSystem>();
|
||||
var gam = atmosSystem.GetGridAtmosphere(pos.GetGridId(Owner.EntityManager));
|
||||
var tile = gam?.GetTile(pos).Air;
|
||||
var tile = gam.GetTile(pos)?.Air;
|
||||
if (tile == null)
|
||||
{
|
||||
error = "No Atmosphere!";
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Content.Server.Atmos;
|
||||
@@ -10,7 +9,6 @@ using Content.Server.GameObjects.Components.Atmos.Piping;
|
||||
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Server.GameObjects.EntitySystems.Atmos;
|
||||
using Content.Shared;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Maps;
|
||||
using Robust.Server.GameObjects.EntitySystems.TileLookup;
|
||||
@@ -19,7 +17,6 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.ComponentDependencies;
|
||||
using Robust.Shared.GameObjects.Components.Map;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.Configuration;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
Reference in New Issue
Block a user