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

◆ CanPoundTile()

static bool Terraria.WorldGen.CanPoundTile ( int x,
int y )
inlinestatic

Definition at line 74419 of file WorldGen.cs.

74420 {
74421 if (Main.tile[x, y] == null)
74422 {
74423 Main.tile[x, y] = default(Tile);
74424 }
74425 if (Main.tile[x, y - 1] == null)
74426 {
74427 Main.tile[x, y - 1] = default(Tile);
74428 }
74429 if (Main.tile[x, y + 1] == null)
74430 {
74431 Main.tile[x, y + 1] = default(Tile);
74432 }
74433 ushort type = Main.tile[x, y].type;
74434 if (!TileLoader.IsClosedDoor(Main.tile[x, y].type))
74435 {
74436 switch (type)
74437 {
74438 case 48:
74439 case 137:
74440 case 138:
74441 case 232:
74442 case 380:
74443 case 387:
74444 case 388:
74445 case 476:
74446 case 484:
74447 case 664:
74448 case 665:
74449 break;
74450 default:
74451 {
74452 if (gen)
74453 {
74454 if (Main.tile[x, y].type == 190)
74455 {
74456 return false;
74457 }
74458 if (Main.tile[x, y].type == 30)
74459 {
74460 return false;
74461 }
74462 }
74463 if (Main.tile[x, y - 1].active())
74464 {
74465 ushort t = Main.tile[x, y - 1].type;
74467 {
74468 goto IL_021b;
74469 }
74470 if ((uint)t <= 237u)
74471 {
74472 if ((uint)t <= 77u)
74473 {
74474 if (t == 21 || t == 26 || t == 77)
74475 {
74476 goto IL_021b;
74477 }
74478 }
74479 else if (t == 88 || t == 235 || t == 237)
74480 {
74481 goto IL_021b;
74482 }
74483 }
74484 else if ((uint)t <= 470u)
74485 {
74486 if (t == 441 || (uint)(t - 467) <= 1u || t == 470)
74487 {
74488 goto IL_021b;
74489 }
74490 }
74491 else if (t == 475 || t == 488 || t == 597)
74492 {
74493 goto IL_021b;
74494 }
74495 }
74496 return CanKillTile(x, y);
74497 }
74498 IL_021b:
74499 return false;
74500 }
74501 }
74502 return false;
74503 }
static bool[] BasicDresser
Definition TileID.cs:294
static bool[] BasicChest
Definition TileID.cs:290
static bool IsClosedDoor(Tile tile)
This serves as the central class from which tile-related functions are supported and carried out.
Definition TileLoader.cs:23
static volatile bool gen
Definition WorldGen.cs:1210
static bool CanKillTile(int i, int j, SpecialKillTileContext context)

References Terraria.ID.TileID.Sets.BasicChest, Terraria.ID.TileID.Sets.BasicDresser, Terraria.ModLoader.TileLoader.IsClosedDoor(), and Terraria.Main.tile.

Referenced by Terraria.Tile.SmoothSlope().

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