using SS14.Shared.Interfaces.GameObjects; using System.Collections.Generic; namespace Content.Server.Interfaces.GameObjects { public interface IHandsComponent : IComponent { /// /// The hand index of the currently active hand. /// string ActiveIndex { get; set; } /// /// Enumerates over every held item. /// IEnumerable GetAllHeldItems(); /// /// Gets the item held by a hand. /// /// The index of the hand to get. /// The item in the held, null if no item is held IItemComponent GetHand(string index); /// /// Gets item held by the current active hand /// IItemComponent GetActiveHand { get; } /// /// Puts an item into any empty hand, preferring the active hand. /// /// The item to put in a hand. /// True if the item was inserted, false otherwise. bool PutInHand(IItemComponent item); /// /// Puts an item into a specific hand. /// /// The item to put in the hand. /// The index of the hand to put the item into. /// /// If true and the provided hand is full, the method will fall back to /// /// True if the item was inserted into a hand, false otherwise. bool PutInHand(IItemComponent item, string index, bool fallback=true); /// /// Checks to see if an item can be put in any hand. /// /// The item to check for. /// True if the item can be inserted, false otherwise. bool CanPutInHand(IItemComponent item); /// /// Checks to see if an item can be put in the specified hand. /// /// The item to check for. /// The index for the hand to check for. /// True if the item can be inserted, false otherwise. bool CanPutInHand(IItemComponent item, string index); /// /// Drops an item on the ground, removing it from the hand. /// /// The hand to drop from. /// True if an item was successfully dropped, false otherwise. bool Drop(string index); /// /// Checks whether the item in the specified hand can be dropped. /// /// The hand to check for. /// /// True if the item can be dropped, false if the hand is empty or the item in the hand cannot be dropped. /// bool CanDrop(string index); /// /// Adds a new hand to this hands component. /// /// The name of the hand to add. /// /// Thrown if a hand with specified name already exists. /// void AddHand(string index); /// /// Removes a hand from this hands component. /// /// /// If the hand contains an item, the item is dropped. /// /// The name of the hand to remove. void RemoveHand(string index); /// /// Checks whether a hand with the specified name exists. /// /// The hand name to check. /// True if the hand exists, false otherwise. bool HasHand(string index); } }