@adatechnology/game-interactables-household 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { GOODS_ITEMS, GOODS_PROVENANCE, GOODS_STRINGS } from "@adatechnology/gam
7
7
 
8
8
  // src/destruction.ts
9
9
  var door = (material, joint = "hinge", piece2 = "door") => ({ material, joint, piece: piece2 });
10
- var drawer = { material: "mdf", joint: "clip", piece: "drawer" };
10
+ var drawer = { material: "mdf", joint: "slide", piece: "drawer" };
11
11
  var knob = { material: "plastic", joint: "clip", piece: "knob" };
12
12
  var tap = { material: "steel", joint: "screw", piece: "handle" };
13
13
  var mdfBody = { material: "mdf", joint: "screw" };
@@ -1958,9 +1958,9 @@ var types_default = [
1958
1958
  {
1959
1959
  id: "wall_socket",
1960
1960
  group: "electrical",
1961
- w: 0.08,
1961
+ w: 0.075,
1962
1962
  d: 0.03,
1963
- h: 0.08,
1963
+ h: 0.12,
1964
1964
  y: 0.3,
1965
1965
  solid: false,
1966
1966
  massKg: 0.05
@@ -1968,9 +1968,9 @@ var types_default = [
1968
1968
  {
1969
1969
  id: "wall_switch",
1970
1970
  group: "electrical",
1971
- w: 0.08,
1971
+ w: 0.075,
1972
1972
  d: 0.03,
1973
- h: 0.08,
1973
+ h: 0.12,
1974
1974
  y: 1.2,
1975
1975
  solid: false,
1976
1976
  massKg: 0.05
@@ -2497,13 +2497,14 @@ function plugged(c, id, kind, watts, plug, o = {}) {
2497
2497
  }
2498
2498
 
2499
2499
  // src/builders/electrical.ts
2500
+ var WALL_PLATE = { width: 0.075, height: 0.12, thickness: 0.012, sink: 5e-3 };
2500
2501
  function wallSocket(c) {
2501
- const { hd, w, h, y0 } = c;
2502
+ const { w, h, y0 } = c;
2502
2503
  const cx = 0;
2503
2504
  const cy = y0 + h / 2;
2504
- const zp = -hd + 0.012;
2505
+ const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
2505
2506
  const plate = c.main(15856110);
2506
- c.b("plain", -w / 2, y0, -hd, w / 2, y0 + h, zp, plate);
2507
+ c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
2507
2508
  c.b("plain", -w / 2 + 6e-3, y0 + 6e-3, zp, w / 2 - 6e-3, y0 + h - 6e-3, zp + 3e-3, shade(plate, 0.97));
2508
2509
  c.rod("plain", "z", cx, cy, zp + 35e-4, 0.0285, 15e-4, shade(plate, 0.92));
2509
2510
  const dark = 1842206;
@@ -2522,11 +2523,11 @@ function wallSocket(c) {
2522
2523
  c.spec.colliders = [];
2523
2524
  }
2524
2525
  function wallSwitch(c) {
2525
- const { hd, w, h, y0 } = c;
2526
+ const { w, h, y0 } = c;
2526
2527
  const cy = y0 + h / 2;
2527
- const zp = -hd + 0.012;
2528
+ const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
2528
2529
  const plate = c.main(15856110);
2529
- c.b("plain", -w / 2, y0, -hd, w / 2, y0 + h, zp, plate);
2530
+ c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
2530
2531
  c.b("plain", -w / 2 + 6e-3, y0 + 6e-3, zp, w / 2 - 6e-3, y0 + h - 6e-3, zp + 3e-3, shade(plate, 0.97));
2531
2532
  c.b("plain", -0.018, cy - 0.032, zp + 3e-3, 0.018, cy + 0.032, zp + 6e-3, shade(plate, 0.85));
2532
2533
  c.part(
@@ -2832,6 +2833,7 @@ function powerMeter(c) {
2832
2833
  }
2833
2834
 
2834
2835
  // src/builders/kitchen.ts
2836
+ var STOVE_WALL_GAP = 0.04;
2835
2837
  var STEEL = 11843772;
2836
2838
  var CHROME = 13817562;
2837
2839
  function tap2(c, x, y, z, id, partId) {
@@ -2937,7 +2939,7 @@ function stove(c) {
2937
2939
  id: "gas_hose",
2938
2940
  kind: "cable",
2939
2941
  radius: 8e-3,
2940
- points: [[round3(hw - 0.08), 0.18, -hd], [round3(hw - 0.08), 0.12, round3(-hd - 0.12)], [round3(hw - 0.1), 0.06, round3(-hd - 0.3)], [round3(hw - 0.2), 0.03, round3(-hd - 0.5)]]
2942
+ points: [[round3(hw - 0.08), 0.18, -hd], [round3(hw - 0.08), 0.1, round3(-hd - STOVE_WALL_GAP)], [round3(hw - 0.14), 0.04, round3(-hd - STOVE_WALL_GAP)]]
2941
2943
  });
2942
2944
  c.add("damage", { target: "oven_door", kind: "glass", hp: 30 });
2943
2945
  }
@@ -5282,6 +5284,8 @@ export {
5282
5284
  HOUSEHOLD_ITEM_IDS,
5283
5285
  HOUSEHOLD_REGIONS,
5284
5286
  HOUSEHOLD_TYPES,
5287
+ STOVE_WALL_GAP,
5288
+ WALL_PLATE,
5285
5289
  cornersOf,
5286
5290
  createHousehold,
5287
5291
  createRecorder,