Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user