Terraria ModLoader  0.10.1.5
A framework for Terraria mods
Terraria.ModLoader.MapLegend Class Reference
+ Collaboration diagram for Terraria.ModLoader.MapLegend:

Public Member Functions

 MapLegend (int size)
 
string FromTile (MapTile mapTile, int x, int y)
 
LocalizedText FromType (int type)
 

Properties

int Length [get]
 
LocalizedText this[int i] [get, set]
 

Private Attributes

LocalizedText[] legend
 

Detailed Description

Definition at line 8 of file MapLegend.cs.

Constructor & Destructor Documentation

Terraria.ModLoader.MapLegend.MapLegend ( int  size)

Definition at line 13 of file MapLegend.cs.

13  {
14  legend = new LocalizedText[size];
15  }
LocalizedText[] legend
Definition: MapLegend.cs:11

Member Function Documentation

string Terraria.ModLoader.MapLegend.FromTile ( MapTile  mapTile,
int  x,
int  y 
)

Definition at line 45 of file MapLegend.cs.

45  {
46  string name = legend[mapTile.Type].Value;
47  if (MapLoader.nameFuncs.ContainsKey(mapTile.Type)) {
48  name = MapLoader.nameFuncs[mapTile.Type](name, x, y);
49  }
50  return name;
51  }
LocalizedText[] legend
Definition: MapLegend.cs:11
LocalizedText Terraria.ModLoader.MapLegend.FromType ( int  type)

Definition at line 40 of file MapLegend.cs.

40  {
41  return this[MapHelper.TileToLookup(type, 0)];
42  }

Member Data Documentation

LocalizedText [] Terraria.ModLoader.MapLegend.legend
private

Definition at line 11 of file MapLegend.cs.

Property Documentation

int Terraria.ModLoader.MapLegend.Length
get

Definition at line 17 of file MapLegend.cs.

LocalizedText Terraria.ModLoader.MapLegend.this[int i]
getset

Definition at line 27 of file MapLegend.cs.