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

◆ MapChestName()

static string Terraria.ModLoader.Default.UnloadedChest.MapChestName ( string name,
int i,
int j )
inlinestatic

Definition at line 45 of file UnloadedChest.cs.

46 {
47 int left = i;
48 int top = j;
49 Tile tile = Main.tile[i, j];
50 if (tile.frameX % 36 != 0)
51 {
52 left--;
53 }
54 if (tile.frameY != 0)
55 {
56 top--;
57 }
58 int chest = Chest.FindChest(left, top);
59 if (chest < 0)
60 {
61 return Language.GetTextValue("LegacyChestType.0");
62 }
63 if (Main.chest[chest].name == "")
64 {
65 return name;
66 }
67 return name + ": " + Main.chest[chest].name;
68 }
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12

References Terraria.Main.chest, Terraria.Chest.FindChest(), Terraria.Tile.frameX, Terraria.Tile.frameY, Terraria.Localization.Language.GetTextValue(), and Terraria.Main.tile.

Referenced by Terraria.ModLoader.Default.UnloadedChest.SetStaticDefaults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: