#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > a;
vector<int> edge[100005];
int n, q;
int de[100005], fa[100005];
int lowbit(int x) { return x & (-x); }
void updata(int st, int ed, int valu, int id) {
  if (st > ed) return;
  int mx = a[id].size();
  for (int i = ed + 1; i < mx; i += lowbit(i)) a[id][i] -= valu;
  for (int i = st; i < mx; i += lowbit(i)) a[id][i] += valu;
}
long long query(int ind, int id) {
  long long sum = 0;
  int mx = a[id].size();
  for (int i = ind; i > 0; i -= lowbit(i)) sum += a[id][i];
  return sum;
}
void dfs(int now, int from, int dep, int cnt) {
  de[now] = dep;
  fa[now] = cnt;
  a[cnt].push_back(0);
  for (int i = 0; i < edge[now].size(); i++) {
    int v = edge[now][i];
    if (v == from) continue;
    dfs(v, now, dep + 1, cnt);
  }
}
void doit() {
  int x, y;
  for (int i = 1; i <= n; i++) edge[i].clear();
  a.clear();
  memset(de, 0, sizeof(de));
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    edge[x].push_back(y);
    edge[y].push_back(x);
  }
  int tot = edge[1].size();
  a.resize(tot + 5);
  for (int i = 0; i < edge[1].size(); i++) {
    a[i + 1].push_back(0);
    dfs(edge[1][i], 1, 1, i + 1);
  }
  a[0].resize(100005, 0);
  long long root = 0;
  int op;
  while (q--) {
    scanf("%d", &op);
    if (op == 0) {
      int v, x, d;
      scanf("%d%d%d", &v, &x, &d);
      if (v == 1) {
        root += x;
        updata(1, d, x, 0);
        continue;
      }
      int id = fa[v];
      if (d < de[v])
        updata(de[v] - d, de[v] + d, x, id);
      else {
        root += x;
        updata(1, de[v] + d, x, id);
        updata(1, d - de[v], x, 0);
        updata(1, d - de[v], -x, id);
      }
    }
    if (op == 1) {
      int v;
      scanf("%d", &v);
      if (v == 1) {
        printf("%I64d\n", root);
        continue;
      }
      int id = fa[v];
      printf("%I64d\n", query(de[v], id) + query(de[v], 0));
    }
  }
}
int main() {
  while (scanf("%d%d", &n, &q) != EOF) doit();
  return 0;
}
