#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void checkMin(T& a, T b) {
  if (a > b) a = b;
}
template <typename T>
inline void checkMax(T& a, T b) {
  if (a < b) a = b;
}
const int MAXN = 100100;
inline int lowbit(int x) { return x & -x; }
vector<int> edge[MAXN];
vector<int> bits[MAXN];
int n, q;
int bit[MAXN], idx[MAXN], dep[MAXN];
inline void add(int bit[], int i, int d) {
  while (i) {
    bit[i] += d;
    i -= lowbit(i);
  }
}
inline int query(int bit[], int i) {
  int ret = 0;
  while (i <= n) {
    ret += bit[i];
    i += lowbit(i);
  }
  return ret;
}
inline void add(vector<int>& bit, int i, int d) {
  while (i) {
    bit[i] += d;
    i -= lowbit(i);
  }
}
inline int query(vector<int>& bit, int i) {
  int ret = 0;
  while (i <= (int)bit.size() - 1) {
    ret += bit[i];
    i += lowbit(i);
  }
  return ret;
}
inline void add(vector<int>& bit, int i, int j, int d) {
  if (i <= j) {
    add(bit, j, d);
    if (1 < i) {
      add(bit, i - 1, -d);
    }
  }
}
void dfs(int u, int fa, int id, int d) {
  idx[u] = id;
  dep[u] = d;
  bits[id].push_back(0);
  for (__typeof((edge[u]).begin()) i = (edge[u]).begin(); i != (edge[u]).end();
       ++i) {
    int v = *i;
    if (v != fa) {
      dfs(v, u, id, d + 1);
    }
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n >> q;
  for (int i = 0; i < int(n - 1); ++i) {
    int u, v;
    cin >> u >> v;
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  for (int i = 0; i < int(edge[1].size()); ++i) {
    bits[i + 1].push_back(0);
    dfs(edge[1][i], 1, i + 1, 1);
  }
  int v1 = 0;
  char op[10];
  for (int i = 0; i < int(q); ++i) {
    cin >> op;
    if (op[0] == '0') {
      int v, x, d;
      cin >> v >> x >> d;
      if (v == 1) {
        v1 += x;
        add(bit, d, x);
      } else {
        if (dep[v] - d >= 1) {
          add(bits[idx[v]], dep[v] - d,
              min(dep[v] + d, (int)bits[idx[v]].size() - 1), x);
        } else if (dep[v] - d == 0) {
          v1 += x;
          add(bits[idx[v]], min(dep[v] + d, (int)bits[idx[v]].size() - 1), x);
        } else {
          int len = d - dep[v];
          v1 += x;
          add(bit, len, x);
          add(bits[idx[v]], len + 1,
              min(dep[v] + d, (int)bits[idx[v]].size() - 1), x);
        }
      }
    } else if (op[0] == '1') {
      int v;
      cin >> v;
      if (v == 1) {
        cout << v1 << "\n";
      } else {
        int ans = query(bits[idx[v]], dep[v]) + query(bit, dep[v]);
        cout << ans << "\n";
      }
    }
  }
  return 0;
}
