#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
vector<int> adj[maxn];
int fen[2][maxn];
int deg[maxn], bod[maxn], dod[maxn], lst[maxn];
int get(int idx, int* fen) {
  int sum = 0;
  while (idx > 0) {
    sum += fen[idx];
    idx -= (idx & -idx);
  }
  return sum;
}
void add(int idx, int val, int* fen) {
  if (!idx) return;
  while (idx < maxn) {
    fen[idx] += val;
    idx += (idx & -idx);
  }
}
int dfs(int v, int p = -1) {
  lst[v] = dod[v] + 1;
  for (int u : adj[v]) {
    if (u == p) continue;
    bod[u] = bod[v] + 1;
    dod[u] = lst[v];
    lst[v] = dfs(u, v);
  }
  return lst[v]--;
}
int main() {
  int n, q;
  cin >> n >> q;
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
    deg[u]++;
    deg[v]++;
  }
  int src = 0;
  for (int i = 1; i < n; ++i)
    if (deg[i] > deg[src]) src = i;
  bod[src] = dod[src] = 1;
  dfs(src, -1);
  for (int i = 0; i < q; ++i) {
    int type;
    cin >> type;
    if (!type) {
      int v, x, d;
      cin >> v >> x >> d;
      v--;
      if (bod[v] - 1 > d) {
        add(dod[v] - d, x, fen[0]);
        add(min(dod[v] + d, lst[v]) + 1, -x, fen[0]);
      } else {
        add(d - bod[v] + 3, -x, fen[1]);
        add(1, x, fen[1]);
        if (v != src) {
          add(min(lst[v] + 1, dod[v] - 2 * bod[v] + d + 3), x, fen[0]);
          add(min(dod[v] + d, lst[v]) + 1, -x, fen[0]);
        }
      }
    } else {
      int v;
      cin >> v;
      v--;
      cout << get(dod[v], fen[0]) + get(bod[v], fen[1]) << "\n";
    }
  }
  return 0;
}
