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

◆ CheckFoodPlatter()

static void Terraria.WorldGen.CheckFoodPlatter ( int x,
int y,
int type )
inlinestatic

Definition at line 71401 of file WorldGen.cs.

71402 {
71403 if (Main.tile[x, y] == null || destroyObject || SolidTileAllowBottomSlope(x, y + 1))
71404 {
71405 return;
71406 }
71407 if (type == 520)
71408 {
71409 int num = TEFoodPlatter.Find(x, y);
71410 if (num != -1 && ((TEFoodPlatter)TileEntity.ByID[num]).item.stack > 0)
71411 {
71412 ((TEFoodPlatter)TileEntity.ByID[num]).DropItem();
71413 if (Main.netMode != 2)
71414 {
71415 Main.LocalPlayer.InterruptItemUsageIfOverTile(520);
71416 }
71417 }
71418 }
71419 destroyObject = true;
71420 if (Main.tile[x, y].type == type)
71421 {
71422 KillTile(x, y);
71423 }
71424 if (type == 520)
71425 {
71426 TEFoodPlatter.Kill(x, y);
71427 }
71428 destroyObject = false;
71429 }
static Dictionary< int, TileEntity > ByID
Definition TileEntity.cs:18
static bool destroyObject
Definition WorldGen.cs:1020
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static bool SolidTileAllowBottomSlope(int i, int j)

References Terraria.DataStructures.TileEntity.ByID, Terraria.GameContent.Tile_Entities.TEFoodPlatter.Find(), Terraria.GameContent.Tile_Entities.TEFoodPlatter.Kill(), Terraria.Main.LocalPlayer, Terraria.Main.netMode, Terraria.Main.tile, and System.type.