@adatechnology/game-interactables-household 0.7.6 → 0.8.1
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 +73 -26
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +73 -26
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.global.js
CHANGED
|
@@ -19791,6 +19791,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19791
19791
|
var bin = { body: { material: "plastic", joint: "fused" }, parts: [["lid", door("plastic", "hinge", "lid")]] };
|
|
19792
19792
|
var upholstery = { material: "fabric", joint: "glue" };
|
|
19793
19793
|
var POLE_CAGE = { material: "steel", spacing: 0.1, diameter: 0.01 };
|
|
19794
|
+
var BRICKWORK = { size: [0.23, 0.075, 0.11], bond: "running", mortar: "mortar" };
|
|
19794
19795
|
var DESTRUCTION = {
|
|
19795
19796
|
fridge: fridgeLike,
|
|
19796
19797
|
fridge_compact: fridgeLike,
|
|
@@ -19846,13 +19847,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
19846
19847
|
parts: [["flap", door("steel", "hinge", "flap")], ["flag", { material: "steel", joint: "hinge", piece: "flag" }]]
|
|
19847
19848
|
},
|
|
19848
19849
|
dog_house: { body: { material: "plywood", joint: "nail" }, parts: [] },
|
|
19849
|
-
bbq: { body: { material: "brick", joint: "mortar" }, parts: [["counter_door", door("steel")]] },
|
|
19850
|
+
bbq: { body: { material: "brick", joint: "mortar", units: BRICKWORK }, parts: [["counter_door", door("steel")]] },
|
|
19850
19851
|
bunk_bed: { body: { material: "wood_soft", joint: "screw" }, parts: [] },
|
|
19851
19852
|
wood_stove: {
|
|
19852
19853
|
body: { material: "cast_iron", joint: "bolt" },
|
|
19853
19854
|
parts: [["firebox_door", { material: "cast_iron", joint: "hinge", piece: "door" }]]
|
|
19854
19855
|
},
|
|
19855
|
-
fireplace: { body: { material: "brick", joint: "mortar" }, parts: [] },
|
|
19856
|
+
fireplace: { body: { material: "brick", joint: "mortar", units: BRICKWORK }, parts: [] },
|
|
19856
19857
|
outhouse: {
|
|
19857
19858
|
body: { material: "wood_soft", joint: "nail" },
|
|
19858
19859
|
parts: [["door", door("wood_soft", "hinge", "door")], ["seat_lid", door("wood_soft", "hinge", "lid")]]
|
|
@@ -20210,7 +20211,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
20210
20211
|
this.collider("body", -this.hw, this.y0, -this.hd, this.hw, this.y0 + this.h, this.hd);
|
|
20211
20212
|
}
|
|
20212
20213
|
const body = DESTRUCTION[this.type]?.body;
|
|
20213
|
-
if (body && !this.spec.destruction)
|
|
20214
|
+
if (body && !this.spec.destruction) {
|
|
20215
|
+
this.spec.destruction = {
|
|
20216
|
+
...body,
|
|
20217
|
+
...body.reinforcement ? { reinforcement: { ...body.reinforcement } } : {},
|
|
20218
|
+
...body.units ? { units: { ...body.units, size: [...body.units.size] } } : {}
|
|
20219
|
+
};
|
|
20220
|
+
}
|
|
20214
20221
|
for (const k of Object.keys(s)) if (Array.isArray(s[k]) && s[k].length === 0) delete s[k];
|
|
20215
20222
|
return this.spec;
|
|
20216
20223
|
}
|
|
@@ -21104,6 +21111,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
21104
21111
|
"prompt.glass_door.open": "Close the glass door",
|
|
21105
21112
|
"prompt.glass_door.closed": "Open the glass door",
|
|
21106
21113
|
"prompt.flush": "Flush",
|
|
21114
|
+
"prompt.flush.off": "Flush",
|
|
21115
|
+
"prompt.flush.on": "Flushing",
|
|
21116
|
+
"program.wash": "Wash",
|
|
21117
|
+
"program.dry": "Spin-dry",
|
|
21118
|
+
"use.grill": "Put {item} on the grill",
|
|
21107
21119
|
"prompt.toilet_lid": "Toilet lid",
|
|
21108
21120
|
"prompt.toilet_lid.open": "Close the lid",
|
|
21109
21121
|
"prompt.toilet_lid.closed": "Lift the lid",
|
|
@@ -21349,6 +21361,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
21349
21361
|
"prompt.glass_door.open": "Fechar a porta de vidro",
|
|
21350
21362
|
"prompt.glass_door.closed": "Abrir a porta de vidro",
|
|
21351
21363
|
"prompt.flush": "Descarga",
|
|
21364
|
+
"prompt.flush.off": "Dar a descarga",
|
|
21365
|
+
"prompt.flush.on": "Descarga correndo",
|
|
21366
|
+
"program.wash": "Lavar",
|
|
21367
|
+
"program.dry": "Secar",
|
|
21368
|
+
"use.grill": "P\xF4r {item} na grelha",
|
|
21352
21369
|
"prompt.toilet_lid": "Tampa do vaso",
|
|
21353
21370
|
"prompt.toilet_lid.open": "Fechar a tampa",
|
|
21354
21371
|
"prompt.toilet_lid.closed": "Levantar a tampa",
|
|
@@ -21982,7 +21999,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
21982
21999
|
h: 1.3,
|
|
21983
22000
|
y: 0,
|
|
21984
22001
|
solid: true,
|
|
21985
|
-
massKg: 6
|
|
22002
|
+
massKg: 6,
|
|
22003
|
+
fixed: true
|
|
21986
22004
|
},
|
|
21987
22005
|
{
|
|
21988
22006
|
id: "dog_house",
|
|
@@ -22303,6 +22321,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22303
22321
|
if (o.part) dev.part = o.part;
|
|
22304
22322
|
if (o.channels) dev.channels = o.channels;
|
|
22305
22323
|
if (o.fixture) dev.fixture = o.fixture;
|
|
22324
|
+
if (o.display) dev.display = o.display;
|
|
22306
22325
|
c.add("devices", dev);
|
|
22307
22326
|
const floor = c.y0 + 0.01;
|
|
22308
22327
|
c.add("wires", {
|
|
@@ -22499,7 +22518,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22499
22518
|
c.part("power", [bx, py + 5e-3, -0.02 + bz], { kind: "rocker", axis: [1, 0, 0], angle: 0.2 }, () => {
|
|
22500
22519
|
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);
|
|
22501
22520
|
}, { label: "prompt.tv_power", at: false, noSweep: true, radius: 1.2 });
|
|
22502
|
-
plugged(c, "tv", "screen", 90, [hw * 0.5, py + 0.1, -0.02 - 0.03], { part: "power", channels: 6, on: c.M.on });
|
|
22521
|
+
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) } });
|
|
22503
22522
|
c.interact("use_tv", [0, py + ph / 2, hd], { do: "toggle_device", device: "tv" }, "prompt.tv", 2.5);
|
|
22504
22523
|
c.interact("channel_tv", [hw * 0.5, py + ph * 0.5, hd], { do: "cycle_device", device: "tv" }, "prompt.tv_channel", 2.5);
|
|
22505
22524
|
}
|
|
@@ -22545,6 +22564,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
22545
22564
|
plugged(c, "microwave", "appliance", 1200, [hw * 0.5, y0 + 0.08, -hd], { part: "dial", on: c.M.on });
|
|
22546
22565
|
c.interact("use_microwave", [hw - 0.07, y0 + 0.07, zf + 0.03], { do: "toggle_device", device: "microwave" }, "prompt.microwave", 1.2);
|
|
22547
22566
|
}
|
|
22567
|
+
var WASH_SECONDS = 90;
|
|
22568
|
+
var DRY_SECONDS = 60;
|
|
22548
22569
|
function washingMachine(c) {
|
|
22549
22570
|
const { hw, hd, h } = c;
|
|
22550
22571
|
const body = c.main(15790835);
|
|
@@ -22586,7 +22607,14 @@ var GameInteractablesHousehold = (() => {
|
|
|
22586
22607
|
);
|
|
22587
22608
|
c.add("fixtures", { id: "inlet", kind: "hose", outlet: [round3(-hw * 0.6), 0.2, -hd], dir: [0, 0, -1], flow: 12 });
|
|
22588
22609
|
plugged(c, "washer", "appliance", 500, [hw * 0.5, 0.15, -hd], { part: "dial", on: c.M.on, fixture: "inlet" });
|
|
22610
|
+
c.add("devices", { id: "dryer", kind: "heater", watts: 2e3, socket: "auto", plug: [hw * 0.5, 0.15, -hd] });
|
|
22589
22611
|
c.interact("use_washer", [0.04, h - 0.07, zf + 0.03], { do: "toggle_device", device: "washer" }, "prompt.washing_machine", 1.2);
|
|
22612
|
+
const drumZ = zf - 0.26;
|
|
22613
|
+
const inner = R - 0.02;
|
|
22614
|
+
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] }] });
|
|
22615
|
+
c.add("uses", { id: "wash", do: "program", device: "washer", seconds: WASH_SECONDS, label: "program.wash", access: "door" });
|
|
22616
|
+
c.add("uses", { id: "dry", do: "program", device: "dryer", seconds: DRY_SECONDS, label: "program.dry", access: "door" });
|
|
22617
|
+
c.add("uses", { id: "load", do: "put_in", container: "drum", label: "use.put_in" });
|
|
22590
22618
|
}
|
|
22591
22619
|
function electricalPanel(c) {
|
|
22592
22620
|
const { hw, hd, h, y0 } = c;
|
|
@@ -22979,6 +23007,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22979
23007
|
tap2(c, 0, tubTop + 0.08, -hd + 0.08, "tap", "tap_handle", tub);
|
|
22980
23008
|
c.add("fixtures", { id: "basin", kind: "utility_sink", outlet: [0, round3(tubTop - 0.1), 0], dir: [0, -1, 0], flow: 12, tank: "auto" });
|
|
22981
23009
|
}
|
|
23010
|
+
var SHOWER_DOOR = 0.72;
|
|
22982
23011
|
function shower(c) {
|
|
22983
23012
|
const { hw, hd, h } = c;
|
|
22984
23013
|
const tile = c.main(15133162);
|
|
@@ -23012,28 +23041,30 @@ var GameInteractablesHousehold = (() => {
|
|
|
23012
23041
|
c.add("emitters", { id: "shower_steam", kind: "steam", pos: [0, 1.4, 0], dir: [0, 1, 0], source: "shower", size: 0.8 });
|
|
23013
23042
|
c.interact("use_shower", [0.25, 1.1, -hd + 0.08], { do: "toggle_fixture", fixture: "shower" }, "prompt.shower", 1.3);
|
|
23014
23043
|
const gl = 12573670;
|
|
23015
|
-
const
|
|
23016
|
-
const zSlide = hd - 0.04;
|
|
23044
|
+
const zFront = hd - 0.015;
|
|
23017
23045
|
const gh = h - 0.1;
|
|
23018
23046
|
const gy = 0.075;
|
|
23019
|
-
|
|
23047
|
+
const dx1 = hw - 0.034;
|
|
23048
|
+
const hingeX = round3(Math.max(-hw + 0.05, dx1 - SHOWER_DOOR));
|
|
23049
|
+
const dw = dx1 - hingeX;
|
|
23050
|
+
if (hingeX - (-hw + 0.03) > 0.02) {
|
|
23051
|
+
c.b("glass", -hw + 0.03, gy, zFront - 4e-3, hingeX - 4e-3, gy + gh, zFront + 4e-3, gl);
|
|
23052
|
+
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 });
|
|
23053
|
+
}
|
|
23020
23054
|
c.b("glass", hw - 0.032, gy, -hd + 0.03, hw - 0.024, gy + gh, hd - 0.05, gl);
|
|
23021
|
-
const dw = (hw - 0.03) * 0.55 + 0.02;
|
|
23022
|
-
const dx1 = hw - 0.03;
|
|
23023
23055
|
c.part(
|
|
23024
23056
|
"glass_door",
|
|
23025
|
-
[
|
|
23026
|
-
{ kind: "
|
|
23057
|
+
[hingeX, gy, zFront],
|
|
23058
|
+
{ kind: "hinge", axis: [0, 1, 0], angle: -1.6 },
|
|
23027
23059
|
() => {
|
|
23028
|
-
c.b("glass",
|
|
23029
|
-
c.b("metal",
|
|
23030
|
-
c.b("metal",
|
|
23031
|
-
c.b("metal", dx1 -
|
|
23060
|
+
c.b("glass", hingeX + 2e-3, gy + 2e-3, zFront - 4e-3, dx1 - 2e-3, gy + gh - 2e-3, zFront + 4e-3, gl);
|
|
23061
|
+
c.b("metal", hingeX, gy, zFront - 8e-3, dx1, gy + 0.015, zFront + 8e-3, 12896460);
|
|
23062
|
+
c.b("metal", hingeX, gy + gh - 0.015, zFront - 8e-3, dx1, gy + gh, zFront + 8e-3, 12896460);
|
|
23063
|
+
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);
|
|
23032
23064
|
},
|
|
23033
|
-
{ label: "prompt.glass_door", at: [dx1 -
|
|
23065
|
+
{ label: "prompt.glass_door", at: [round3(dx1 - 0.03), 1, round3(zFront + 0.03)] }
|
|
23034
23066
|
);
|
|
23035
|
-
c.add("soft", { id: "glass_door", kind: "panel", anchor: [round3(
|
|
23036
|
-
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 });
|
|
23067
|
+
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" });
|
|
23037
23068
|
c.add("damage", { target: "glass_door", kind: "glass", hp: 25 });
|
|
23038
23069
|
c.spec.colliders = [];
|
|
23039
23070
|
c.collider("wall_back", -hw, 0, -hd, hw, h, -hd + 0.03);
|
|
@@ -23092,9 +23123,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
23092
23123
|
},
|
|
23093
23124
|
{ label: "prompt.flush", at: false, noSweep: true }
|
|
23094
23125
|
);
|
|
23095
|
-
c.add("fixtures", { id: "flush", kind: "flush", outlet: [0, 0.36, BOWL_Z], dir: [0, -1, 0], volume: 6, part: "flush_button", tank: "auto" });
|
|
23096
|
-
const bowl = { id: "bowl", from: [-0.12, 0.26, BOWL_Z - 0.12], to: [0.12, 0.36, BOWL_Z + 0.12], shape: "round" };
|
|
23126
|
+
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" });
|
|
23127
|
+
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 };
|
|
23097
23128
|
c.add("basins", bowl);
|
|
23129
|
+
c.add("uses", { id: "pee", do: "relieve", basin: "bowl", kind: "urine", label: "use.relieve.urine" });
|
|
23130
|
+
c.add("uses", { id: "poo", do: "relieve", basin: "bowl", kind: "feces", label: "use.relieve.feces" });
|
|
23098
23131
|
const rim = [0, 0.385, BOWL_Z];
|
|
23099
23132
|
c.add("emitters", { id: "flush_water", kind: "water", pos: rim, dir: [0, -1, 0], source: "flush", size: 0.08, ...streamInto(bowl, rim) });
|
|
23100
23133
|
c.interact("use_flush", [0, ty + th + 0.05, -hd + 0.1], { do: "toggle_fixture", fixture: "flush" }, "prompt.flush");
|
|
@@ -24065,6 +24098,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
24065
24098
|
...c.row(lx0 + 0.01, lx1 - 0.01, 0.416, zc, 2, [0.17, topC - 0.12 - 0.416 - 0.02, 0.4])
|
|
24066
24099
|
];
|
|
24067
24100
|
c.container({ id: "counter", access: "counter_door", from: [lx0, 0.05, lz0], to: [lx1, topC - 0.12, lz1], slots, loot: "bbq_counter" });
|
|
24101
|
+
const grateZ = (iz0 + iz1) / 2;
|
|
24102
|
+
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)]) });
|
|
24103
|
+
c.add("uses", { id: "grill", do: "put_in", container: "grate", label: "use.grill" });
|
|
24068
24104
|
c.add("fuels", { id: "charcoal", kind: "charcoal", capacity: 4, level: 4 });
|
|
24069
24105
|
const bed = [round3((ix0 + ix1) / 2), round3(bedY + 0.05), round3((iz0 + iz1) / 2)];
|
|
24070
24106
|
c.add("burners", { id: "coal", pos: bed, fuel: "charcoal", rate: 4e-4, needsIgnition: true });
|
|
@@ -24889,6 +24925,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
24889
24925
|
c.b("plain", -0.05, hy - 0.01, -hd - 4e-3, 0.05, hy + 0.03, -hd + 0.03, 1974306);
|
|
24890
24926
|
const slots = [...trashSlots(c, b, 2, 2, 0.28), ...trashSlots(c, { ...b, iy0: b.iy0 + 0.22 }, 2, 1, 0.2)];
|
|
24891
24927
|
c.container({ id: "bin", access: "lid", from: [b.ix0, b.iy0, b.iz0], to: [b.ix1, rim, b.iz1], slots, loot: "trash" });
|
|
24928
|
+
c.add("uses", { id: "throw", do: "put_in", container: "bin", label: "use.put_in" });
|
|
24929
|
+
c.add("uses", { id: "empty", do: "empty", container: "bin", label: "use.empty" });
|
|
24892
24930
|
c.add("damage", { target: "self", kind: "plastic", hp: 40 });
|
|
24893
24931
|
}
|
|
24894
24932
|
function wheelieBin(c) {
|
|
@@ -24928,6 +24966,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
24928
24966
|
);
|
|
24929
24967
|
const slots = [...trashSlots(c, b, 2, 3, 0.4), ...trashSlots(c, { ...b, iy0: b.iy0 + 0.3 }, 2, 2, 0.3)];
|
|
24930
24968
|
c.container({ id: "bin", access: "lid", from: [b.ix0, b.iy0, b.iz0], to: [b.ix1, rim, b.iz1], slots, loot: "trash" });
|
|
24969
|
+
c.add("uses", { id: "throw", do: "put_in", container: "bin", label: "use.put_in" });
|
|
24970
|
+
c.add("uses", { id: "empty", do: "empty", container: "bin", label: "use.empty" });
|
|
24931
24971
|
c.add("damage", { target: "self", kind: "plastic", hp: 60 });
|
|
24932
24972
|
}
|
|
24933
24973
|
function mailbox(c) {
|
|
@@ -25076,11 +25116,18 @@ var GameInteractablesHousehold = (() => {
|
|
|
25076
25116
|
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));
|
|
25077
25117
|
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));
|
|
25078
25118
|
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));
|
|
25079
|
-
if (c.M.variant !== "no_bowl")
|
|
25080
|
-
|
|
25081
|
-
|
|
25082
|
-
|
|
25083
|
-
|
|
25119
|
+
if (c.M.variant !== "no_bowl") dogBowls(c, x0, x1, z1 + 0.11);
|
|
25120
|
+
}
|
|
25121
|
+
var DOG_BOWL = { radius: 0.085, height: 0.045, inner: 0.07, food: 0.3, water: 0.8 };
|
|
25122
|
+
function dogBowls(c, x0, x1, bz) {
|
|
25123
|
+
const bowls = [
|
|
25124
|
+
{ id: "food", holds: "food", x: x1 - 0.1, accepts: ["dog_food"], capacity: DOG_BOWL.food },
|
|
25125
|
+
{ id: "water", holds: "water", x: x0 + 0.1, capacity: DOG_BOWL.water }
|
|
25126
|
+
];
|
|
25127
|
+
for (const b of bowls) {
|
|
25128
|
+
c.cyl("metal", b.x, 0, bz, DOG_BOWL.radius, DOG_BOWL.height, 11843772, "cyl");
|
|
25129
|
+
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 } : {} });
|
|
25130
|
+
c.add("uses", { id: `fill_${b.id}`, do: "fill", bowl: b.id, label: "use.fill" });
|
|
25084
25131
|
}
|
|
25085
25132
|
}
|
|
25086
25133
|
|