#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int n, q, c, p[N], d[N], sz[N];
vector<int> v[N];
vector<int> seg[N], fen[N];
int fen1[N], sum[N], sum1;
int ans1;
void dfs(int x, int par, int h) {
  if (x != 0) {
    d[x] = h;
    p[x] = c;
    sz[p[x]] = h + 1;
  }
  int l = v[x].size();
  for (int i = 0; i < l; i++)
    if (v[x][i] != par) {
      dfs(v[x][i], x, h + 1);
      if (x == 0) c++;
    }
}
void update(int c, int v, int l, int r, int s, int e, int val) {
  if (e <= l || s >= r) return;
  if (s <= l && e >= r) {
    seg[c][v] += val;
    return;
  }
  int mid = (l + r) / 2;
  update(c, 2 * v, l, mid, s, e, val);
  update(c, 2 * v + 1, mid, r, s, e, val);
}
int get(int c, int v, int l, int r, int x) {
  if (x < l || x >= r) return 0;
  if (r - l < 2) return seg[c][v];
  int mid = (l + r) / 2;
  return get(c, 2 * v, l, mid, x) + get(c, 2 * v + 1, mid, r, x) + seg[c][v];
}
void add(int c, int p, int val) {
  for (p++; p < sz[c]; p += p & (-p)) fen[c][p] += val;
}
int get(int c, int p) {
  int ans = 0;
  for (; p > 0; p -= p & (-p)) ans += fen[c][p];
  return ans;
}
void add1(int p, int val) {
  for (p++; p < N; p += p & (-p)) fen1[p] += val;
}
int get1(int p) {
  int ans = 0;
  for (; p > 0; p -= p & (-p)) ans += fen1[p];
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> q;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs(0, -1, -1);
  for (int i = 0; i < n; i++) {
    seg[i].resize(4 * sz[i]);
    fen[i].resize(sz[i] + 1);
  }
  for (int i = 0; i < q; i++) {
    int c;
    cin >> c;
    if (!c) {
      int v, x, h;
      cin >> v >> x >> h;
      v--;
      if (v == 0) {
        ans1 += x;
        add1(h - 1, x);
        sum1 += x;
        continue;
      }
      update(p[v], 1, 0, sz[p[v]], max(d[v] - h, 0),
             min(d[v] + h + 1, sz[p[v]]), x);
      if (h > d[v] + 1) {
        add(p[v], h - d[v] - 2, x);
        sum[p[v]] += x;
        add1(h - d[v] - 2, x);
        sum1 += x;
      }
      if (h > d[v]) ans1 += x;
    } else {
      int x;
      cin >> x;
      x--;
      if (x == 0) {
        cout << ans1 << "\n";
      } else
        cout << get(p[x], 1, 0, sz[p[x]], d[x]) + (sum1 - get1(d[x])) -
                    (sum[p[x]] - get(p[x], d[x]))
             << "\n";
    }
  }
  return 0;
}
