Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Robust.Shared.GameObjects;
|
||||
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
|
||||
|
||||
@@ -16,12 +17,12 @@ namespace Content.Server.GameObjects.Components.GUI
|
||||
/// <param name="flagsCheck">Whether the entity passes default slot masks & flags checks.</param>
|
||||
/// <param name="reason">The translated reason why the item cannot be equiped, if this function returns false. Can be null.</param>
|
||||
/// <returns>True if the entity can be equipped, false otherwise</returns>
|
||||
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck, out string reason)
|
||||
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck, [NotNullWhen(false)] out string? reason)
|
||||
{
|
||||
reason = null;
|
||||
return flagsCheck;
|
||||
}
|
||||
|
||||
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck) => CanEquip(slot, entity, flagsCheck, out var _);
|
||||
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck) => CanEquip(slot, entity, flagsCheck, out _);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user