#include <bits/stdc++.h>
using namespace std;
long long int pw(long long int a, long long int b, long long int mod) {
  if (!b) return 1;
  if (b & 1) return a * pw(a * a % mod, b / 2, mod) % mod;
  return pw(a * a % mod, b / 2, mod) % mod;
}
const long long int MAXN = 1e5 + 10;
const long long int INF = 8e18;
const long long int MOD = 1e9 + 7;
int fen[2][MAXN];
void update(int g, int ind, int val) {
  ind++;
  for (; ind < MAXN; ind += ind & (-ind)) {
    fen[g][ind] += val;
  }
}
void update(int g, int l, int r, int val) {
  update(g, l, val);
  update(g, r, -val);
}
int get(int g, int ind) {
  int res = 0;
  ind++;
  for (; ind > 0; ind -= ind & (-ind)) res += fen[g][ind];
  return res;
}
int n, q;
int L[MAXN], R[MAXN], start[MAXN], seq[MAXN], timer;
int h[MAXN], ind[MAXN], finish[MAXN];
vector<int> adj[MAXN], dist[MAXN];
void DFS(int u, int p = -1, int s = -1) {
  start[u] = timer++;
  if (p != -1) {
    seq[u] = s;
    L[s] = min(L[s], start[u]);
    R[s] = max(R[s], start[u]);
  }
  dist[h[u]].push_back(u);
  int cnt = 0;
  for (int v : adj[u]) {
    if (v == p) continue;
    h[v] = h[u] + 1;
    if (p == -1)
      DFS(v, u, ++cnt);
    else
      DFS(v, u, s);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  fill(L, L + MAXN, INF);
  cin >> n >> q;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  DFS(1);
  timer = 0;
  for (int i = 0; i < MAXN; i++) {
    for (int j : dist[i]) {
      ind[j] = timer++;
    }
    finish[i] = timer;
  }
  while (q--) {
    int type, v, d, val;
    cin >> type >> v;
    if (type == 1) {
      int ans = get(0, start[v]) + get(1, ind[v]);
      cout << ans << '\n';
    } else {
      cin >> val >> d;
      if (v == 1) {
        update(1, 0, finish[d], val);
        continue;
      }
      int l = max(L[seq[v]], start[v] - d), r = min(R[seq[v]], start[v] + d),
          w = -1;
      if (start[v] - d < l) {
        w = l - start[v] + d - 1;
        l = min(l + w, r + 1);
      }
      update(0, l, r + 1, val);
      if (w != -1) update(1, 0, finish[w], val);
    }
  }
  return 0;
}
