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

◆ paintCoatWall()

static bool Terraria.WorldGen.paintCoatWall ( int x,
int y,
byte paintCoatId,
bool broadcast = false )
inlinestatic

Definition at line 35328 of file WorldGen.cs.

35329 {
35330 Tile tile = Main.tile[x, y];
35331 if (tile == null || tile.wall == 0)
35332 {
35333 return false;
35334 }
35336 switch (paintCoatId)
35337 {
35338 default:
35339 return false;
35340 case 0:
35341 if (!tile.fullbrightWall() && !tile.invisibleWall())
35342 {
35343 return false;
35344 }
35345 tile.fullbrightWall(fullbrightWall: false);
35346 tile.invisibleWall(invisibleWall: false);
35348 break;
35349 case 1:
35350 if (tile.fullbrightWall())
35351 {
35352 return false;
35353 }
35354 tile.fullbrightWall(fullbrightWall: true);
35355 break;
35356 case 2:
35357 if (tile.invisibleWall())
35358 {
35359 return false;
35360 }
35361 tile.invisibleWall(invisibleWall: true);
35363 break;
35364 }
35365 if (broadcast)
35366 {
35367 NetMessage.SendData(64, -1, -1, null, x, y, (int)paintCoatId, 1f);
35368 }
35370 return true;
35371 }
static void SquareWallFrame(int i, int j, bool resetFrame=true)
static void paintCoatEffect(int x, int y, byte paintCoatId, List< Color > oldColors)
static List< Color > coatingColors(Tile tile, bool block)

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

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