#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 23;
int n, q, par[MAXN], h[MAXN];
vector<int> g[MAXN];
struct sig {
  int *z, maxx;
  inline void init(int x) { z = new int[(x + 3) << 2]{}, maxx = x + 2; }
  void upd(int l, int r, int val, int v = 1, int st = 0, int ed = -1) {
    if (ed == -1) ed = maxx;
    if (l >= ed || st >= r) return;
    if (l <= st && ed <= r) return z[v] += val, void(0);
    int mid = (st + ed) >> 1;
    upd(l, r, val, v << 1, st, mid), upd(l, r, val, (v << 1) | 1, mid, ed);
  }
  inline int get(int p, int v = 1, int st = 0, int ed = -1) {
    if (ed == -1) ed = maxx;
    if (ed - st == 1) return z[v];
    int mid = (st + ed) >> 1;
    if (p < mid)
      return z[v] + get(p, v << 1, st, mid);
    else
      return z[v] + get(p, (v << 1) | 1, mid, ed);
  }
} seg, f[MAXN];
void dfs(int v, int p = -1) {
  if (~p)
    par[v] = (~par[p] ? par[p] : v);
  else
    par[v] = -1;
  for (auto u : g[v])
    if (u != p) h[u] = h[v] + 1, dfs(u, v);
  if (g[v].size() == 1 && ~p) f[par[v]].init(h[v] + 1);
}
inline void upd(int v, int x, int d) {
  seg.upd(0, d + 1 - h[v], x);
  if (v != 0)
    f[par[v]].upd(max(d - h[v], (h[v] - d) - 1),
                  min(h[v] + d, f[par[v]].maxx - 1), x);
}
inline int get(int v) {
  if (v == 0) return seg.get(0);
  return f[par[v]].get(h[v] - 1) + seg.get(h[v]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  cin >> n >> q;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    g[--u].push_back(--v), g[v].push_back(u);
  }
  dfs(0);
  seg.init(MAXN);
  while (q--) {
    int t;
    cin >> t;
    if (t == 0) {
      int v, x, d;
      cin >> v >> x >> d;
      upd(--v, x, d);
    } else {
      int v;
      cin >> v;
      cout << get(--v) << '\n';
    }
  }
  return 0;
}
