Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PrettyPrintProfiles()

static void Terraria.GameInput.PlayerInput.PrettyPrintProfiles ( ref string text)
inlinestatic

Definition at line 1765 of file PlayerInput.cs.

1766 {
1767 string[] array = text.Split(new string[1] { "\r\n" }, StringSplitOptions.None);
1768 foreach (string text2 in array)
1769 {
1770 if (text2.Contains(": {"))
1771 {
1772 string text3 = text2.Substring(0, text2.IndexOf('"'));
1773 string text4 = text2 + "\r\n ";
1774 string newValue = text4.Replace(": {\r\n ", ": \r\n" + text3 + "{\r\n ");
1775 text = text.Replace(text4, newValue);
1776 }
1777 }
1778 text = text.Replace("[\r\n ", "[");
1779 text = text.Replace("[\r\n ", "[");
1780 text = text.Replace("\"\r\n ", "\"");
1781 text = text.Replace("\",\r\n ", "\", ");
1782 text = text.Replace("\",\r\n ", "\", ");
1783 text = text.Replace("\r\n ]", "]");
1784 }
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References System.array, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), and System.text.

Referenced by Terraria.GameContent.UI.States.UICharacterCreation.Click_CopyPlayerTemplate(), and Terraria.GameInput.PlayerInput.Initialize().