@adatechnology/game-interactables-household 0.4.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/README.md +2 -2
- package/dist/index.d.ts +19 -1
- package/dist/index.global.js +356 -18
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +34 -15
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
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: "
|
|
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" };
|
|
@@ -1786,7 +1786,12 @@ var types_default = [
|
|
|
1786
1786
|
y: 0,
|
|
1787
1787
|
solid: true,
|
|
1788
1788
|
pushable: true,
|
|
1789
|
-
massKg: 70
|
|
1789
|
+
massKg: 70,
|
|
1790
|
+
sounds: {
|
|
1791
|
+
leaves: {
|
|
1792
|
+
"*": "fridge"
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1790
1795
|
},
|
|
1791
1796
|
{
|
|
1792
1797
|
id: "fridge_compact",
|
|
@@ -1797,7 +1802,12 @@ var types_default = [
|
|
|
1797
1802
|
y: 0,
|
|
1798
1803
|
solid: true,
|
|
1799
1804
|
pushable: true,
|
|
1800
|
-
massKg: 30
|
|
1805
|
+
massKg: 30,
|
|
1806
|
+
sounds: {
|
|
1807
|
+
leaves: {
|
|
1808
|
+
"*": "fridge"
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1801
1811
|
},
|
|
1802
1812
|
{
|
|
1803
1813
|
id: "kitchen_cabinet_base",
|
|
@@ -1948,9 +1958,9 @@ var types_default = [
|
|
|
1948
1958
|
{
|
|
1949
1959
|
id: "wall_socket",
|
|
1950
1960
|
group: "electrical",
|
|
1951
|
-
w: 0.
|
|
1961
|
+
w: 0.075,
|
|
1952
1962
|
d: 0.03,
|
|
1953
|
-
h: 0.
|
|
1963
|
+
h: 0.12,
|
|
1954
1964
|
y: 0.3,
|
|
1955
1965
|
solid: false,
|
|
1956
1966
|
massKg: 0.05
|
|
@@ -1958,9 +1968,9 @@ var types_default = [
|
|
|
1958
1968
|
{
|
|
1959
1969
|
id: "wall_switch",
|
|
1960
1970
|
group: "electrical",
|
|
1961
|
-
w: 0.
|
|
1971
|
+
w: 0.075,
|
|
1962
1972
|
d: 0.03,
|
|
1963
|
-
h: 0.
|
|
1973
|
+
h: 0.12,
|
|
1964
1974
|
y: 1.2,
|
|
1965
1975
|
solid: false,
|
|
1966
1976
|
massKg: 0.05
|
|
@@ -2023,7 +2033,12 @@ var types_default = [
|
|
|
2023
2033
|
h: 0.3,
|
|
2024
2034
|
y: 0.9,
|
|
2025
2035
|
solid: false,
|
|
2026
|
-
massKg: 14
|
|
2036
|
+
massKg: 14,
|
|
2037
|
+
sounds: {
|
|
2038
|
+
leaves: {
|
|
2039
|
+
"*": "microwave"
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2027
2042
|
},
|
|
2028
2043
|
{
|
|
2029
2044
|
id: "washing_machine",
|
|
@@ -2482,13 +2497,14 @@ function plugged(c, id, kind, watts, plug, o = {}) {
|
|
|
2482
2497
|
}
|
|
2483
2498
|
|
|
2484
2499
|
// src/builders/electrical.ts
|
|
2500
|
+
var WALL_PLATE = { width: 0.075, height: 0.12, thickness: 0.012, sink: 5e-3 };
|
|
2485
2501
|
function wallSocket(c) {
|
|
2486
|
-
const {
|
|
2502
|
+
const { w, h, y0 } = c;
|
|
2487
2503
|
const cx = 0;
|
|
2488
2504
|
const cy = y0 + h / 2;
|
|
2489
|
-
const zp = -
|
|
2505
|
+
const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
|
|
2490
2506
|
const plate = c.main(15856110);
|
|
2491
|
-
c.b("plain", -w / 2, y0, -
|
|
2507
|
+
c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
|
|
2492
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));
|
|
2493
2509
|
c.rod("plain", "z", cx, cy, zp + 35e-4, 0.0285, 15e-4, shade(plate, 0.92));
|
|
2494
2510
|
const dark = 1842206;
|
|
@@ -2507,11 +2523,11 @@ function wallSocket(c) {
|
|
|
2507
2523
|
c.spec.colliders = [];
|
|
2508
2524
|
}
|
|
2509
2525
|
function wallSwitch(c) {
|
|
2510
|
-
const {
|
|
2526
|
+
const { w, h, y0 } = c;
|
|
2511
2527
|
const cy = y0 + h / 2;
|
|
2512
|
-
const zp = -
|
|
2528
|
+
const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
|
|
2513
2529
|
const plate = c.main(15856110);
|
|
2514
|
-
c.b("plain", -w / 2, y0, -
|
|
2530
|
+
c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
|
|
2515
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));
|
|
2516
2532
|
c.b("plain", -0.018, cy - 0.032, zp + 3e-3, 0.018, cy + 0.032, zp + 6e-3, shade(plate, 0.85));
|
|
2517
2533
|
c.part(
|
|
@@ -2817,6 +2833,7 @@ function powerMeter(c) {
|
|
|
2817
2833
|
}
|
|
2818
2834
|
|
|
2819
2835
|
// src/builders/kitchen.ts
|
|
2836
|
+
var STOVE_WALL_GAP = 0.04;
|
|
2820
2837
|
var STEEL = 11843772;
|
|
2821
2838
|
var CHROME = 13817562;
|
|
2822
2839
|
function tap2(c, x, y, z, id, partId) {
|
|
@@ -2922,7 +2939,7 @@ function stove(c) {
|
|
|
2922
2939
|
id: "gas_hose",
|
|
2923
2940
|
kind: "cable",
|
|
2924
2941
|
radius: 8e-3,
|
|
2925
|
-
points: [[round3(hw - 0.08), 0.18, -hd], [round3(hw - 0.08), 0.
|
|
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)]]
|
|
2926
2943
|
});
|
|
2927
2944
|
c.add("damage", { target: "oven_door", kind: "glass", hp: 30 });
|
|
2928
2945
|
}
|
|
@@ -5267,6 +5284,8 @@ export {
|
|
|
5267
5284
|
HOUSEHOLD_ITEM_IDS,
|
|
5268
5285
|
HOUSEHOLD_REGIONS,
|
|
5269
5286
|
HOUSEHOLD_TYPES,
|
|
5287
|
+
STOVE_WALL_GAP,
|
|
5288
|
+
WALL_PLATE,
|
|
5270
5289
|
cornersOf,
|
|
5271
5290
|
createHousehold,
|
|
5272
5291
|
createRecorder,
|