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

◆ Framing_CheckTile()

static void Terraria.GameContent.Tile_Entities.TETeleportationPylon.Framing_CheckTile ( int callX,
int callY )
inlinestatic

Definition at line 89 of file TETeleportationPylon.cs.

90 {
91 if (WorldGen.destroyObject)
92 {
93 return;
94 }
95 int num = callX;
96 int num2 = callY;
97 Tile tileSafely = Framing.GetTileSafely(callX, callY);
98 num -= tileSafely.frameX / 18 % 3;
99 num2 -= tileSafely.frameY / 18 % 4;
101 bool flag = false;
102 for (int i = num; i < num + 3; i++)
103 {
104 for (int j = num2; j < num2 + 4; j++)
105 {
106 Tile tile = Main.tile[i, j];
107 if (!tile.active() || tile.type != 597)
108 {
109 flag = true;
110 }
111 }
112 }
113 if (!WorldGen.SolidTileAllowBottomSlope(num, num2 + 4) || !WorldGen.SolidTileAllowBottomSlope(num + 1, num2 + 4) || !WorldGen.SolidTileAllowBottomSlope(num + 2, num2 + 4))
114 {
115 flag = true;
116 }
117 if (!flag)
118 {
119 return;
120 }
121 Kill(num, num2);
123 if (TileLoader.Drop(callX, callY, 470))
124 {
125 Item.NewItem(new EntitySource_TileBreak(num, num2), num * 16, num2 * 16, 48, 64, pylonItemTypeFromTileStyle);
126 }
127 WorldGen.destroyObject = true;
128 for (int k = num; k < num + 3; k++)
129 {
130 for (int l = num2; l < num2 + 4; l++)
131 {
132 if (Main.tile[k, l].active() && Main.tile[k, l].type == 597)
133 {
134 WorldGen.KillTile(k, l);
135 }
136 }
137 }
138 WorldGen.destroyObject = false;
139 }
static bool Drop(int i, int j, int type, bool includeLargeObjectDrops=true)
This serves as the central class from which tile-related functions are supported and carried out.
Definition TileLoader.cs:23

References Terraria.Tile.active(), Terraria.WorldGen.destroyObject, Terraria.ModLoader.TileLoader.Drop(), Terraria.GameContent.Tile_Entities.TETeleportationPylon.GetPylonItemTypeFromTileStyle(), Terraria.GameContent.Tile_Entities.TETeleportationPylon.GetPylonStyleFromTile(), Terraria.Framing.GetTileSafely(), Terraria.GameContent.Tile_Entities.TETeleportationPylon.Kill(), Terraria.WorldGen.KillTile(), Terraria.Item.NewItem(), Terraria.WorldGen.SolidTileAllowBottomSlope(), Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.WorldGen.TileFrame().

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