using SS14.Server.Interfaces.GameObjects;
using SS14.Shared.Interfaces.GameObjects;
using System;
namespace Content.Server.Interfaces.GameObjects
{
public interface IInventoryComponent : IComponent
{
///
/// Gets the item in the specified slot.
///
/// The slot to get the item for.
/// Null if the slot is empty, otherwise the item.
IItemComponent Get(string slot);
///
/// Gets the slot with specified name.
/// This gets the slot, NOT the item contained therein.
///
/// The name of the slot to get.
IInventorySlot GetSlot(string slot);
///
/// Puts an item in a slot.
///
///
/// This will fail if there is already an item in the specified slot.
///
/// The slot to put the item in.
/// The item to insert into the slot.
/// True if the item was successfully inserted, false otherwise.
bool Insert(string slot, IItemComponent item);
///
/// Checks whether an item can be put in the specified slot.
///
/// The slot to check for.
/// The item to check for.
/// True if the item can be inserted into the specified slot.
bool CanInsert(string slot, IItemComponent item);
///
/// Drops the item in a slot.
///
/// The slot to drop the item from.
/// True if an item was dropped, false otherwise.
bool Drop(string slot);
///
/// Checks whether an item can be dropped from the specified slot.
///
/// The slot to check for.
///
/// True if there is an item in the slot and it can be dropped, false otherwise.
///
bool CanDrop(string slot);
///
/// Adds a new slot to this inventory component.
///
/// The name of the slot to add.
///
/// Thrown if the slot with specified name already exists.
///
IInventorySlot AddSlot(string slot);
///
/// Removes a slot from this inventory component.
///
///
/// If the slot contains an item, the item is dropped.
///
/// The name of the slot to remove.
void RemoveSlot(string slot);
///
/// Checks whether a slot with the specified name exists.
///
/// The slot name to check.
/// True if the slot exists, false otherwise.
bool HasSlot(string slot);
}
public interface IInventorySlot
{
///
/// The name of the slot.
///
string Name { get; }
///
/// The item contained in the slot, can be null.
///
IItemComponent Item { get; }
///
/// The component owning us.
///
IInventoryComponent Owner { get; }
}
}