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

◆ SpawnTileOrAboveHasAnyWallInSet()

static bool Terraria.NPC.SpawnTileOrAboveHasAnyWallInSet ( int x,
int y,
bool[] wallTypes )
inlinestatic

Definition at line 85988 of file NPC.cs.

85989 {
85990 if (!WorldGen.InWorld(x, y, 2))
85991 {
85992 return false;
85993 }
85994 Tile tile = Main.tile[x, y];
85995 Tile tile2 = Main.tile[x, y - 1];
85996 if (tile == null || tile2 == null)
85997 {
85998 return false;
85999 }
86000 if (tile.wall < 0 || !wallTypes[tile.wall])
86001 {
86002 if (tile2.wall >= 0)
86003 {
86004 return wallTypes[tile2.wall];
86005 }
86006 return false;
86007 }
86008 return true;
86009 }

References Terraria.WorldGen.InWorld(), Terraria.Main.tile, and Terraria.Tile.wall.

+ Here is the call graph for this function: