#include <bits/stdc++.h>
using namespace std;
inline int readint() {
  int a = 0;
  char c = getchar(), f = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -f;
  for (; '0' <= c && c <= '9'; c = getchar())
    a = (a << 3) + (a << 1) + (c ^ 48);
  return a * f;
}
inline void writeint(int x) {
  if (x > 9) writeint(x / 10);
  putchar((x % 10) ^ 48);
}
const int MaxN = 100005, infty = (1 << 30) - 1;
vector<int> g[MaxN], vis[MaxN];
int bel[MaxN], c[MaxN], dep[MaxN], n;
void build(int x, int fa) {
  vis[bel[x]].push_back(x);
  dep[x] = dep[fa] + 1;
  for (int i = 0, len = g[x].size(); i < len; ++i)
    if (g[x][i] != fa) {
      bel[g[x][i]] = bel[x];
      build(g[x][i], x);
    }
}
void add(int x, int v) {
  vector<int> &r = vis[bel[x]];
  int len = r.size();
  for (int i = dep[x]; i < len; i += (i & -i)) c[r[i]] += v;
}
int Sum(int x) {
  vector<int> &r = vis[bel[x]];
  int res = 0;
  for (int i = dep[x]; i; i -= (i & -i)) res += c[r[i]];
  return res;
}
int BIT[MaxN];
void modify(int d, int v) {
  for (int i = d; i <= n; i += (i & -i)) BIT[i] += v;
}
int query(int d) {
  int res = 0;
  for (int i = d; i; i -= (i & -i)) res += BIT[i];
  return res;
}
int main() {
  n = readint();
  int q = readint();
  for (int i = 1, a, b; i < n; ++i) {
    a = readint(), b = readint();
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 0, len = g[1].size(); i < len; ++i) {
    bel[g[1][i]] = g[1][i];
    vis[g[1][i]].push_back(1);
    build(g[1][i], 1);
  }
  while (q--) {
    int opt = readint();
    if (opt == 0) {
      int x = readint(), v = readint();
      int d = readint();
      unsigned t;
      if (dep[x] <= d) {
        t = d - dep[x] + 1, modify(t, -v);
        BIT[0] += v;
        if (x == 0) continue;
        if (t < vis[bel[x]].size()) add(vis[bel[x]][t], v);
      } else
        add(vis[bel[x]][dep[x] - d], v);
      t = dep[x] + d + 1;
      if (t < vis[bel[x]].size()) add(vis[bel[x]][t], -v);
    }
    if (opt == 1) {
      int x = readint();
      int res = query(dep[x]) + BIT[0];
      printf("%d\n", res + Sum(x));
    }
  }
  return 0;
}
