public static void CompressInventory() { List <int> removeList = new List <int>(); for (int n = 0; n < ShipInventoryManager.ShipItems.Count; n++) { if (ShipInventoryManager.ShipItems[n].Kind == "Empty") { removeList.Add(n); } } for (int n = removeList.Count; n > 0; n--) { ShipInventoryManager.RemoveItemAt(removeList[n - 1]);; } }