Example #1
0
        /// <summary>
        /// Determines if the item can hold a given other item by checking the properties of both items and the available
        /// capacity of this item.
        /// </summary>
        /// <param name="item">The item to be put inside this.</param>
        /// <returns>Bool indicating if the item can be put inside this.</returns>
        public bool CanHoldItem(SMItem item)
        {
            if (this.CanHoldOtherItems() && this.CanHoldItemByFamily(item))
            {
                if (SMItemHelper.GetItemAvailbleCapacity(this) >= item.ItemSize)
                {
                    return(true);
                }
            }

            return(false);
        }