#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline string get() {
  char ch[1000010];
  scanf("%s", ch);
  return ch;
}
const int MAX_LG = 21;
const long long maxn = 1e5 + 10;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long INF = 1e9 + 100;
vector<long long> g[maxn];
long long h[maxn];
vector<long long> fen;
vector<long long> fen2[maxn];
long long sz[maxn];
long long id[maxn];
inline void dfs(long long v, long long pr = -1) {
  sz[v] = 1;
  if (v != 1) id[v] = (pr == 1 ? v : id[pr]);
  for (auto u : g[v]) {
    if (u == pr) continue;
    h[u] = h[v] + 1;
    dfs(u, v);
    sz[v] += sz[u];
  }
}
inline void add(vector<long long> *f, long long value, long long p) {
  long long sz = (*f).size();
  for (; p < sz; p += p & -p) (*f)[p] += value;
}
inline long long get(vector<long long> *f, long long p) {
  if (p <= 0) return 0;
  long long ret = 0;
  for (; p; p -= p & -p) ret += (*f)[p];
  return ret;
}
long long res;
int32_t main() {
  fen.resize(maxn);
  long long n = in(), q = in();
  for (long long i = 0; i < n - 1; i++) {
    long long v = in(), u = in();
    g[v].push_back(u);
    g[u].push_back(v);
  }
  dfs(1);
  for (auto u : g[1]) fen2[u].resize(sz[u] + 5);
  for (long long i = 0; i < q; i++) {
    long long tp = in();
    if (tp == 0) {
      long long node = in(), value = in(), di = in();
      if (di >= h[node]) res += value;
      if (di > h[node]) {
        long long di2 = di - h[node];
        add(&fen, value, di2);
        if (node == 1) continue;
        long long di3 = min(h[node] + di, sz[id[node]]);
        if (di3 > di2) {
          add(&fen2[id[node]], value, di3);
          add(&fen2[id[node]], -value, di2);
        }
      } else {
        long long di2 = min(h[node] + di, sz[id[node]]);
        long long di3 = h[node] - di - 1;
        add(&fen2[id[node]], value, di2);
        if (di3 > 0) add(&fen2[id[node]], -value, di3);
      }
    } else {
      long long node = in();
      if (node == 1) {
        cout << res << "\n";
        continue;
      }
      cout << get(&fen, maxn - 1) - get(&fen, h[node] - 1) +
                  get(&fen2[id[node]], (long long)fen2[id[node]].size() - 1) -
                  get(&fen2[id[node]], h[node] - 1)
           << "\n";
    }
  }
}
