Replace MaybeNullWhen(false) with NotNullWhen(true)
This commit is contained in:
@@ -9,7 +9,6 @@ using Content.Server.GameObjects.Components.Strap;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.GameObjects.Components.Buckle;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Content.Shared.GameObjects.Components.Strap;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Verbs;
|
||||
@@ -27,7 +26,6 @@ using Robust.Shared.Interfaces.Timing;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
@@ -69,7 +67,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
||||
public Vector2 BuckleOffset { get; private set; }
|
||||
|
||||
private StrapComponent? _buckledTo;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The strap that this component is buckled to.
|
||||
@@ -157,7 +155,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanBuckle(IEntity? user, IEntity to, [MaybeNullWhen(false)] out StrapComponent strap)
|
||||
private bool CanBuckle(IEntity? user, IEntity to, [NotNullWhen(true)] out StrapComponent? strap)
|
||||
{
|
||||
strap = null;
|
||||
|
||||
@@ -421,7 +419,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
||||
{
|
||||
drawDepth = BuckledTo.SpriteComponent.DrawDepth - 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return new BuckleComponentState(Buckled, drawDepth, LastEntityBuckledTo, DontCollide);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user