#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = std::numeric_limits<long long>::max();
const long long TE3 = 1005;
const long long TE5 = 100005;
const string YN[2] = {"NO", "YES"};
using namespace std;
long long n, q;
vector<vector<long long> > v;
long long d[TE5], nid[TE5], z[TE5], br[TE5], brm[TE5];
long long b = 0, c = 0;
long long cst[4 * TE5], st[4 * TE5];
void f(long long a[], long long len = n) {
  for (long long i = (0); i < (len); ++i) {
    cout << a[i] << " ";
  }
  cout << endl;
}
void build(long long a[], long long t[], long long v, long long tl,
           long long tr) {
  if (tl == tr) {
    t[v] = a[tl];
  } else {
    long long tm = (tl + tr) / 2;
    build(a, t, v * 2, tl, tm);
    build(a, t, v * 2 + 1, tm + 1, tr);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
long long segsum(long long v, long long t[], long long tl, long long tr,
                 long long l, long long r) {
  if (l > r) return 0;
  if (l == tl && r == tr) {
    return t[v];
  }
  long long tm = (tl + tr) / 2;
  return segsum(v * 2, t, tl, tm, l, min(r, tm)) +
         segsum(v * 2 + 1, t, tm + 1, tr, max(l, tm + 1), r);
}
void update_set(long long v, long long t[], long long tl, long long tr,
                long long pos, long long new_val) {
  if (tl == tr) {
    t[v] = new_val;
  } else {
    long long tm = (tl + tr) / 2;
    if (pos <= tm)
      update_set(v * 2, t, tl, tm, pos, new_val);
    else
      update_set(v * 2 + 1, t, tm + 1, tr, pos, new_val);
    t[v] = t[v * 2] + t[v * 2 + 1];
  }
}
void update(long long v, long long t[], long long tl, long long tr,
            long long pos, long long new_val) {
  long long old_val = segsum(v, t, tl, tr, pos, pos);
  new_val += old_val;
  update_set(v, t, tl, tr, pos, new_val);
}
void dfs(long long x, long long p, long long y) {
  d[x] = y;
  nid[x] = c;
  if (x) {
    br[x] = b;
    brm[b] = max(c, brm[b]);
  }
  ++c;
  for (long long ne : v[x]) {
    if (ne != p) {
      dfs(ne, x, y + 1);
    }
    if (!x) {
      ++b;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> q;
  memset(z, 0, sizeof(z));
  memset(nid, 0, sizeof(nid));
  v.resize(n);
  for (long long i = (1); i < (n); ++i) {
    long long x, y;
    cin >> x >> y;
    --x;
    --y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs(0, -1, 0);
  build(z, st, 1, 0, n);
  build(z, cst, 1, 0, n);
  while (q--) {
    long long o, id, x, de;
    cin >> o >> id;
    --id;
    long long z = d[id];
    if (o == 0) {
      cin >> x >> de;
      long long dfs_id = nid[id];
      long long l = z - de;
      long long mr = min(dfs_id + de, brm[br[id]]);
      if (l <= 0) {
        long long ml = -l;
        update(1, cst, 0, n, 0, x);
        update(1, cst, 0, n, ml + 1, -x);
        if (id) {
          long long f = br[id] ? brm[br[id] - 1] : 0;
          ++f;
          f += ml;
          if (f <= mr) {
            update(1, st, 0, n, f, x);
            update(1, st, 0, n, mr + 1, -x);
          }
        }
      } else {
        update(1, st, 0, n, dfs_id - de, x);
        update(1, st, 0, n, mr + 1, -x);
      }
    } else {
      long long cst_ans = segsum(1, cst, 0, n, 0, z);
      long long st_ans = 0;
      if (id) {
        long long f = br[id] ? brm[br[id] - 1] : 0;
        ++f;
        st_ans = segsum(1, st, 0, n, 0, nid[id]);
      }
      long long ans = cst_ans + st_ans;
      cout << ans << endl;
    }
  }
  return 0;
}
