#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int MAXN = 100000 + 10;
int N, M, u, v, w, cmd, root;
int from[MAXN << 1], nxt[MAXN << 1], to[MAXN << 1], edge_siz;
int st[MAXN], ed[MAXN], pos[MAXN], siz[MAXN], dep[MAXN], dfs_clock;
bool vis[MAXN];
struct BIT {
  int sumv[MAXN];
  void Init() { memset(sumv, 0, sizeof sumv); }
  int lowbit(int x) { return x & -x; }
  void Update(int x, int v) {
    for (; x > 0; x -= lowbit(x)) sumv[x] += v;
  }
  int Sum(int x) {
    if (x <= 0) return 0;
    int ans = 0;
    for (; x <= N; x += lowbit(x)) ans += sumv[x];
    return ans;
  }
} bit1, bit2;
void BFS(int o) {
  vector<pair<int, int> > Q;
  int front = 0;
  Q.push_back(pair<int, int>(o, 0));
  vis[o] = true;
  while (front != Q.size()) {
    pair<int, int> now = Q[front++];
    for (int u = from[now.first]; u; u = nxt[u]) {
      int v = to[u];
      if (vis[v]) continue;
      vis[v] = true;
      Q.push_back(pair<int, int>(v, now.second + 1));
    }
  }
  int cnt = 0, depth;
  vector<pair<int, int> >::iterator it = Q.begin();
  for (; it != Q.end();) {
    depth = it->second;
    for (; it != Q.end() && it->second == depth; ++it) {
      pos[it->first] = ++cnt;
      dep[it->first] = depth;
    }
    ed[depth] = cnt;
  }
  while (depth <= N) ed[depth++] = cnt;
}
void DFS(int o, int f) {
  st[o] = ++dfs_clock;
  siz[o] = 1;
  for (int u = from[o]; u; u = nxt[u]) {
    int v = to[u];
    if (v == f) continue;
    DFS(v, o);
    siz[o] += siz[v];
  }
}
void AddEdge(int u, int v) {
  to[++edge_siz] = u;
  nxt[edge_siz] = from[v];
  from[v] = edge_siz;
}
void work() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i < N; ++i) {
    scanf("%d%d", &u, &v);
    AddEdge(u, v);
    AddEdge(v, u);
  }
  BFS(1);
  DFS(1, -1);
  bit1.Init();
  bit2.Init();
  while (M--) {
    scanf("%d", &cmd);
    if (cmd == 0) {
      scanf("%d%d%d", &u, &v, &w);
      int d = w - dep[u];
      int lft, rht;
      if (d >= 0) {
        bit2.Update(ed[d], v);
        lft = st[u] - dep[u] + d;
        rht = st[u] + min(siz[u] - 1, w);
      } else
        lft = st[u] - w - 1;
      rht = st[u] + min(siz[u] - 1, w);
      if (lft > rht) continue;
      bit1.Update(lft, -v);
      bit1.Update(rht, v);
    } else {
      scanf("%d", &u);
      int ans = bit1.Sum(st[u]);
      ans += bit2.Sum(pos[u]);
      printf("%d\n", ans);
    }
  }
}
int main() {
  work();
  return 0;
}
