Replace MaybeNullWhen(false) with NotNullWhen(true)
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
|
||||
/// <param name="handName">The name of the hand to get.</param>
|
||||
/// <param name="item">The item in the held, null if no item is held</param>
|
||||
/// <returns>Whether it was holding an item</returns>
|
||||
bool TryGetItem(string handName, [MaybeNullWhen(false)] out ItemComponent item);
|
||||
bool TryGetItem(string handName, [NotNullWhen(true)] out ItemComponent? item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets item held by the current active hand
|
||||
@@ -102,7 +102,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
|
||||
/// <returns>
|
||||
/// true if the entity is held, false otherwise
|
||||
/// </returns>
|
||||
bool TryHand(IEntity entity, [MaybeNullWhen(false)] out string handName);
|
||||
bool TryHand(IEntity entity, [NotNullWhen(true)] out string? handName);
|
||||
|
||||
/// <summary>
|
||||
/// Drops the item contained in the slot to the same position as our entity.
|
||||
|
||||
Reference in New Issue
Block a user