#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10, maxT = 1e5 + 10, Msk = (1 << 17), inf = 1e9 + 10,
          MOD = 1e9 + 7, Sq = 708;
const long long INF = 1e18 + 10;
vector<int> g[maxn];
int fen[maxn], h[maxn], p[maxn];
map<int, int> fn[maxn];
void dfs(int v, int par, int num, int dis) {
  h[v] = dis;
  p[v] = num;
  for (int u : g[v])
    if (u != par) dfs(u, v, num, dis + 1);
}
void add(int ind, int x) {
  for (; ind < maxn; ind += ind & -ind) fen[ind] += x;
}
void ad(int q, int ind, int x) {
  for (; ind < maxn; ind += ind & -ind) fn[q][ind] += x;
}
int query_1(int ind) {
  int ret = 0;
  for (; ind; ind -= ind & -ind) ret += fen[ind];
  return ret;
}
int query_2(int q, int ind) {
  int ret = 0;
  for (; ind; ind -= ind & -ind) ret += fn[q][ind];
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, q;
  h[1] = 1;
  cin >> n >> q;
  for (int i = 1, x, y; i < n; i++) {
    cin >> x >> y;
    g[x].push_back(y), g[y].push_back(x);
  }
  for (int i = 0; i < g[1].size(); i++) dfs(g[1][i], 1, i + 1, 2);
  for (int i = 0, type, v, x, d; i < q; i++) {
    cin >> type >> v;
    if (!type) {
      cin >> x >> d;
      if (v == 0) {
        add(1, x);
        add(d + 2, -x);
      } else {
        if (h[v] - d <= 1) {
          add(1, x);
          add(3 + d - h[v], -x);
          ad(p[v], 3 + d - h[v], x);
          ad(p[v], h[v] + d + 1, -x);
        } else {
          ad(p[v], h[v] - d, x);
          ad(p[v], h[v] + d + 1, -x);
        }
      }
    } else
      cout << query_1(h[v]) + query_2(p[v], h[v]) << endl;
  }
  return 0;
}
