#include <bits/stdc++.h>
using namespace std;
template <class T, class T2>
inline bool chkmax(T &x, const T2 &y) {
  return x < y ? x = y, 1 : 0;
}
template <class T, class T2>
inline bool chkmin(T &x, const T2 &y) {
  return x > y ? x = y, 1 : 0;
}
const long long mod = 1e9 + 7;
template <class T>
inline void fix(T &x) {
  if (x >= mod | x <= -mod) {
    x %= mod;
  }
  if (x < 0) {
    x += mod;
  }
}
const long long MAX_N = 1e5 + 10;
const long long SQRT = 310;
struct SegTree {
  struct Node {
    long long val, lazy;
    Node() { val = lazy = 0; }
  };
  Node tree[4 * MAX_N];
  void push(long long curr, long long l, long long r) {
    tree[curr].val += (r - l + 1ll) * tree[curr].lazy;
    if (l != r) {
      tree[curr * 2].lazy += tree[curr].lazy;
      tree[curr * 2 + 1].lazy += tree[curr].lazy;
    }
    tree[curr].lazy = 0;
  }
  void upd(long long curr, long long l, long long r, long long ql, long long qr,
           long long val) {
    push(curr, l, r);
    if (ql <= l && r <= qr) {
      tree[curr].lazy += val;
      push(curr, l, r);
      return;
    } else if (l > qr || r < ql) {
      return;
    }
    long long m = (l + r) / 2ll;
    upd(curr * 2, l, m, ql, qr, val);
    upd(curr * 2 + 1, m + 1, r, ql, qr, val);
    tree[curr].val = tree[curr * 2].val + tree[curr * 2 + 1].val;
  }
  long long ans(long long curr, long long l, long long r, long long ql,
                long long qr) {
    push(curr, l, r);
    if (ql <= l && r <= qr) {
      return tree[curr].val;
    } else if (l > qr || r < ql) {
      return 0;
    }
    long long m = (l + r) / 2ll;
    return ans(curr * 2, l, m, ql, qr) + ans(curr * 2 + 1, m + 1, r, ql, qr);
  }
};
SegTree chain, octo;
vector<long long> g[MAX_N];
long long st[MAX_N], fin[MAX_N], d[MAX_N];
long long cnt = 0;
void dfs(long long x, long long p, long long ch) {
  st[x] = ch;
  d[x] = d[p] + 1;
  fin[x] = d[x];
  cnt++;
  for (auto it : g[x]) {
    if (it == p) {
      continue;
    }
    dfs(it, x, ch);
    fin[x] = fin[it];
  }
}
long long ans1 = 0;
long long n, q;
void upd(long long x, long long dist, long long val) {
  if (x == 1) {
    octo.upd(1, 0, n - 1, 0, dist - 1, val);
    ans1 += val;
    return;
  }
  long long lft = max(0ll, d[x] - dist), rght = min(fin[x], d[x] + dist);
  chain.upd(1, 0, n - 1, st[x] + lft, st[x] + rght, val);
  if (d[x] - dist < 0) {
    ans1 += val;
  }
  if (d[x] - dist + 1 < 0) {
    long long fake = d[x] - dist + 1;
    fake *= -1;
    octo.upd(1, 0, n - 1, 0, fake - 1, val);
    fake = min(fake - 1, fin[x]);
    chain.upd(1, 0, n - 1, st[x], st[x] + fake, -val);
  }
}
long long ans(long long x) {
  if (x == 1) {
    return ans1;
  }
  return chain.ans(1, 0, n - 1, st[x] + d[x], st[x] + d[x]) +
         octo.ans(1, 0, n - 1, d[x], d[x]);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> q;
  for (long long i = 0; i < n - 1; i++) {
    long long a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  d[1] = -1;
  for (auto it : g[1]) {
    dfs(it, 1, cnt);
  }
  for (long long i = 0; i < q; i++) {
    long long t;
    cin >> t;
    if (t == 0) {
      long long a, b, c;
      cin >> a >> b >> c;
      upd(a, c, b);
    } else {
      long long a;
      cin >> a;
      cout << ans(a) << "\n";
    }
  }
  return 0;
}
