示例#1
0
        public override string ToString()
        {
            var buffer = new StringBuilder($"{string.Join(" ", Phases)}/{string.Join(" ", Seasons.Select(s => s.ToLower()))}"
                                           + $"/{TextureIndex}/{CropID}/{RegrowDays}/{HarvestMethod}/{UseAdditionalParameters.Serialize()}");

            if (UseAdditionalParameters)
            {
                buffer.Append($" {MinHarvest} {MaxHarvest} {MaxHarvestIncreaseForLevel} ");
                buffer.Append(ExtraCropChance == 0 ? "0" : $"{ExtraCropChance:.#####}");
            }
            buffer.Append($"/{IsRaisedSeeds.Serialize()}/{UseRandomColors.Serialize()}");
            if (UseRandomColors)
            {
                buffer.Append(" ").Append(string.Join(" ", Colors.Select(RawColor.FromHex)));
            }

            return(buffer.ToString());
        }