Advertisement
Guest User

Untitled

a guest
Jul 31st, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.29 KB | None | 0 0
  1. --- Precept.cs.sav  2021-07-30 19:48:41.986043198 +0200
  2. +++ Precept.cs  2021-07-31 12:05:32.456693086 +0200
  3. @@ -157,7 +157,7 @@ namespace RimWorld
  4.                     tmpCompsDesc.AppendInNewLine("  - " + prohibitionText);
  5.                 }
  6.             }
  7. -           bool flag2 = true;
  8. +           List<string> addLines = new List<string>();
  9.             for (int j = 0; j < def.comps.Count; j++)
  10.             {
  11.                 PreceptComp_SelfTookMemoryThought preceptComp_SelfTookMemoryThought;
  12. @@ -185,17 +185,21 @@ namespace RimWorld
  13.                     }
  14.                     preceptComp = preceptComp_BedThought;
  15.                 }
  16. -               if (flag2)
  17. -               {
  18. -                   flag2 = false;
  19. -                   tmpCompsDesc.AppendLine();
  20. -                   tmpCompsDesc.AppendInNewLine(ColorizeDescTitle("Mood".Translate() + ":"));
  21. -               }
  22.                 foreach (string description in preceptComp.GetDescriptions())
  23.                 {
  24. -                   tmpCompsDesc.AppendInNewLine("  - " + description);
  25. +                   string addLine = "  - " + description;
  26. +                   if(!addLines.Contains(addLine))
  27. +                       addLines.Add(addLine);
  28.                 }
  29.             }
  30. +           if(addLines.Count != 0)
  31. +           {
  32. +               tmpCompsDesc.AppendLine();
  33. +               tmpCompsDesc.AppendInNewLine(ColorizeDescTitle("Mood".Translate() + ":"));
  34. +               foreach (string addLine in addLines)
  35. +                   tmpCompsDesc.AppendInNewLine(addLine);
  36. +               addLines.Clear();
  37. +           }
  38.             bool flag3 = true;
  39.             for (int k = 0; k < def.comps.Count; k++)
  40.             {
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement