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

◆ GetDryadWorldStatusDialog()

static string Terraria.Lang.GetDryadWorldStatusDialog ( out bool worldIsEntirelyPure)
inlinestatic

Definition at line 200 of file Lang.cs.

201 {
202 string text = "";
203 worldIsEntirelyPure = false;
204 int tGood = WorldGen.tGood;
205 int tEvil = WorldGen.tEvil;
206 int tBlood = WorldGen.tBlood;
207 if (tGood > 0 && tEvil > 0 && tBlood > 0)
208 {
209 text = Language.GetTextValue("DryadSpecialText.WorldStatusAll", Main.worldName, tGood, tEvil, tBlood);
210 }
211 else if (tGood > 0 && tEvil > 0)
212 {
213 text = Language.GetTextValue("DryadSpecialText.WorldStatusHallowCorrupt", Main.worldName, tGood, tEvil);
214 }
215 else if (tGood > 0 && tBlood > 0)
216 {
217 text = Language.GetTextValue("DryadSpecialText.WorldStatusHallowCrimson", Main.worldName, tGood, tBlood);
218 }
219 else if (tEvil > 0 && tBlood > 0)
220 {
221 text = Language.GetTextValue("DryadSpecialText.WorldStatusCorruptCrimson", Main.worldName, tEvil, tBlood);
222 }
223 else if (tEvil > 0)
224 {
225 text = Language.GetTextValue("DryadSpecialText.WorldStatusCorrupt", Main.worldName, tEvil);
226 }
227 else if (tBlood > 0)
228 {
229 text = Language.GetTextValue("DryadSpecialText.WorldStatusCrimson", Main.worldName, tBlood);
230 }
231 else
232 {
233 if (tGood <= 0)
234 {
235 text = Language.GetTextValue("DryadSpecialText.WorldStatusPure", Main.worldName);
236 worldIsEntirelyPure = true;
237 return text;
238 }
239 text = Language.GetTextValue("DryadSpecialText.WorldStatusHallow", Main.worldName, tGood);
240 }
241 string arg = (((double)tGood * 1.2 >= (double)(tEvil + tBlood) && (double)tGood * 0.8 <= (double)(tEvil + tBlood)) ? Language.GetTextValue("DryadSpecialText.WorldDescriptionBalanced") : ((tGood >= tEvil + tBlood) ? Language.GetTextValue("DryadSpecialText.WorldDescriptionFairyTale") : ((tEvil + tBlood > tGood + 20) ? Language.GetTextValue("DryadSpecialText.WorldDescriptionGrim") : ((tEvil + tBlood <= 5) ? Language.GetTextValue("DryadSpecialText.WorldDescriptionClose") : Language.GetTextValue("DryadSpecialText.WorldDescriptionWork")))));
242 return $"{text} {arg}";
243 }
static string GetTextValue(string key)
Definition Language.cs:15

References Terraria.Localization.Language.GetTextValue(), Terraria.WorldGen.tBlood, Terraria.WorldGen.tEvil, System.text, Terraria.WorldGen.tGood, and Terraria.Main.worldName.

Referenced by Terraria.Main.GUIChatDrawInner().