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

◆ paintWall()

static bool Terraria.WorldGen.paintWall ( int x,
int y,
byte color,
bool broadCast = false )
inlinestatic

Definition at line 35373 of file WorldGen.cs.

35374 {
35375 Tile tile = Main.tile[x, y];
35376 if (tile == null || tile.wall == 0)
35377 {
35378 return false;
35379 }
35380 byte b = tile.wallColor();
35381 if (b == color)
35382 {
35383 return false;
35384 }
35385 tile.wallColor(color);
35386 if (broadCast)
35387 {
35388 NetMessage.SendData(64, -1, -1, null, x, y, (int)color);
35389 }
35390 paintEffect(x, y, color, b);
35391 return true;
35392 }
static void paintEffect(int x, int y, byte color, byte oldColor)

References Terraria.NetMessage.SendData(), Terraria.Main.tile, Terraria.Tile.wall, and Terraria.Tile.wallColor().

Referenced by Terraria.Player.ApplyPaint(), Terraria.MessageBuffer.GetData(), and Terraria.Player.PlaceThing_PaintScrapper_TryScrapping().