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

◆ PaintThePurityGrass()

static void Terraria.WorldGen.PaintThePurityGrass ( byte tilePaintColor,
byte wallPaintColor )
inlinestaticprivate

Definition at line 17032 of file WorldGen.cs.

17033 {
17034 for (int i = 0; i < Main.maxTilesX; i++)
17035 {
17036 for (int j = 0; j < Main.maxTilesY; j++)
17037 {
17038 Tile tile = Main.tile[i, j];
17039 if (tile.active())
17040 {
17041 if (tile.type == 2)
17042 {
17043 tile.color(tilePaintColor);
17044 }
17045 else if (tile.type == 185 || tile.type == 186 || tile.type == 187)
17046 {
17047 Tile tile2 = tile;
17048 int num = j;
17049 while (num < Main.maxTilesY - 20 && (tile2.type == 185 || tile2.type == 186 || tile2.type == 187 || tile2.type == 3 || tile2.type == 73))
17050 {
17051 tile2 = Main.tile[i, ++num];
17052 }
17053 if (tile2.type == 2)
17054 {
17055 tile.color(tilePaintColor);
17056 }
17057 }
17058 }
17059 if (tile.wall == 66 || tile.wall == 63)
17060 {
17061 tile.wallColor(wallPaintColor);
17062 }
17063 }
17064 }
17065 }

References Terraria.Tile.active(), Terraria.Tile.color(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Tile.type, Terraria.Tile.wall, and Terraria.Tile.wallColor().