List <SavableRequirementData> GenerateNewRequirements(int requirementAmount) { var savableMissionRequirements = new List <SavableRequirementData>(); var requirementAmountLeft = requirementAmount; var colorDataList = CollectionsHelper.CreateListOfIndexes(generatorData.Colors.Count); var clothingTypeDataList = CollectionsHelper.CreateListOfIndexes(generatorData.ClothingTypes.Count); while (requirementAmountLeft >= 1) { var requirementValue = CalculationsHelper.NumberGenerator(Mathf.Min(3, requirementAmountLeft)); var colorDataListIndex = CollectionsHelper.GetRandomNonRepeatingIndexFromList(colorDataList); var clothingTypeIndex = CollectionsHelper.GetRandomNonRepeatingIndexFromList(clothingTypeDataList); var rarityDataIndex = Random.Range(1, generatorData.Rarities.Count); savableMissionRequirements.Add(new SavableRequirementData(requirementValue, new List <int> { colorDataListIndex, clothingTypeIndex, rarityDataIndex })); requirementAmountLeft -= requirementValue; } return(savableMissionRequirements); }