#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
vector<long long> adj[N];
vector<long long> chain[N];
long long c = 0;
long long ans[N];
void dfs(long long cur, long long par) {
  chain[c].push_back(cur);
  for (auto x : adj[cur]) {
    if (x == par) continue;
    dfs(x, cur);
  }
}
vector<vector<long long>> bit(N);
void add(long long index, long long val, long long ch) {
  for (long long i = index; i < (long long)bit[ch].size(); i = i | (i + 1))
    bit[ch][i] += val;
}
long long getSum(long long x, long long ch) {
  long long ans = 0;
  for (long long i = x; i >= 0; i = (i & (i + 1)) - 1) {
    ans += bit[ch][i];
  }
  return ans;
}
long long global[N];
void addG(long long index, long long val, long long n) {
  for (long long i = index; i < n; i = i | (i + 1)) global[i] += val;
}
long long getSumG(long long x) {
  long long ans = 0;
  for (long long i = x; i >= 0; i = (i & (i + 1)) - 1) {
    ans += global[i];
  }
  return ans;
}
int32_t main() {
  long long n, q;
  cin >> n >> q;
  for (long long i = 0; i < n - 1; i++) {
    long long x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (auto x : adj[1]) {
    dfs(x, 1);
    c++;
  }
  map<long long, pair<long long, long long>> m;
  for (long long i = 0; i < c; i++) {
    for (long long j = 0; j < (long long)chain[i].size(); j++)
      m[chain[i][j]] = {i, j};
    bit[i].resize(chain[i].size() + 1);
  }
  while (q--) {
    long long type;
    cin >> type;
    if (type == 0) {
      long long v, x, d;
      cin >> v >> x >> d;
      if (v == 1) {
        ans[1] += x;
        addG(0, x, N);
        addG(d, -x, N);
      } else {
        long long ch = m[v].first;
        long long pos = m[v].second;
        if (d > pos + 1) {
          ans[1] += x;
          long long toAll = d - (pos + 1) - 1;
          addG(0, x, N);
          addG(toAll + 1, -x, N);
          add(toAll + 1, x, ch);
          add(pos + d + 1, -x, ch);
        } else if (d == pos + 1) {
          ans[1] += x;
          add(0, x, ch);
          add(pos + d + 1, -x, ch);
        } else {
          add(pos - d, x, ch);
          add(pos + d + 1, -x, ch);
        }
      }
    } else {
      long long v;
      cin >> v;
      if (v == 1) {
        cout << ans[1] << endl;
      } else {
        long long res = getSum(m[v].second, m[v].first);
        res += getSumG(m[v].second);
        cout << res << endl;
      }
    }
  }
  return 0;
}
