Ejemplo n.º 1
0
        public static bool IsBreakable(int clickX, int clickY)
        {
            int x      = clickX;
            int index1 = clickY;

            if ((int)Main.tile[x, index1].frameX % 36 != 0)
            {
                --x;
            }
            int y      = index1 - (int)Main.tile[x, index1].frameY / 18;
            int index2 = TEDisplayDoll.Find(x, y);

            return(index2 == -1 || !(TileEntity.ByID[index2] as TEDisplayDoll).ContainsItems());
        }
Ejemplo n.º 2
0
        public static void OnPlayerInteraction(Player player, int clickX, int clickY)
        {
            int x     = clickX;
            int index = clickY;

            if ((int)Main.tile[x, index].frameX % 36 != 0)
            {
                --x;
            }
            int y1 = index - (int)Main.tile[x, index].frameY / 18;
            int id = TEDisplayDoll.Find(x, y1);

            if (id == -1)
            {
                return;
            }
            int y2 = y1 + 1;

            TEDisplayDoll.accessoryTargetSlot = 3;
            TileEntity.BasicOpenCloseInteraction(player, x, y2, id);
        }