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

◆ Framing_CheckTile()

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

Definition at line 190 of file TEDisplayDoll.cs.

191 {
192 if (WorldGen.destroyObject)
193 {
194 return;
195 }
196 int num = callX;
197 int num2 = callY;
198 Tile tileSafely = Framing.GetTileSafely(callX, callY);
199 num -= tileSafely.frameX / 18 % 2;
200 num2 -= tileSafely.frameY / 18 % 3;
201 bool flag = false;
202 for (int i = num; i < num + 2; i++)
203 {
204 for (int j = num2; j < num2 + 3; j++)
205 {
206 Tile tile = Main.tile[i, j];
207 if (!tile.active() || tile.type != 470)
208 {
209 flag = true;
210 }
211 }
212 }
213 if (!WorldGen.SolidTileAllowBottomSlope(num, num2 + 3) || !WorldGen.SolidTileAllowBottomSlope(num + 1, num2 + 3))
214 {
215 flag = true;
216 }
217 if (!flag)
218 {
219 return;
220 }
221 Kill(num, num2);
222 if (TileLoader.Drop(callX, callY, 470))
223 {
224 if (Main.tile[callX, callY].frameX / 72 != 1)
225 {
226 Item.NewItem(new EntitySource_TileBreak(num, num2), num * 16, num2 * 16, 32, 48, 498);
227 }
228 else
229 {
230 Item.NewItem(new EntitySource_TileBreak(num, num2), num * 16, num2 * 16, 32, 48, 1989);
231 }
232 }
233 WorldGen.destroyObject = true;
234 for (int k = num; k < num + 2; k++)
235 {
236 for (int l = num2; l < num2 + 3; l++)
237 {
238 if (Main.tile[k, l].active() && Main.tile[k, l].type == 470)
239 {
240 WorldGen.KillTile(k, l);
241 }
242 }
243 }
244 WorldGen.destroyObject = false;
245 }
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.Framing.GetTileSafely(), Terraria.GameContent.Tile_Entities.TEDisplayDoll.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: