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

◆ CheckTileAnchors()

static bool Terraria.WorldGen.CheckTileAnchors ( int sx,
int sy,
int w,
int h,
int mode,
AnchorType anchor )
inlinestatic

Definition at line 43350 of file WorldGen.cs.

43351 {
43352 if ((mode & 1) == 1)
43353 {
43354 for (int i = sy; i < sy + h; i++)
43355 {
43356 if (!AnchorValid(Framing.GetTileSafely(sx - 1, i), anchor))
43357 {
43358 return false;
43359 }
43360 if (!AnchorValid(Framing.GetTileSafely(sx + w, i), anchor))
43361 {
43362 return false;
43363 }
43364 }
43365 }
43366 if ((mode & 2) == 2)
43367 {
43368 for (int j = sx; j < sx + w; j++)
43369 {
43370 if (!AnchorValid(Framing.GetTileSafely(j, sy - 1), anchor))
43371 {
43372 return false;
43373 }
43374 if (!AnchorValid(Framing.GetTileSafely(j, sy + h), anchor))
43375 {
43376 return false;
43377 }
43378 }
43379 }
43380 return true;
43381 }
static bool AnchorValid(Tile tileCache, AnchorType anchor)

References Terraria.Framing.GetTileSafely().