#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
vector<vector<long long> > line;
vector<int> adj[maxn];
int dis[maxn], fa[maxn], n, q;
int lowbit(int x) { return x & (-x); }
void update(int st, int ed, int val, int id) {
  if (st > ed) return;
  int mx = (int)line[id].size();
  for (int i = ed + 1; i < mx; i += lowbit(i)) line[id][i] -= val;
  for (int i = st; i < mx; i += lowbit(i)) line[id][i] += val;
}
long long query(int pos, int id) {
  long long sum = 0;
  int mx = (int)line[id].size();
  for (int i = pos; i > 0; i -= lowbit(i)) sum += line[id][i];
  return sum;
}
void dfs(int u, int pre, int cnt, int id) {
  dis[u] = cnt;
  fa[u] = id;
  line[id].push_back(0);
  for (int i = 0; i < (int)adj[u].size(); i++) {
    int v = adj[u][i];
    if (v == pre) continue;
    dfs(v, u, cnt + 1, id);
  }
}
void solve() {
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  int tot = (int)adj[1].size();
  line.resize(tot + 10);
  for (int i = 0; i < (int)adj[1].size(); i++) {
    line[i + 1].push_back(0);
    dfs(adj[1][i], 1, 1, i + 1);
  }
  line[0].resize(maxn, 0);
  long long sum_root = 0;
  while (q--) {
    int op;
    scanf("%d", &op);
    if (op == 0) {
      int v, x, d;
      scanf("%d%d%d", &v, &x, &d);
      if (v == 1) {
        sum_root += x;
        update(1, d, x, 0);
      } else {
        int id = fa[v];
        if (d < dis[v])
          update(dis[v] - d, dis[v] + d, x, id);
        else {
          sum_root += x;
          update(1, dis[v] + d, x, id);
          update(1, d - dis[v], x, 0);
          update(1, d - dis[v], -x, id);
        }
      }
    } else {
      int v;
      scanf("%d", &v);
      if (v == 1)
        cout << sum_root << endl;
      else {
        int id = fa[v];
        long long ans = query(dis[v], id) + query(dis[v], 0);
        cout << ans << endl;
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &q);
  solve();
  return 0;
}
