This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
2015-02-07 17:14:41 -07:00

34 lines
1.1 KiB
C#

using System;
namespace TrueCraft.API.Windows
{
public interface IWindow
{
event EventHandler<WindowChangeEventArgs> WindowChange;
IWindowArea[] WindowAreas { get; }
sbyte ID { get; set; }
string Name { get; }
sbyte Type { get; }
int Length { get; }
ItemStack this[int index] { get; set; }
bool Empty { get; }
/// <summary>
/// Call this to "shift+click" an item from one area to another.
/// </summary>
void MoveToAlternateArea(int index);
/// <summary>
/// Gets an array of all slots in this window. Suitable for sending to clients over the network.
/// </summary>
ItemStack[] GetSlots();
/// <summary>
/// Adds the specified item stack to this window, merging with established slots as neccessary.
/// </summary>
bool PickUpStack(ItemStack slot);
/// <summary>
/// Copy the contents of this window back into an inventory window after changes have been made.
/// </summary>
void CopyToInventory(IWindow inventoryWindow);
}
}