#include <bits/stdc++.h>
using namespace std;
struct segment_tree {
  int pow2;
  int *A;
  void init(int n) {
    delete[] A;
    pow2 = 1;
    while (pow2 < n) pow2 *= 2;
    A = new int[2 * pow2];
    memset(A, 0, 2 * pow2 * sizeof(int));
  }
  segment_tree(int n = 1) {
    A = NULL;
    init(n);
  }
  ~segment_tree() { delete[] A; }
  int query(int index) {
    index += pow2;
    int result = 0;
    while (index >= 1) {
      result += A[index];
      index >>= 1;
    }
    return result;
  }
  void update(int l, int r, int delta) {
    r = min(r, pow2 - 1);
    update(l, r, delta, 1, 0, pow2 - 1);
  }
  void update(int L, int R, int delta, int index, int LB, int RB) {
    if (L > R) return;
    if (LB == L && R == RB) {
      A[index] += delta;
      return;
    }
    int MB = (LB + RB) >> 1;
    update(L, min(R, MB), delta, index << 1, LB, MB);
    update(max(MB + 1, L), R, delta, (index << 1) + 1, MB + 1, RB);
  }
};
int n, q;
const int MX = 100 * 1000 + 9;
int group_id[MX];
int group_index[MX];
int group_size[MX];
int group_count;
segment_tree T_group[MX];
segment_tree T_total;
int ans_1;
vector<int> e[MX];
void prepare(void) {
  group_count = e[1].size();
  for (int i = 0; i < e[1].size(); i++) {
    int prev = 1;
    int current = e[1][i];
    int sz = 0;
    for (int index = 0; true; index++) {
      sz++;
      group_id[current] = i;
      group_index[current] = index;
      if (e[current].size() == 1) break;
      int next;
      if (e[current][0] != prev)
        next = e[current][0];
      else
        next = e[current][1];
      prev = current;
      current = next;
    }
    group_size[i] = sz;
    T_group[i].init(sz);
  }
  T_total.init(n);
  ans_1 = 0;
}
int query_node(int v) {
  if (v == 1) {
    return ans_1;
  } else {
    int group = group_id[v];
    int index = group_index[v];
    int global = T_total.query(index);
    int local = T_group[group].query(index);
    return global + local;
  }
}
void update(int v, int x, int d) {
  if (v == 1) {
    ans_1 += x;
    T_total.update(0, d - 1, x);
  } else {
    int group = group_id[v];
    int index = group_index[v];
    int L = max(0, index - d);
    int R = min(group_size[group] - 1, index + d);
    T_group[group].update(L, R, x);
    int away = d - index;
    if (away >= 1) {
      ans_1 += x;
      away--;
    }
    if (away >= 1) {
      T_group[group].update(0, away - 1, -x);
      T_total.update(0, away - 1, x);
    }
  }
}
int main() {
  cin >> n >> q;
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  prepare();
  int type, x, d;
  for (int i = 0; i < q; i++) {
    cin >> type;
    if (type == 0) {
      cin >> v >> x >> d;
      update(v, x, d);
    } else {
      cin >> v;
      cout << query_node(v) << '\n';
    }
  }
  return 0;
}
