InfinitySamurai

Stardew Valley crop growth

Mar 9th, 2016
1,292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. Crop crop = new Crop(index, tileX, tileY);
  2.       if (this.fertilizer == 465 || this.fertilizer == 466 || who.professions.Contains(5))
  3.       {
  4.         int num1 = 0;
  5.         for (int index1 = 0; index1 < crop.phaseDays.Count - 1; ++index1)
  6.           num1 += crop.phaseDays[index1];
  7.         float num2 = this.fertilizer == 465 ? 0.1f : 0.25f;
  8.         if (who.professions.Contains(5))
  9.           num2 += 0.1f;
  10.         int num3 = (int) Math.Ceiling((double) num1 * (double) num2);
  11.         for (int index1 = 0; index1 < crop.phaseDays.Count; ++index1)
  12.         {
  13.           if (index1 > 0 || crop.phaseDays[index1] > 1)
  14.           {
  15.             List<int> list;
  16.             int index2;
  17.             (list = crop.phaseDays)[index2 = index1] = list[index2] - 1;
  18.             --num3;
  19.           }
  20.           if (num3 <= 0)
  21.             break;
  22.         }
Advertisement
Add Comment
Please, Sign In to add comment