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

◆ PaintTheSand()

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

Definition at line 16994 of file WorldGen.cs.

16995 {
16996 for (int i = 20; i < Main.maxTilesX - 20; i++)
16997 {
16998 for (int j = 20; j < Main.maxTilesY - 20; j++)
16999 {
17000 Tile tile = Main.tile[i, j];
17001 if (tile.active() && (tile.type == 53 || tile.type == 396 || tile.type == 397))
17002 {
17003 tile.color(tilePaintColor);
17004 if ((double)j > Main.worldSurface)
17005 {
17006 if (Main.tile[i, j - 1].type == 165 || Main.tile[i, j - 1].type == 185 || Main.tile[i, j - 1].type == 186 || Main.tile[i, j - 1].type == 187)
17007 {
17008 Main.tile[i, j - 1].color(tilePaintColor);
17009 }
17010 if (Main.tile[i, j - 2].type == 165 || Main.tile[i, j - 2].type == 185 || Main.tile[i, j - 2].type == 186 || Main.tile[i, j - 2].type == 187)
17011 {
17012 Main.tile[i, j - 2].color(tilePaintColor);
17013 }
17014 if (Main.tile[i, j + 1].type == 165)
17015 {
17016 Main.tile[i, j + 1].color(tilePaintColor);
17017 }
17018 if (Main.tile[i, j + 2].type == 165)
17019 {
17020 Main.tile[i, j + 2].color(tilePaintColor);
17021 }
17022 }
17023 }
17024 if (tile.wall == 187 || tile.wall == 216)
17025 {
17026 tile.wallColor(tilePaintColor);
17027 }
17028 }
17029 }
17030 }

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