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

◆ GetTextForWorld()

string Terraria.Social.Steam.WorkshopSocialModule.GetTextForWorld ( WorldFileData world)
inlineprivate

Definition at line 109 of file WorkshopSocialModule.cs.

110 {
111 string text = "This is \"";
112 text += world.Name;
113 string text2 = "";
114 text2 = world.WorldSizeX switch
115 {
116 4200 => "small",
117 6400 => "medium",
118 8400 => "large",
119 _ => "custom",
120 };
121 string text3 = "";
122 text3 = world.GameMode switch
123 {
124 3 => "journey",
125 0 => "classic",
126 1 => "expert",
127 2 => "master",
128 _ => "custom",
129 };
130 text = text + "\", a " + text2.ToLower() + " " + text3.ToLower() + " world";
131 text = text + " infected by the " + (world.HasCorruption ? "corruption" : "crimson");
132 if (world.IsHardMode)
133 {
134 text += ", in hardmode";
135 }
136 return text + ".";
137 }

References Terraria.IO.WorldFileData.IsHardMode, and Terraria.IO.FileData.Name.

Referenced by Terraria.Social.Steam.WorkshopSocialModule.PublishWorld().