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

◆ ApplyPaint()

void Terraria.Player.ApplyPaint ( int x,
int y,
bool paintingAWall,
bool applyItemAnimation,
Item targetItem )
inlineprivate

Definition at line 39646 of file Player.cs.

39647 {
39648 byte paint = targetItem.paint;
39649 if (paintingAWall)
39650 {
39651 if (Main.tile[x, y].wallColor() != paint && WorldGen.paintWall(x, y, paint, broadCast: true))
39652 {
39653 targetItem.stack--;
39654 if (targetItem.stack <= 0)
39655 {
39656 targetItem.SetDefaults();
39657 }
39659 {
39661 }
39662 }
39663 }
39664 else if (Main.tile[x, y].color() != paint && WorldGen.paintTile(x, y, paint, broadCast: true))
39665 {
39666 targetItem.stack--;
39667 if (targetItem.stack <= 0)
39668 {
39669 targetItem.SetDefaults();
39670 }
39672 {
39674 }
39675 }
39676 }
void ApplyItemTime(Item sItem)
Definition Player.cs:3752
float wallSpeed
Definition Player.cs:2051
float tileSpeed
Definition Player.cs:2053
Item[] inventory
Definition Player.cs:1257

References Terraria.WorldGen.paintTile(), Terraria.WorldGen.paintWall(), and Terraria.Main.tile.