Exemplo n.º 1
0
		public bool EqualsWithoutLight(ref MapTile other)
		{
			if (this.Type != other.Type)
			{
				return false;
			}
			return this.Color == other.Color;
		}
Exemplo n.º 2
0
		public bool Equals(ref MapTile other)
		{
			if (this.Light != other.Light || this.Type != other.Type)
			{
				return false;
			}
			return this.Color == other.Color;
		}
Exemplo n.º 3
0
		//in Terraria.Main.DrawMap replace text = Lang.mapLegend[type]; with
		//  text = Lang.mapLegend.FromTile(Main.Map[num91, num92], num91, num92);
		public string FromTile(MapTile mapTile, int x, int y)
		{
			string name = legend[mapTile.Type];
			if (MapLoader.nameFuncs.ContainsKey(mapTile.Type))
			{
				name = MapLoader.nameFuncs[mapTile.Type](name, x, y);
			}
			return name;
		}
Exemplo n.º 4
0
 //in Terraria.Main.DrawMap replace text = Lang.mapLegend[type]; with
 //  text = Lang.mapLegend[Main.Map[num91, num92]];
 public string this[MapTile mapTile]
 {
     get
     {
     Tile tile = Main.tile[mapTile.x, mapTile.y];
     if(tile.type >= TileID.Count)
     {
         return TileLoader.GetTile(tile.type).MapName(tile.frameX, tile.frameY);
     }
     return legend[mapTile.Type];
     }
 }
Exemplo n.º 5
0
 //in Terraria.Main.DrawMap replace text = Lang.mapLegend[type]; with
 //  text = Lang.mapLegend[Main.Map[num91, num92]];
 public string this[MapTile mapTile]
 {
     get
     {
         Tile tile = Main.tile[mapTile.x, mapTile.y];
         if (tile.active())
         {
             if (tile.type >= TileID.Count)
             {
                 return TileLoader.GetTile(tile.type).MapName(tile.frameX, tile.frameY);
             }
         }
         else if (tile.wall >= WallID.Count)
         {
             return WallLoader.GetWall(tile.wall).mapName;
         }
         return legend[mapTile.Type];
     }
 }
		public static Color GetMapTileXnaColor(ref MapTile tile)
		{
			Color result = MapHelper.colorLookup[(int)tile.Type];
			byte color = tile.Color;
			if (color > 0)
			{
				MapHelper.MapColor(tile.Type, ref result, color);
			}
			if (tile.Light == 255)
			{
				return result;
			}
			float num = (float)tile.Light / 255f;
			result.R = (byte)((float)result.R * num);
			result.G = (byte)((float)result.G * num);
			result.B = (byte)((float)result.B * num);
			return result;
		}
Exemplo n.º 7
0
 public void SetTile(int x, int y, ref MapTile tile)
 {
     this._tiles[x, y] = tile;
 }
Exemplo n.º 8
0
 public void SetTile(int x, int y, MapTile tile)
 {
     _tiles[x, y] = tile;
 }
		public void SetTile(int x, int y, ref MapTile tile)
		{
			this._tiles[x, y] = tile;
		}
Exemplo n.º 10
0
 public static Color GetMapTileXnaColor(ref MapTile tile)
 {
     Color r = MapHelper.colorLookup[tile.Type];
     byte color = tile.Color;
     if (color > 0)
     {
         MapHelper.MapColor(tile.Type, ref r, color);
     }
     if (tile.Light == 255)
     {
         return r;
     }
     float light = (float)tile.Light / 255f;
     r.R = (byte)((float)r.R * light);
     r.G = (byte)((float)r.G * light);
     r.B = (byte)((float)r.B * light);
     return r;
 }
		public bool EqualsWithoutLight(ref MapTile other)
		{
			return this.Type == other.Type && this.Color == other.Color;
		}
		public bool Equals(ref MapTile other)
		{
			return this.Light == other.Light && this.Type == other.Type && this.Color == other.Color;
		}
Exemplo n.º 13
0
 // Token: 0x06000A2C RID: 2604 RVA: 0x003BE7CA File Offset: 0x003BC9CA
 public bool EqualsWithoutLight(ref MapTile other)
 {
     return(this.Type == other.Type && this.Color == other.Color);
 }
Exemplo n.º 14
0
 // Token: 0x06000A2B RID: 2603 RVA: 0x003BE79C File Offset: 0x003BC99C
 public bool Equals(ref MapTile other)
 {
     return(this.Light == other.Light && this.Type == other.Type && this.Color == other.Color);
 }