Enable nullability in Content.Server (#3685)

This commit is contained in:
DrSmugleaf
2021-03-16 15:50:20 +01:00
committed by GitHub
parent 90fec0ed24
commit a5ade526b7
306 changed files with 1616 additions and 1441 deletions

View File

@@ -8,9 +8,6 @@ using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -34,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
{
_locked = value;
if (Owner.TryGetComponent(out AppearanceComponent appearance))
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
{
appearance.SetData(StorageVisuals.Locked, _locked);
}
@@ -45,7 +42,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
{
base.Startup();
if (Owner.TryGetComponent(out AppearanceComponent appearance))
if (Owner.TryGetComponent(out AppearanceComponent? appearance))
{
appearance.SetData(StorageVisuals.CanLock, true);
}
@@ -114,7 +111,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
private bool CheckAccess(IEntity user)
{
if (Owner.TryGetComponent(out AccessReader reader))
if (Owner.TryGetComponent(out AccessReader? reader))
{
if (!reader.IsAllowed(user))
{