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

◆ TooCloseToImportantLocations()

static bool Terraria.GameContent.Biomes.HiveBiome.TooCloseToImportantLocations ( Point origin)
inlinestaticprivate

Definition at line 295 of file HiveBiome.cs.

296 {
297 int x = origin.X;
298 int y = origin.Y;
299 int num = 150;
300 for (int i = x - num; i < x + num; i += 10)
301 {
302 if (i <= 0 || i > Main.maxTilesX - 1)
303 {
304 continue;
305 }
306 for (int j = y - num; j < y + num; j += 10)
307 {
308 if (j > 0 && j <= Main.maxTilesY - 1)
309 {
310 if (Main.tile[i, j].active() && Main.tile[i, j].type == 226)
311 {
312 return true;
313 }
314 if (Main.tile[i, j].wall == 83 || Main.tile[i, j].wall == 3 || Main.tile[i, j].wall == 87)
315 {
316 return true;
317 }
318 }
319 }
320 }
321 return false;
322 }

References Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Microsoft.Xna.Framework.Point.X, and Microsoft.Xna.Framework.Point.Y.

Referenced by Terraria.GameContent.Biomes.HiveBiome.Place().