#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
class tPRO {
 public:
  int which, pos;
  tPRO() {}
} property[MAXN];
int n, q, sumArr, countForOne;
vector<int> E[MAXN];
vector<int> Tree[MAXN];
void prepare() {
  sumArr = 1;
  for (int i = 0; i <= n; i++) Tree[1].push_back(0);
  for (int r = 0; r < E[1].size(); r++) {
    int u = E[1][r];
    sumArr++;
    int pos = 1;
    int pre = 1;
    Tree[sumArr].push_back(0);
    for (;;) {
      Tree[sumArr].push_back(0);
      property[u].which = sumArr;
      property[u].pos = pos;
      int v = -1;
      for (int i = 0; i < E[u].size(); i++) {
        if (E[u][i] != pre) v = E[u][i];
      }
      if (v < 0) break;
      pre = u;
      u = v;
      pos++;
    }
  }
}
int Tree_ask(int which, int p) {
  if (which == 1 && p == 0) return countForOne;
  int ans = 0;
  int max = Tree[which].size() - 1;
  for (; p <= max;) {
    ans += Tree[which][p];
    p += p ^ (p & (p - 1));
  }
  return ans;
}
void Tree_modify(int which, int p, int x) {
  for (; p > 0;) {
    Tree[which][p] += x;
    p -= p ^ (p & (p - 1));
  }
}
void Tree_change(int which, int l, int r, int x) {
  if (which == 1 && l == 0) {
    countForOne += x;
    l++;
  }
  if (l > r) return;
  Tree_modify(which, l - 1, -x);
  Tree_modify(which, r, x);
}
void solve() {
  for (int run = 0; run < q; run++) {
    int id;
    scanf("%d", &id);
    if (id == 1) {
      int u;
      scanf("%d", &u);
      int t1, t2;
      if (u == 1) {
        t1 = Tree_ask(1, 0);
        t2 = 0;
      } else {
        t1 = Tree_ask(property[u].which, property[u].pos);
        t2 = Tree_ask(1, property[u].pos);
      }
      printf("%d\n", t1 + t2);
    } else {
      int u, x, d;
      scanf("%d%d%d", &u, &x, &d);
      if (u == 1) {
        Tree_change(1, 0, d, x);
      } else {
        int which = property[u].which;
        int maxr = Tree[which].size() - 1;
        int r = property[u].pos + d;
        int l = property[u].pos - d;
        if (r > maxr) r = maxr;
        if (l > 0) {
          Tree_change(which, l, r, x);
        } else {
          Tree_change(which, 1, r, x);
          Tree_change(1, 0, -l, x);
          if (-l >= 1) Tree_change(which, 1, min(-l, maxr), -x);
        }
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    E[x].push_back(y);
    E[y].push_back(x);
  }
  prepare();
  solve();
  return 0;
}
