using System.Diagnostics.CodeAnalysis; using Robust.Shared.GameObjects; using static Content.Shared.Inventory.EquipmentSlotDefines; namespace Content.Server.Inventory.Components { /// /// Allows for overriding inventory-related behavior on an entity. /// public interface IInventoryController { /// /// Can be implemented to override "can this item be equipped" behavior. /// /// The slot to be equipped into. /// The entity to equip. /// Whether the entity passes default slot masks & flags checks. /// The translated reason why the item cannot be equiped, if this function returns false. Can be null. /// True if the entity can be equipped, false otherwise bool CanEquip(Slots slot, EntityUid entity, bool flagsCheck, [NotNullWhen(false)] out string? reason) { reason = null; return flagsCheck; } bool CanEquip(Slots slot, EntityUid entity, bool flagsCheck) => CanEquip(slot, entity, flagsCheck, out _); } }