tModLoader v2024.03
A mod to make and play Terraria mods
Lang Class Reference

Static Public Member Functions

static string AnglerQuestChat (bool turnIn=false)
 
static string AnglerQuestCountChat (NPC npc)
 
static string BartenderChat (NPC npc)
 
static string BartenderHelpText (NPC npc)
 
static string BestiaryGirlChat (NPC npc)
 
static void BuildMapAtlas ()
 
static string BunnyChat (NPC npc)
 
static string CatChat (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 LanguageSearchFilter CreateDialogFilter (string startsWith)
 Filters LocalizedText objects by checking if their key starts with the provided startsWith parameter.

When passed into Language.FindAll(LanguageSearchFilter), all LocalizedText with keys starting with startsWith will be returned. When passed into Language.SelectRandom(LanguageSearchFilter, UnifiedRandom), a single random LocalizedText with key starting with startsWith will be returned.

More...
 
static LanguageSearchFilter CreateDialogFilter (string startsWith, object substitutions)
 Filters LocalizedText objects by checking if their key starts with the provided startsWith parameter and if the conditions embedded into the LocalizedText are all satisfied by the data in substitutions . See LocalizedText.CanFormatWith(object) for more information about conditions embedded in localization text.

When passed into Language.FindAll(LanguageSearchFilter), all LocalizedText with keys starting with startsWith that satisfy substitutions will be returned. When passed into Language.SelectRandom(LanguageSearchFilter, UnifiedRandom), a single random LocalizedText with key starting with startsWith that satisfies substitutions will be returned.

More...
 
static object CreateDialogSubstitutionObject (NPC npc=null)
 
static string dialog (int l, bool english=false)
 
static string DogChat (NPC npc)
 
static string DyeTraderQuestChat (bool gotDye=false)
 
static string GetBuffDescription (int id)
 Gets the description of the provided buff type (BuffID) as a string.
 
static string GetBuffName (int id)
 Gets the display name of the provided buff type (BuffID) as a string.
 
static string GetDryadWorldStatusDialog (out bool worldIsEntirelyPure)
 
static LocalizedText GetEmojiName (int id)
 
static NetworkText GetInvasionWaveText (int wave, params short[] npcIds)
 
static LocalizedText GetItemName (int id)
 Gets the display name of the provided item type (Item.type) as a LocalizedText.
 
static string GetItemNameValue (int id)
 Gets the display name of the provided item type (Item.type) as a string.
 
static string GetMapObjectName (int id)
 
static string GetNPCHouseBannerText (NPC npc, int bannerStyle)
 
static LocalizedText GetNPCName (int netID)
 Gets the display name of the provided npc type (NPC.type) as a LocalizedText.
 
static string GetNPCNameValue (int netID)
 Gets the display name of the provided npc type (NPC.type) as a string.
 
static LocalizedText GetProjectileName (int type)
 Gets the display name of the provided projectile type (Projectile.type) as a LocalizedText.
 
static string GetRandomGameTitle ()
 
static ItemTooltip GetTooltip (int itemId)
 
static string GolferChat (NPC npc)
 
static void InitializeLegacyLocalization ()
 
static string LocalizedDuration (TimeSpan time, bool abbreviated, bool showAllAvailableUnits)
 
static string PrincessChat (NPC npc)
 
static string SlimeChat (NPC npc)
 
static string SupportGlyphs (string tooltip)
 

Static Public Attributes

static MapLegend _mapLegendCache
 
static LocalizedText[] chestType = new LocalizedText[52]
 
static LocalizedText[] chestType2 = new LocalizedText[17]
 
static LocalizedText[] dresserType = new LocalizedText[43]
 
static LocalizedText[] gen = new LocalizedText[92]
 
static LocalizedText[] inter = new LocalizedText[129]
 
static LocalizedText[] menu = new LocalizedText[254]
 
static LocalizedText[] misc = new LocalizedText[201]
 
static LocalizedText[] mp = new LocalizedText[27]
 
static LocalizedText[] prefix = new LocalizedText[PrefixID.Count]
 
static LocalizedText[] tip = new LocalizedText[61]
 

Member Function Documentation

◆ CreateDialogFilter() [1/2]

static LanguageSearchFilter Lang.CreateDialogFilter ( string  startsWith)
static

Filters LocalizedText objects by checking if their key starts with the provided startsWith parameter.

When passed into Language.FindAll(LanguageSearchFilter), all LocalizedText with keys starting with startsWith will be returned. When passed into Language.SelectRandom(LanguageSearchFilter, UnifiedRandom), a single random LocalizedText with key starting with startsWith will be returned.

Parameters
startsWith
Returns

◆ CreateDialogFilter() [2/2]

static LanguageSearchFilter Lang.CreateDialogFilter ( string  startsWith,
object  substitutions 
)
static

Filters LocalizedText objects by checking if their key starts with the provided startsWith parameter and if the conditions embedded into the LocalizedText are all satisfied by the data in substitutions . See LocalizedText.CanFormatWith(object) for more information about conditions embedded in localization text.

When passed into Language.FindAll(LanguageSearchFilter), all LocalizedText with keys starting with startsWith that satisfy substitutions will be returned. When passed into Language.SelectRandom(LanguageSearchFilter, UnifiedRandom), a single random LocalizedText with key starting with startsWith that satisfies substitutions will be returned.

Parameters
startsWith
substitutions
Returns