tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.Chest Class Reference

Public Member Functions

 Chest (bool bank=false)
 
int AddItemToShop (Item newItem)
 
object Clone ()
 
void SetupShop (int type)
 
override string ToString ()
 

Static Public Member Functions

static int AfterPlacement_Hook (int x, int y, int type=21, int style=0, int direction=1, int alternate=0)
 
static bool CanDestroyChest (int X, int Y)
 
static int CreateChest (int X, int Y, int id=-1)
 
static bool DestroyChest (int X, int Y)
 
static void DestroyChestDirect (int X, int Y, int id)
 
static int FindChest (int X, int Y)
 
static int FindChestByGuessing (int X, int Y)
 
static int FindEmptyChest (int x, int y, int type=21, int style=0, int direction=1, int alternate=0)
 
static List< int > GetCurrentlyOpenChests ()
 
static void Initialize ()
 
static bool IsLocked (int x, int y)
 
static bool IsLocked (int x, int y, Tile t)
 
static bool NearOtherChests (int x, int y)
 
static Item PutItemInNearbyChest (Item item, Vector2 position)
 
static void ServerPlaceItem (int plr, int slot)
 
static void SetupTravelShop ()
 
static bool Unlock (int X, int Y)
 
static void UpdateChestFrames ()
 
static int UsingChest (int i)
 

Public Attributes

bool bankChest
 
int frame
 
int frameCounter
 
Item[] item
 
string name
 
int x
 
int y
 

Static Public Attributes

static int[] chestItemSpawn = new int[52]
 
static int[] chestItemSpawn2 = new int[14]
 
const float chestStackRange = 250f
 
static int[] chestTypeToIcon = new int[52]
 
static int[] chestTypeToIcon2 = new int[14]
 
static int[] dresserItemSpawn = new int[40]
 
static int[] dresserTypeToIcon = new int[40]
 
const int maxChestTypes = 52
 
const int maxChestTypes2 = 14
 
const int maxDresserTypes = 40
 
const int maxItems = 40
 
const int MaxNameLength = 20