Done I hope. Needs testing and type checker updates.

waiting on https://github.com/space-wizards/space-station-14/pull/422
This commit is contained in:
PJB3005
2017-09-25 20:52:39 +02:00
parent 73ae408e20
commit 3e0bcddd4d
4 changed files with 100 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Interfaces.GameObjects
/// <summary>
/// Enumerates over every held item.
/// </summary>
IEnumerable<IItemComponent> GetAllHands();
IEnumerable<IItemComponent> GetAllHeldItems();
/// <summary>
/// Gets the item held by a hand.
@@ -70,5 +70,30 @@ namespace Content.Server.Interfaces.GameObjects
/// True if the item can be dropped, false if the hand is empty or the item in the hand cannot be dropped.
/// </returns>
bool CanDrop(string index);
/// <summary>
/// Adds a new hand to this hands component.
/// </summary>
/// <param name="index">The name of the hand to add.</param>
/// <exception cref="InvalidOperationException">
/// Thrown if a hand with specified name already exists.
/// </exception>
void AddHand(string index);
/// <summary>
/// Removes a hand from this hands component.
/// </summary>
/// <remarks>
/// If the hand contains an item, the item is dropped.
/// </remarks>
/// <param name="index">The name of the hand to remove.</param>
void RemoveHand(string index);
/// <summary>
/// Checks whether a hand with the specified name exists.
/// </summary>
/// <param name="index">The hand name to check.</param>
/// <returns>True if the hand exists, false otherwise.</returns>
bool HasHand(string index);
}
}

View File

@@ -62,7 +62,7 @@ namespace Content.Server.Interfaces.GameObjects
/// <exception cref="InvalidOperationException">
/// Thrown if the slot with specified name already exists.
/// </exception>
void AddSlot(string slot);
IInventorySlot AddSlot(string slot);
/// <summary>
/// Removes a slot from this inventory component.