18 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
21 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
24 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
27 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
30 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
33 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
36 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
39 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
42 [Old(
"Lang arrays have been replaced with the new Language.GetText system.")]
112 Homeless = (npc?.homeless ??
false),
137 [Old(
"dialog is deprecated. Please use Language.GetText instead.")]
138 public static string dialog(
int l,
bool english =
false)
203 worldIsEntirelyPure =
false;
207 if (tGood > 0 && tEvil > 0 && tBlood > 0)
211 else if (tGood > 0 && tEvil > 0)
215 else if (tGood > 0 && tBlood > 0)
219 else if (tEvil > 0 && tBlood > 0)
236 worldIsEntirelyPure =
true;
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}";
271 item.SetDefaults(3817);
273 item.position = player.
Center;
288 Main.BartenderHelpTextIndex = 0;
298 string key = (DD2Event.DownedInvasionT3 ?
"BartenderSpecialText.AfterDD2Tier3" : (DD2Event.DownedInvasionT2 ?
"BartenderSpecialText.AfterDD2Tier2" : ((!
DD2Event.
DownedInvasionT1) ?
"BartenderSpecialText.BeforeDD2Tier1" :
"BartenderSpecialText.AfterDD2Tier1")));
313 string startsWith =
"BestiaryGirlChatter.";
316 startsWith =
"BestiaryGirlLycantropeChatter.";
348 string text =
"Blue";
381 if (bannerStyle == 1)
424 for (
int i = 0; i < nameCache.Length; i++)
429 where f.FieldType == typeof(IdType)
430 select f).ToList().ForEach(delegate(
FieldInfo field)
433 if (num >= 0 && num < nameCache.Length)
437 else if (field.
Name ==
"None")
446 FillNameCacheArray<PrefixID, int>(
"Prefix",
prefix);
447 for (
int i = 0; i <
gen.Length; i++)
451 for (
int j = 0; j <
menu.Length; j++)
455 for (
int k = 0; k <
inter.Length; k++)
459 for (
int l = 0; l <
misc.Length; l++)
463 for (
int m = 0; m <
mp.Length; m++)
467 for (
int n = 0; n <
tip.Length; n++)
471 for (
int num = 0; num <
chestType.Length; num++)
475 for (
int num2 = 0; num2 <
chestType2.Length; num2++)
479 for (
int num3 = 0; num3 <
dresserType.Length; num3++)
488 FillNameCacheArray<EmoteID, int>(
"EmojiName",
_emojiNameCache, leaveMissingEntriesBlank:
true);
489 for (
int num4 = -65; num4 < 0; num4++)
511 where f.FieldType == typeof(
short)
512 select f).ToList().ForEach(delegate(
FieldInfo field)
524 if (tooltip.Contains(
"<right>"))
531 if (inputMode ==
InputMode.XBoxGamepadUI)
536 tooltip = tooltip.Replace(
"<right>",
text);
543 if (tooltip.Contains(
"<left>"))
550 if (inputMode2 ==
InputMode.XBoxGamepadUI)
554 text2 = text2.Replace(
": ",
"");
555 tooltip = tooltip.Replace(
"<left>", text2);
625 for (
int k = 0; k < 9; k++)
1009 networkText2 =
Main.
npc[npc].GetGivenOrTypeNetName();
1011 if (plr >= 0 && plr < 255)
1015 if (plrItemType >= 0)
1020 bool flag2 = plr >= 0 && plr < 255;
1027 result =
NetworkText.
FromKey(
"DeathSource.Player", empty, networkText3, flag ? networkText : networkText4);
1115 for (
int i = 0; i < npcIds.Length; i++)
1131 string key =
"Game.InvasionWave_Type" + npcIds.Length;
1132 object[] substitutions =
array;
1142 int num = time.
Days;
1148 if (!showAllAvailableUnits)
1156 int num2 = time.
Hours;
1162 if (!showAllAvailableUnits)
1176 if (!showAllAvailableUnits)
1182 return text + time.Seconds + (abbreviated ? (
" " +
Language.
GetTextValue(
"Misc.ShortSeconds")) : ((time.Seconds == 1) ?
" second" :
" seconds"));
static long ToInt64(object? value)
object? GetValue(object? obj)
static bool DownedInvasionT1
static readonly int Count
static readonly int Count
static readonly short Count
static short FromNetId(short id)
static readonly IdDictionary Search
static int FromNetId(int id)
static readonly short Count
static readonly int Count
static readonly short Count
static bool[] IsATreeTrunk
static int NewItem(IEntitySource source, Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
static object CreateDialogSubstitutionObject(NPC npc=null)
static string GetNPCHouseBannerText(NPC npc, int bannerStyle)
static LocalizedText[] inter
static LocalizedText[] gen
static LocalizedText GetItemName(int id)
static LocalizedText[] dresserType
static string GetNPCNameValue(int netID)
static string BunnyChat(NPC npc)
static LocalizedText[] menu
static LocalizedText[] _emojiNameCache
static string AnglerQuestCountChat(NPC npc)
static string GetMapObjectName(int id)
static string dialog(int l, bool english=false)
static LocalizedText[] chestType2
static string BestiaryGirlChat(NPC npc)
static NetworkText CreateDeathMessage(string deadPlayerName, int plr=-1, int npc=-1, int proj=-1, int other=-1, int projType=0, int plrItemType=0)
static string PrincessChat(NPC npc)
static string DyeTraderQuestChat(bool gotDye=false)
static void InitializeLegacyLocalization()
static string GolferChat(NPC npc)
static void FillNameCacheArray< IdClass, IdType >(string category, LocalizedText[] nameCache, bool leaveMissingEntriesBlank=false)
static LocalizedText GetProjectileName(int type)
static LocalizedText[] chestType
static LocalizedText[] misc
static string GetBuffName(int id)
static LocalizedText[] prefix
static LocalizedText[] _mapLegendCache
static LocalizedText[] mp
static string GetItemNameValue(int id)
static string AnglerQuestChat(bool turnIn=false)
static string GetRandomGameTitle()
static LocalizedText[] _itemNameCache
static LocalizedText[] _projectileNameCache
static string LocalizedDuration(TimeSpan time, bool abbreviated, bool showAllAvailableUnits)
static string SlimeChat(NPC npc)
static string CatChat(NPC npc)
static string DogChat(NPC npc)
static ItemTooltip GetTooltip(int itemId)
static string BartenderHelpText(NPC npc)
static LocalizedText[] _negativeNpcNameCache
static string GetDryadWorldStatusDialog(out bool worldIsEntirelyPure)
static LocalizedText GetEmojiName(int id)
static string GetBuffDescription(int id)
static ItemTooltip[] _itemTooltipCache
static void BuildMapAtlas()
static LocalizedText[] tip
static string BartenderChat(NPC npc)
static LanguageSearchFilter CreateDialogFilter(string startsWith)
static LanguageSearchFilter CreateDialogFilter(string startsWith, object substitutions)
static LocalizedText[] _npcNameCache
static string SupportGlyphs(string tooltip)
static LocalizedText[] _buffDescriptionCache
static LocalizedText[] _buffNameCache
static LocalizedText GetNPCName(int netID)
static NetworkText GetInvasionWaveText(int wave, params short[] npcIds)
static GameCulture FromCultureName(CultureName name)
static LocalizedText[] FindAll(Regex regex)
static LocalizedText RandomFromCategory(string categoryName, UnifiedRandom random=null)
static LocalizedText SelectRandom(LanguageSearchFilter filter, UnifiedRandom random=null)
static LocalizedText GetText(string key)
static bool Exists(string key)
static string GetTextValue(string key)
static string GetTextValueWith(string key, object obj)
static readonly LocalizedText Empty
static readonly NetworkText Empty
static NetworkText FromLiteral(string text)
static NetworkText FromKey(string key, params object[] substitutions)
static bool anglerQuestFinished
static UnifiedRandom rand
static int BartenderHelpTextIndex
static Player LocalPlayer
static int[] anglerQuestItemNetIDs
static int TileToLookup(int tileType, int option)
bool ShouldBestiaryGirlBeLycantrope()
static bool downedFishron
static bool downedHalloweenKing
static bool downedMoonlord
static string GetFirstNPCNameOrNull(int npcType)
static bool downedGolemBoss
static bool downedMartians
static bool downedChristmasIceQueen
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
Item GetItem(int plr, Item newItem, GetItemSettings settings)
delegate bool LanguageSearchFilter(string key, LocalizedText text)
static TimeSpan FromDays(double value)
static TimeSpan FromHours(double value)
static TimeSpan FromMinutes(double value)
static GetItemSettings NPCEntityToPlayerInventorySettings