#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 1e5 + 10;
long long fen[maxn];
long long gro[maxn];
long long jaye[maxn];
vector<long long> v[maxn];
vector<long long> ans[maxn];
int h[maxn];
long long w;
void add1(int i, int x) {
  if (i != 0) {
    while (i < maxn) {
      fen[i] += x;
      i += i & (-i);
    }
  }
}
void add2(long long o, long long i, long long j, long long x) {
  long long p = j;
  while (p < ans[o].size()) {
    ans[o][p] += x;
    p += p & (-p);
  }
  if (i + 1 != ans[o].size()) {
    long long p = i + 1;
    while (p < ans[o].size()) {
      ans[o][p] += (-x);
      p += p & (-p);
    }
  }
}
int get1(int i) {
  int ret = 0;
  long long p = i;
  while (p) {
    ret += fen[p];
    p -= p & (-p);
  }
  return ret;
}
int get2(int i) {
  int ret = 0;
  long long p = jaye[i];
  if (i != 1) {
    while (p) {
      ret += ans[gro[i]][p];
      p -= p & (-p);
    }
  }
  return ret;
}
long long k = 1;
void dfs(long long n, long long i) {
  for (long long y = 0; y < v[n].size(); y++) {
    if (v[n][y] != i) {
      h[v[n][y]] = h[n] + 1;
      if (i != 0) {
        gro[v[n][y]] = gro[n];
        jaye[v[n][y]] = jaye[n] + 1;
      } else {
        ans[k].push_back(0);
        gro[v[n][y]] = k;
        jaye[v[n][y]] = 1;
        k++;
      }
      ans[gro[v[n][y]]].push_back(0);
      dfs(v[n][y], n);
    }
  }
}
int main() {
  long long n, q;
  cin >> n >> q;
  h[1] = 1;
  for (long long y = 0; y < n - 1; y++) {
    long long i, j;
    cin >> i >> j;
    v[i].push_back(j);
    v[j].push_back(i);
  }
  dfs(1, 0);
  for (long long y = 0; y < q; y++) {
    long long e;
    cin >> e;
    if (e == 1) {
      long long z;
      cin >> z;
      cout << get1(maxn - 1) - get1(h[z] - 1) + get2(z) << endl;
    } else {
      long long v, x, d;
      cin >> v >> x >> d;
      if (v != 1) {
        e = 0;
        long long s = max(d - h[v] + 2, e);
        if (s > 0) add1(s, x);
        long long bala = 0, pain = 0;
        long long qa = ans[gro[v]].size() - 1;
        s--;
        if (s < min(jaye[v] + d, qa)) {
          long long bala = min(jaye[v] + d, qa);
          if (s < h[v]) {
            pain = max(s + 1, jaye[v] - d);
          } else
            pain = s + 1;
          add2(gro[v], bala, pain, x);
        }
      } else {
        add1(1 + d, x);
      }
    }
  }
}
