using Robust.Shared.Interfaces.GameObjects;
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
namespace Content.Server.GameObjects
{
///
/// 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, IEntity entity, bool flagsCheck, out string reason)
{
reason = null;
return flagsCheck;
}
bool CanEquip(Slots slot, IEntity entity, bool flagsCheck) => CanEquip(slot, entity, flagsCheck, out var _);
}
}