@adatechnology/game-interactables-household 0.7.6 → 0.8.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.global.js +63 -23
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +63 -23
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1329,6 +1329,11 @@ var en_default = {
|
|
|
1329
1329
|
"prompt.glass_door.open": "Close the glass door",
|
|
1330
1330
|
"prompt.glass_door.closed": "Open the glass door",
|
|
1331
1331
|
"prompt.flush": "Flush",
|
|
1332
|
+
"prompt.flush.off": "Flush",
|
|
1333
|
+
"prompt.flush.on": "Flushing",
|
|
1334
|
+
"program.wash": "Wash",
|
|
1335
|
+
"program.dry": "Spin-dry",
|
|
1336
|
+
"use.grill": "Put {item} on the grill",
|
|
1332
1337
|
"prompt.toilet_lid": "Toilet lid",
|
|
1333
1338
|
"prompt.toilet_lid.open": "Close the lid",
|
|
1334
1339
|
"prompt.toilet_lid.closed": "Lift the lid",
|
|
@@ -1574,6 +1579,11 @@ var pt_BR_default = {
|
|
|
1574
1579
|
"prompt.glass_door.open": "Fechar a porta de vidro",
|
|
1575
1580
|
"prompt.glass_door.closed": "Abrir a porta de vidro",
|
|
1576
1581
|
"prompt.flush": "Descarga",
|
|
1582
|
+
"prompt.flush.off": "Dar a descarga",
|
|
1583
|
+
"prompt.flush.on": "Descarga correndo",
|
|
1584
|
+
"program.wash": "Lavar",
|
|
1585
|
+
"program.dry": "Secar",
|
|
1586
|
+
"use.grill": "P\xF4r {item} na grelha",
|
|
1577
1587
|
"prompt.toilet_lid": "Tampa do vaso",
|
|
1578
1588
|
"prompt.toilet_lid.open": "Fechar a tampa",
|
|
1579
1589
|
"prompt.toilet_lid.closed": "Levantar a tampa",
|
|
@@ -2207,7 +2217,8 @@ var types_default = [
|
|
|
2207
2217
|
h: 1.3,
|
|
2208
2218
|
y: 0,
|
|
2209
2219
|
solid: true,
|
|
2210
|
-
massKg: 6
|
|
2220
|
+
massKg: 6,
|
|
2221
|
+
fixed: true
|
|
2211
2222
|
},
|
|
2212
2223
|
{
|
|
2213
2224
|
id: "dog_house",
|
|
@@ -2528,6 +2539,7 @@ function plugged(c, id, kind, watts, plug, o = {}) {
|
|
|
2528
2539
|
if (o.part) dev.part = o.part;
|
|
2529
2540
|
if (o.channels) dev.channels = o.channels;
|
|
2530
2541
|
if (o.fixture) dev.fixture = o.fixture;
|
|
2542
|
+
if (o.display) dev.display = o.display;
|
|
2531
2543
|
c.add("devices", dev);
|
|
2532
2544
|
const floor = c.y0 + 0.01;
|
|
2533
2545
|
c.add("wires", {
|
|
@@ -2724,7 +2736,7 @@ function tv(c) {
|
|
|
2724
2736
|
c.part("power", [bx, py + 5e-3, -0.02 + bz], { kind: "rocker", axis: [1, 0, 0], angle: 0.2 }, () => {
|
|
2725
2737
|
c.b("plain", bx - 0.01, py - 8e-3, -0.02 + bz - 4e-3, bx + 0.01, py + 2e-3, -0.02 + bz + 6e-3, 3816512);
|
|
2726
2738
|
}, { label: "prompt.tv_power", at: false, noSweep: true, radius: 1.2 });
|
|
2727
|
-
plugged(c, "tv", "screen", 90, [hw * 0.5, py + 0.1, -0.02 - 0.03], { part: "power", channels: 6, on: c.M.on });
|
|
2739
|
+
plugged(c, "tv", "screen", 90, [hw * 0.5, py + 0.1, -0.02 - 0.03], { part: "power", channels: 6, on: c.M.on, display: { center: [0, round3(py + ph / 2), round3(-0.02 + bz + 5e-3)], w: round3(w - 0.05), h: round3(ph - 0.05) } });
|
|
2728
2740
|
c.interact("use_tv", [0, py + ph / 2, hd], { do: "toggle_device", device: "tv" }, "prompt.tv", 2.5);
|
|
2729
2741
|
c.interact("channel_tv", [hw * 0.5, py + ph * 0.5, hd], { do: "cycle_device", device: "tv" }, "prompt.tv_channel", 2.5);
|
|
2730
2742
|
}
|
|
@@ -2770,6 +2782,8 @@ function microwave(c) {
|
|
|
2770
2782
|
plugged(c, "microwave", "appliance", 1200, [hw * 0.5, y0 + 0.08, -hd], { part: "dial", on: c.M.on });
|
|
2771
2783
|
c.interact("use_microwave", [hw - 0.07, y0 + 0.07, zf + 0.03], { do: "toggle_device", device: "microwave" }, "prompt.microwave", 1.2);
|
|
2772
2784
|
}
|
|
2785
|
+
var WASH_SECONDS = 90;
|
|
2786
|
+
var DRY_SECONDS = 60;
|
|
2773
2787
|
function washingMachine(c) {
|
|
2774
2788
|
const { hw, hd, h } = c;
|
|
2775
2789
|
const body = c.main(15790835);
|
|
@@ -2811,7 +2825,14 @@ function washingMachine(c) {
|
|
|
2811
2825
|
);
|
|
2812
2826
|
c.add("fixtures", { id: "inlet", kind: "hose", outlet: [round3(-hw * 0.6), 0.2, -hd], dir: [0, 0, -1], flow: 12 });
|
|
2813
2827
|
plugged(c, "washer", "appliance", 500, [hw * 0.5, 0.15, -hd], { part: "dial", on: c.M.on, fixture: "inlet" });
|
|
2828
|
+
c.add("devices", { id: "dryer", kind: "heater", watts: 2e3, socket: "auto", plug: [hw * 0.5, 0.15, -hd] });
|
|
2814
2829
|
c.interact("use_washer", [0.04, h - 0.07, zf + 0.03], { do: "toggle_device", device: "washer" }, "prompt.washing_machine", 1.2);
|
|
2830
|
+
const drumZ = zf - 0.26;
|
|
2831
|
+
const inner = R - 0.02;
|
|
2832
|
+
c.container({ id: "drum", access: "door", from: [-inner, cy - inner, drumZ - 0.22], to: [inner, cy + inner, drumZ + 0.22], slots: [{ pos: [0, round3(cy - inner), round3(drumZ)], max: [round3(inner * 1.4), round3(inner * 1.4), 0.4] }] });
|
|
2833
|
+
c.add("uses", { id: "wash", do: "program", device: "washer", seconds: WASH_SECONDS, label: "program.wash", access: "door" });
|
|
2834
|
+
c.add("uses", { id: "dry", do: "program", device: "dryer", seconds: DRY_SECONDS, label: "program.dry", access: "door" });
|
|
2835
|
+
c.add("uses", { id: "load", do: "put_in", container: "drum", label: "use.put_in" });
|
|
2815
2836
|
}
|
|
2816
2837
|
function electricalPanel(c) {
|
|
2817
2838
|
const { hw, hd, h, y0 } = c;
|
|
@@ -3204,6 +3225,7 @@ function utilitySink(c) {
|
|
|
3204
3225
|
tap2(c, 0, tubTop + 0.08, -hd + 0.08, "tap", "tap_handle", tub);
|
|
3205
3226
|
c.add("fixtures", { id: "basin", kind: "utility_sink", outlet: [0, round3(tubTop - 0.1), 0], dir: [0, -1, 0], flow: 12, tank: "auto" });
|
|
3206
3227
|
}
|
|
3228
|
+
var SHOWER_DOOR = 0.72;
|
|
3207
3229
|
function shower(c) {
|
|
3208
3230
|
const { hw, hd, h } = c;
|
|
3209
3231
|
const tile = c.main(15133162);
|
|
@@ -3237,28 +3259,30 @@ function shower(c) {
|
|
|
3237
3259
|
c.add("emitters", { id: "shower_steam", kind: "steam", pos: [0, 1.4, 0], dir: [0, 1, 0], source: "shower", size: 0.8 });
|
|
3238
3260
|
c.interact("use_shower", [0.25, 1.1, -hd + 0.08], { do: "toggle_fixture", fixture: "shower" }, "prompt.shower", 1.3);
|
|
3239
3261
|
const gl = 12573670;
|
|
3240
|
-
const
|
|
3241
|
-
const zSlide = hd - 0.04;
|
|
3262
|
+
const zFront = hd - 0.015;
|
|
3242
3263
|
const gh = h - 0.1;
|
|
3243
3264
|
const gy = 0.075;
|
|
3244
|
-
|
|
3265
|
+
const dx1 = hw - 0.034;
|
|
3266
|
+
const hingeX = round3(Math.max(-hw + 0.05, dx1 - SHOWER_DOOR));
|
|
3267
|
+
const dw = dx1 - hingeX;
|
|
3268
|
+
if (hingeX - (-hw + 0.03) > 0.02) {
|
|
3269
|
+
c.b("glass", -hw + 0.03, gy, zFront - 4e-3, hingeX - 4e-3, gy + gh, zFront + 4e-3, gl);
|
|
3270
|
+
c.add("soft", { id: "glass_fixed", kind: "panel", anchor: [round3((-hw + 0.03 + hingeX) / 2), round3(gy + gh), zFront], size: [round3(hingeX + hw - 0.03), round3(gh), 0.01], stiffness: 18, damping: 6, maxAngle: 0.2, wind: 0 });
|
|
3271
|
+
}
|
|
3245
3272
|
c.b("glass", hw - 0.032, gy, -hd + 0.03, hw - 0.024, gy + gh, hd - 0.05, gl);
|
|
3246
|
-
const dw = (hw - 0.03) * 0.55 + 0.02;
|
|
3247
|
-
const dx1 = hw - 0.03;
|
|
3248
3273
|
c.part(
|
|
3249
3274
|
"glass_door",
|
|
3250
|
-
[
|
|
3251
|
-
{ kind: "
|
|
3275
|
+
[hingeX, gy, zFront],
|
|
3276
|
+
{ kind: "hinge", axis: [0, 1, 0], angle: -1.6 },
|
|
3252
3277
|
() => {
|
|
3253
|
-
c.b("glass",
|
|
3254
|
-
c.b("metal",
|
|
3255
|
-
c.b("metal",
|
|
3256
|
-
c.b("metal", dx1 -
|
|
3278
|
+
c.b("glass", hingeX + 2e-3, gy + 2e-3, zFront - 4e-3, dx1 - 2e-3, gy + gh - 2e-3, zFront + 4e-3, gl);
|
|
3279
|
+
c.b("metal", hingeX, gy, zFront - 8e-3, dx1, gy + 0.015, zFront + 8e-3, 12896460);
|
|
3280
|
+
c.b("metal", hingeX, gy + gh - 0.015, zFront - 8e-3, dx1, gy + gh, zFront + 8e-3, 12896460);
|
|
3281
|
+
c.b("metal", dx1 - 0.04, gy + gh * 0.45, zFront + 8e-3, dx1 - 0.02, gy + gh * 0.45 + 0.3, zFront + 0.028, 12896460);
|
|
3257
3282
|
},
|
|
3258
|
-
{ label: "prompt.glass_door", at: [dx1 -
|
|
3283
|
+
{ label: "prompt.glass_door", at: [round3(dx1 - 0.03), 1, round3(zFront + 0.03)] }
|
|
3259
3284
|
);
|
|
3260
|
-
c.add("soft", { id: "glass_door", kind: "panel", anchor: [round3(
|
|
3261
|
-
c.add("soft", { id: "glass_fixed", kind: "panel", anchor: [round3((-hw + 0.03 + 0.02) / 2), round3(gy + gh), zFixed], size: [round3(hw + 0.02 - 0.03), round3(gh), 0.01], stiffness: 18, damping: 6, maxAngle: 0.2, wind: 0 });
|
|
3285
|
+
c.add("soft", { id: "glass_door", kind: "panel", anchor: [round3((hingeX + dx1) / 2), round3(gy + gh), zFront], size: [round3(dw), round3(gh), 0.01], stiffness: 18, damping: 6, maxAngle: 0.35, wind: 0, part: "glass_door" });
|
|
3262
3286
|
c.add("damage", { target: "glass_door", kind: "glass", hp: 25 });
|
|
3263
3287
|
c.spec.colliders = [];
|
|
3264
3288
|
c.collider("wall_back", -hw, 0, -hd, hw, h, -hd + 0.03);
|
|
@@ -3317,9 +3341,11 @@ function toilet(c) {
|
|
|
3317
3341
|
},
|
|
3318
3342
|
{ label: "prompt.flush", at: false, noSweep: true }
|
|
3319
3343
|
);
|
|
3320
|
-
c.add("fixtures", { id: "flush", kind: "flush", outlet: [0, 0.36, BOWL_Z], dir: [0, -1, 0], volume: 6, part: "flush_button", tank: "auto" });
|
|
3321
|
-
const bowl = { id: "bowl", from: [-0.12, 0.26, BOWL_Z - 0.12], to: [0.12, 0.36, BOWL_Z + 0.12], shape: "round" };
|
|
3344
|
+
c.add("fixtures", { id: "flush", kind: "flush", outlet: [0, 0.36, BOWL_Z], dir: [0, -1, 0], volume: 6, part: "flush_button", tank: "auto", cleans: "bowl" });
|
|
3345
|
+
const bowl = { id: "bowl", from: [-0.12, 0.26, BOWL_Z - 0.12], to: [0.12, 0.36, BOWL_Z + 0.12], shape: "round", soils: true };
|
|
3322
3346
|
c.add("basins", bowl);
|
|
3347
|
+
c.add("uses", { id: "pee", do: "relieve", basin: "bowl", kind: "urine", label: "use.relieve.urine" });
|
|
3348
|
+
c.add("uses", { id: "poo", do: "relieve", basin: "bowl", kind: "feces", label: "use.relieve.feces" });
|
|
3323
3349
|
const rim = [0, 0.385, BOWL_Z];
|
|
3324
3350
|
c.add("emitters", { id: "flush_water", kind: "water", pos: rim, dir: [0, -1, 0], source: "flush", size: 0.08, ...streamInto(bowl, rim) });
|
|
3325
3351
|
c.interact("use_flush", [0, ty + th + 0.05, -hd + 0.1], { do: "toggle_fixture", fixture: "flush" }, "prompt.flush");
|
|
@@ -4290,6 +4316,9 @@ function bbq(c) {
|
|
|
4290
4316
|
...c.row(lx0 + 0.01, lx1 - 0.01, 0.416, zc, 2, [0.17, topC - 0.12 - 0.416 - 0.02, 0.4])
|
|
4291
4317
|
];
|
|
4292
4318
|
c.container({ id: "counter", access: "counter_door", from: [lx0, 0.05, lz0], to: [lx1, topC - 0.12, lz1], slots, loot: "bbq_counter" });
|
|
4319
|
+
const grateZ = (iz0 + iz1) / 2;
|
|
4320
|
+
c.container({ id: "grate", from: [ix0 + 0.02, gy + 8e-3, iz0 + 0.02], to: [ix1 - 0.02, gy + 0.2, iz1 - 0.02], slots: c.row(ix0 + 0.06, ix1 - 0.06, gy + 8e-3, grateZ, 3, [0.18, 0.15, round3(iz1 - iz0 - 0.06)]) });
|
|
4321
|
+
c.add("uses", { id: "grill", do: "put_in", container: "grate", label: "use.grill" });
|
|
4293
4322
|
c.add("fuels", { id: "charcoal", kind: "charcoal", capacity: 4, level: 4 });
|
|
4294
4323
|
const bed = [round3((ix0 + ix1) / 2), round3(bedY + 0.05), round3((iz0 + iz1) / 2)];
|
|
4295
4324
|
c.add("burners", { id: "coal", pos: bed, fuel: "charcoal", rate: 4e-4, needsIgnition: true });
|
|
@@ -5114,6 +5143,8 @@ function trashBin(c) {
|
|
|
5114
5143
|
c.b("plain", -0.05, hy - 0.01, -hd - 4e-3, 0.05, hy + 0.03, -hd + 0.03, 1974306);
|
|
5115
5144
|
const slots = [...trashSlots(c, b, 2, 2, 0.28), ...trashSlots(c, { ...b, iy0: b.iy0 + 0.22 }, 2, 1, 0.2)];
|
|
5116
5145
|
c.container({ id: "bin", access: "lid", from: [b.ix0, b.iy0, b.iz0], to: [b.ix1, rim, b.iz1], slots, loot: "trash" });
|
|
5146
|
+
c.add("uses", { id: "throw", do: "put_in", container: "bin", label: "use.put_in" });
|
|
5147
|
+
c.add("uses", { id: "empty", do: "empty", container: "bin", label: "use.empty" });
|
|
5117
5148
|
c.add("damage", { target: "self", kind: "plastic", hp: 40 });
|
|
5118
5149
|
}
|
|
5119
5150
|
function wheelieBin(c) {
|
|
@@ -5153,6 +5184,8 @@ function wheelieBin(c) {
|
|
|
5153
5184
|
);
|
|
5154
5185
|
const slots = [...trashSlots(c, b, 2, 3, 0.4), ...trashSlots(c, { ...b, iy0: b.iy0 + 0.3 }, 2, 2, 0.3)];
|
|
5155
5186
|
c.container({ id: "bin", access: "lid", from: [b.ix0, b.iy0, b.iz0], to: [b.ix1, rim, b.iz1], slots, loot: "trash" });
|
|
5187
|
+
c.add("uses", { id: "throw", do: "put_in", container: "bin", label: "use.put_in" });
|
|
5188
|
+
c.add("uses", { id: "empty", do: "empty", container: "bin", label: "use.empty" });
|
|
5156
5189
|
c.add("damage", { target: "self", kind: "plastic", hp: 60 });
|
|
5157
5190
|
}
|
|
5158
5191
|
function mailbox(c) {
|
|
@@ -5301,11 +5334,18 @@ function dogHouse(c) {
|
|
|
5301
5334
|
c.b("wood", -0.03, top - 5e-3, rz0 - 0.01, 0.03, top + roofT / 2 / cos + 0.012, rz1 + 0.01, shade(roofCol, 0.7));
|
|
5302
5335
|
c.b("fabric", x0 + t + 0.03, y0 + 0.014, z0 + t + 0.03, x1 - t - 0.03, y0 + 0.07, z1 - t - 0.2, c.accent(4876954));
|
|
5303
5336
|
c.b("fabric", x0 + t + 0.05, y0 + 0.07, z0 + t + 0.05, x1 - t - 0.05, y0 + 0.075, z1 - t - 0.22, mix(c.accent(4876954), 16777215, 0.15));
|
|
5304
|
-
if (c.M.variant !== "no_bowl")
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5337
|
+
if (c.M.variant !== "no_bowl") dogBowls(c, x0, x1, z1 + 0.11);
|
|
5338
|
+
}
|
|
5339
|
+
var DOG_BOWL = { radius: 0.085, height: 0.045, inner: 0.07, food: 0.3, water: 0.8 };
|
|
5340
|
+
function dogBowls(c, x0, x1, bz) {
|
|
5341
|
+
const bowls = [
|
|
5342
|
+
{ id: "food", holds: "food", x: x1 - 0.1, accepts: ["dog_food"], capacity: DOG_BOWL.food },
|
|
5343
|
+
{ id: "water", holds: "water", x: x0 + 0.1, capacity: DOG_BOWL.water }
|
|
5344
|
+
];
|
|
5345
|
+
for (const b of bowls) {
|
|
5346
|
+
c.cyl("metal", b.x, 0, bz, DOG_BOWL.radius, DOG_BOWL.height, 11843772, "cyl");
|
|
5347
|
+
c.add("bowls", { id: b.id, holds: b.holds, capacity: b.capacity, center: [round3(b.x), DOG_BOWL.height, round3(bz)], radius: DOG_BOWL.inner, depth: 0.012, ...b.accepts ? { accepts: b.accepts } : {} });
|
|
5348
|
+
c.add("uses", { id: `fill_${b.id}`, do: "fill", bowl: b.id, label: "use.fill" });
|
|
5309
5349
|
}
|
|
5310
5350
|
}
|
|
5311
5351
|
|