/// <summary> /// Adds item to current floor of current house /// </summary> /// <param name="item">Item object to add</param> public void AddItem(IItem item) { if (item is null) { throw new ArgumentNullException(nameof(item)); } CurHouse.AddItem(CurFloor, item, CurRoom); }
/// <summary> /// Searches house for items matching specified keywords /// </summary> /// <param name="floor">Floor to search</param> /// <param name="room">Room to search</param> /// <param name="item">Item type to search for</param> /// <param name="keywords">Keywords to search for</param> /// <returns>ColorText object of items found to be matching the keywords</returns> public List <ColorText> Search(int floor, int room, string item, List <string> keywords) => CurHouse.Search(room != -2 && floor == -1 ? CurFloor : floor, room, item, keywords);
/// <summary> /// How many pages a list of items will require /// </summary> /// <param name="start">Index of beginning of range</param> /// <param name="end">Index of end of range</param> /// <param name="type">Type of item to search for ("*" for all)</param> /// <param name="length">Maximum amount of items to return</param> /// <param name="room">Room containing the items wanted<para>use -2 for all rooms, and -1 for items not in a room</para></param> /// <returns>Total amount of pages that will be required to list the specified items</returns> public int PageCount(int start, int end, string type, int length, int room) => CurHouse.PageCount(CurFloor, start, end, type, length, room);
/// <summary> /// Lists items on the current floor of the current house /// </summary> /// <param name="start">Index of beginning of range (inclusive)</param> /// <param name="end">Index of end of range (exclusive)</param> /// <param name="type">Type of item to search for ("*" for all)</param> /// <param name="length">Maximum amount of items to return</param> /// <param name="page">Which page<para>For example: if you only want 20 items on screen at once, for the first 20 items the page would be 0, but if you need items 20-39, the page would be 1</para></param> /// <param name="room">Room containing the items wanted<para>use -2 for all rooms, and -1 for items not in a room</para></param> /// <returns>ColorText object of list of designated items</returns> public ColorText List(int start, int end, string type, int length, int page, int room) => CurHouse.List(CurFloor, start, end, type, length, page, room);
/// <summary> /// Gets Item's SubItem from current floor of current house /// </summary> /// <param name="item">Number of containing item</param> /// <param name="subItem">Number of subitem</param> /// <returns></returns> public IItem GetItem(int item, int subItem) => CurHouse.GetItem(CurFloor, item, subItem);
/// <summary> /// Gets floor 'floor' of the current house /// </summary> /// <param name="floor">Number of floor you want</param> /// <returns>Requested floor (if it exists)</returns> public Floor GetFloor(int floor) => CurHouse.GetFloor(floor);