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

◆ ReplaceWall()

static bool Terraria.WorldGen.ReplaceWall ( int x,
int y,
ushort targetWall )
inlinestatic

Definition at line 56770 of file WorldGen.cs.

56771 {
56773 {
56774 return false;
56775 }
56776 Tile tile = Main.tile[x, y];
56777 if (tile.wall == 0 || targetWall == 0)
56778 {
56779 return false;
56780 }
56781 if (KillWall_CheckFailure(fail: false, tile))
56782 {
56783 return false;
56784 }
56785 int num = 10;
56786 for (int i = 0; i < num; i++)
56787 {
56788 KillWall_MakeWallDust(x, y, tile);
56789 }
56790 KillWall_PlaySounds(x, y, tile);
56791 KillWall_DropItems(x, y, tile);
56792 tile.wall = targetWall;
56793 tile.ClearWallPaintAndCoating();
56794 SquareWallFrame(x, y);
56795 return true;
56796 }
This serves as the central class from which wall-related functions are supported and carried out.
Definition WallLoader.cs:17
static void SquareWallFrame(int i, int j, bool resetFrame=true)
static bool KillWall_CheckFailure(bool fail, Tile tileCache)
static void KillWall_DropItems(int i, int j, Tile tileCache)
static void KillWall_MakeWallDust(int i, int j, Tile tileCache)
static void KillWall_PlaySounds(int i, int j, Tile tileCache, bool fail=false)

References Terraria.Tile.ClearWallPaintAndCoating(), Terraria.Main.tile, Terraria.Tile.wall, and Terraria.ModLoader.WallLoader.WallCount.

Referenced by Terraria.MessageBuffer.GetData(), and Terraria.Player.PlaceThing_TryReplacingWalls().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: