@adatechnology/game-interactables-household 0.8.6 → 0.9.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 +193 -17
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +113 -11
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.global.js
CHANGED
|
@@ -12040,7 +12040,20 @@ var GameInteractablesHousehold = (() => {
|
|
|
12040
12040
|
stack: 6,
|
|
12041
12041
|
shape: "cup",
|
|
12042
12042
|
color: 14215408,
|
|
12043
|
-
rarity: "common"
|
|
12043
|
+
rarity: "common",
|
|
12044
|
+
parts: [
|
|
12045
|
+
{
|
|
12046
|
+
id: "body",
|
|
12047
|
+
material: "glass",
|
|
12048
|
+
thickness: 3e-3
|
|
12049
|
+
}
|
|
12050
|
+
],
|
|
12051
|
+
container: {
|
|
12052
|
+
capacityLiters: 0.3
|
|
12053
|
+
},
|
|
12054
|
+
estimated: [
|
|
12055
|
+
"container"
|
|
12056
|
+
]
|
|
12044
12057
|
},
|
|
12045
12058
|
{
|
|
12046
12059
|
id: "cutlery",
|
|
@@ -12291,8 +12304,17 @@ var GameInteractablesHousehold = (() => {
|
|
|
12291
12304
|
}
|
|
12292
12305
|
],
|
|
12293
12306
|
estimated: [
|
|
12294
|
-
"parts"
|
|
12295
|
-
|
|
12307
|
+
"parts",
|
|
12308
|
+
"consumable"
|
|
12309
|
+
],
|
|
12310
|
+
consumable: {
|
|
12311
|
+
form: "liquid",
|
|
12312
|
+
unit: "ml",
|
|
12313
|
+
amount: 450,
|
|
12314
|
+
dose: 5,
|
|
12315
|
+
emptyKg: 0.03,
|
|
12316
|
+
density: 1.03
|
|
12317
|
+
}
|
|
12296
12318
|
},
|
|
12297
12319
|
{
|
|
12298
12320
|
id: "bleach",
|
|
@@ -13782,8 +13804,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
13782
13804
|
thickness: 2e-3
|
|
13783
13805
|
}
|
|
13784
13806
|
],
|
|
13807
|
+
container: {
|
|
13808
|
+
capacityLiters: 0.35
|
|
13809
|
+
},
|
|
13785
13810
|
estimated: [
|
|
13786
|
-
"parts"
|
|
13811
|
+
"parts",
|
|
13812
|
+
"container"
|
|
13787
13813
|
]
|
|
13788
13814
|
},
|
|
13789
13815
|
{
|
|
@@ -13930,6 +13956,41 @@ var GameInteractablesHousehold = (() => {
|
|
|
13930
13956
|
},
|
|
13931
13957
|
weapon: "brass_knuckles",
|
|
13932
13958
|
model: "brass_knuckles"
|
|
13959
|
+
},
|
|
13960
|
+
{
|
|
13961
|
+
id: "plunger",
|
|
13962
|
+
category: "tools",
|
|
13963
|
+
kind: "tool",
|
|
13964
|
+
tags: [
|
|
13965
|
+
"cleaning"
|
|
13966
|
+
],
|
|
13967
|
+
tools: [
|
|
13968
|
+
"plunger"
|
|
13969
|
+
],
|
|
13970
|
+
size: [
|
|
13971
|
+
0.14,
|
|
13972
|
+
0.55,
|
|
13973
|
+
0.14
|
|
13974
|
+
],
|
|
13975
|
+
weight: 0.45,
|
|
13976
|
+
stack: 1,
|
|
13977
|
+
shape: "tool",
|
|
13978
|
+
color: 11545120,
|
|
13979
|
+
rarity: "common",
|
|
13980
|
+
finds: {
|
|
13981
|
+
places: [
|
|
13982
|
+
"house",
|
|
13983
|
+
"apartment"
|
|
13984
|
+
]
|
|
13985
|
+
},
|
|
13986
|
+
parts: [
|
|
13987
|
+
{
|
|
13988
|
+
id: "body",
|
|
13989
|
+
material: "rubber",
|
|
13990
|
+
thickness: 4e-3
|
|
13991
|
+
}
|
|
13992
|
+
],
|
|
13993
|
+
model: "plunger"
|
|
13933
13994
|
}
|
|
13934
13995
|
];
|
|
13935
13996
|
var kinds_default = [
|
|
@@ -15613,6 +15674,14 @@ var GameInteractablesHousehold = (() => {
|
|
|
15613
15674
|
"alicate"
|
|
15614
15675
|
]
|
|
15615
15676
|
},
|
|
15677
|
+
plunger: {
|
|
15678
|
+
created: true,
|
|
15679
|
+
idSource: "decision",
|
|
15680
|
+
sizeSource: "REF",
|
|
15681
|
+
vc3: [
|
|
15682
|
+
"desentupidor"
|
|
15683
|
+
]
|
|
15684
|
+
},
|
|
15616
15685
|
adjustable_wrench: {
|
|
15617
15686
|
ite: "chave_inglesa",
|
|
15618
15687
|
idSource: "decision",
|
|
@@ -18739,14 +18808,18 @@ var GameInteractablesHousehold = (() => {
|
|
|
18739
18808
|
var ITEM_CONTRACTS = createItemContracts();
|
|
18740
18809
|
var createGoodsKinds = (options = {}) => defineCategories(GOODS_KINDS, options);
|
|
18741
18810
|
var KINDS = createGoodsKinds();
|
|
18742
|
-
var
|
|
18811
|
+
var withKind = (item) => {
|
|
18743
18812
|
const kind = item.kind;
|
|
18744
|
-
|
|
18745
|
-
|
|
18813
|
+
if (!kind || !KINDS.has(kind)) return item;
|
|
18814
|
+
const defaults = KINDS.defaults(kind);
|
|
18815
|
+
const seal = defaults.seal;
|
|
18816
|
+
const parts2 = defaults.parts;
|
|
18817
|
+
const own = item.parts;
|
|
18818
|
+
return { ...item, ...seal ? { seal: { ...seal, ...item.seal } } : {}, ...!own && parts2 ? { parts: parts2 } : {} };
|
|
18746
18819
|
};
|
|
18747
18820
|
var goodsPack = {
|
|
18748
18821
|
id: "goods",
|
|
18749
|
-
items: GOODS_ITEMS.map(
|
|
18822
|
+
items: GOODS_ITEMS.map(withKind),
|
|
18750
18823
|
categories: GOODS_CATEGORIES,
|
|
18751
18824
|
places: GOODS_PLACES,
|
|
18752
18825
|
containers: GOODS_CONTAINERS,
|
|
@@ -19028,6 +19101,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19028
19101
|
"item.toothbrush": "Toothbrush",
|
|
19029
19102
|
"item.deodorant": "Deodorant",
|
|
19030
19103
|
"item.toilet_paper": "Toilet paper",
|
|
19104
|
+
"item.plunger": "Toilet plunger",
|
|
19031
19105
|
"item.towel": "Towel",
|
|
19032
19106
|
"item.detergent": "Detergent",
|
|
19033
19107
|
"item.bleach": "Bleach",
|
|
@@ -19536,6 +19610,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19536
19610
|
"item.toothbrush": "Escova de dente",
|
|
19537
19611
|
"item.deodorant": "Desodorante",
|
|
19538
19612
|
"item.toilet_paper": "Papel higi\xEAnico",
|
|
19613
|
+
"item.plunger": "Desentupidor",
|
|
19539
19614
|
"item.towel": "Toalha",
|
|
19540
19615
|
"item.detergent": "Detergente",
|
|
19541
19616
|
"item.bleach": "\xC1gua sanit\xE1ria",
|
|
@@ -19836,7 +19911,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19836
19911
|
},
|
|
19837
19912
|
toilet: {
|
|
19838
19913
|
body: { material: "ceramic", joint: "bolt" },
|
|
19839
|
-
parts: [["lid", door("plastic", "hinge", "lid")], ["flush_button", { material: "plastic", joint: "clip", piece: "button" }]]
|
|
19914
|
+
parts: [["lid", door("plastic", "hinge", "lid")], ["seat_ring", door("plastic", "hinge", "lid")], ["flush_button", { material: "plastic", joint: "clip", piece: "button" }]]
|
|
19840
19915
|
},
|
|
19841
19916
|
wall_socket: { body: { material: "plastic", joint: "screw" }, parts: [] },
|
|
19842
19917
|
wall_switch: { body: { material: "plastic", joint: "screw" }, parts: [["rocker", { material: "plastic", joint: "clip", piece: "rocker" }]] },
|
|
@@ -20195,7 +20270,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20195
20270
|
return out;
|
|
20196
20271
|
}
|
|
20197
20272
|
/**
|
|
20198
|
-
* Container with its inner volume given by two corners. Explicit `item.contents[id]` wins over the loot table
|
|
20273
|
+
* Container with its inner volume given by two corners. Explicit `item.contents[id]` wins over the loot table, slot by slot over the builder's own `contents`
|
|
20274
|
+
* (what the piece always comes with: the soap and shampoo on a shower's shelf), which stays in every slot the explicit list leaves empty.
|
|
20199
20275
|
* Slots are validated lazily by the tests, not here.
|
|
20200
20276
|
*/
|
|
20201
20277
|
container(o) {
|
|
@@ -20210,9 +20286,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
20210
20286
|
if (o.access) c.access = o.access;
|
|
20211
20287
|
if (o.loot) c.loot = o.loot;
|
|
20212
20288
|
const given = this.M.contents?.[o.id];
|
|
20213
|
-
if (given) {
|
|
20289
|
+
if (given || o.contents) {
|
|
20214
20290
|
c.contents = o.slots.map((_, i) => {
|
|
20215
|
-
const g = given[i];
|
|
20291
|
+
const g = given?.[i] ?? o.contents?.[i];
|
|
20216
20292
|
if (!g) return null;
|
|
20217
20293
|
const s = { type: g.type, qty: g.qty };
|
|
20218
20294
|
if (g.data) s.data = { ...g.data };
|
|
@@ -21149,6 +21225,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
21149
21225
|
"prompt.toilet_lid": "Toilet lid",
|
|
21150
21226
|
"prompt.toilet_lid.open": "Close the lid",
|
|
21151
21227
|
"prompt.toilet_lid.closed": "Lift the lid",
|
|
21228
|
+
"prompt.toilet_seat": "Toilet seat",
|
|
21229
|
+
"prompt.toilet_seat.open": "Lower the seat",
|
|
21230
|
+
"prompt.toilet_seat.closed": "Lift the seat",
|
|
21152
21231
|
"prompt.switch": "Light switch",
|
|
21153
21232
|
"prompt.switch.on": "Switch off",
|
|
21154
21233
|
"prompt.switch.on.verb": "Switch off",
|
|
@@ -21409,6 +21488,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
21409
21488
|
"prompt.toilet_lid": "Tampa do vaso",
|
|
21410
21489
|
"prompt.toilet_lid.open": "Fechar a tampa",
|
|
21411
21490
|
"prompt.toilet_lid.closed": "Levantar a tampa",
|
|
21491
|
+
"prompt.toilet_seat": "Assento do vaso",
|
|
21492
|
+
"prompt.toilet_seat.open": "Abaixar o assento",
|
|
21493
|
+
"prompt.toilet_seat.closed": "Levantar o assento",
|
|
21412
21494
|
"prompt.switch": "Interruptor",
|
|
21413
21495
|
"prompt.switch.on": "Desligar a luz",
|
|
21414
21496
|
"prompt.switch.on.verb": "Desligar",
|
|
@@ -22821,6 +22903,69 @@ var GameInteractablesHousehold = (() => {
|
|
|
22821
22903
|
var STOVE_WALL_GAP = 0.04;
|
|
22822
22904
|
var STEEL = 11843772;
|
|
22823
22905
|
var CHROME = 13817562;
|
|
22906
|
+
var DISHES = ["plate", "bowl", "cup", "wine_glass", "cutlery", "knife", "pot", "pan"];
|
|
22907
|
+
var DISH_NEEDS = ["detergent", "sponge"];
|
|
22908
|
+
var DIRTY_PLATE = 0.8;
|
|
22909
|
+
var DIRTY_CUP = 0.5;
|
|
22910
|
+
var DIRTY_CUTLERY = 0.6;
|
|
22911
|
+
function goodsSize(id) {
|
|
22912
|
+
const item = GOODS_ITEMS.find((candidate) => candidate.id === id);
|
|
22913
|
+
if (!item) throw new Error(`game-interactables-household: the sinks lay "${id}", which the goods catalogue does not have`);
|
|
22914
|
+
return [item.size[0], item.size[1], item.size[2]];
|
|
22915
|
+
}
|
|
22916
|
+
var laid = (type, data) => ({ stack: { type, qty: 1, ...data ? { data } : {} }, size: goodsSize(type) });
|
|
22917
|
+
var LAY_GAP = 5e-3;
|
|
22918
|
+
function layOnFloor(area, things) {
|
|
22919
|
+
const slots = [];
|
|
22920
|
+
const contents = [];
|
|
22921
|
+
const left = [];
|
|
22922
|
+
let x = area.x0;
|
|
22923
|
+
let z = area.z0;
|
|
22924
|
+
let row = 0;
|
|
22925
|
+
const fits = (w, d, atX, atZ) => atX + w + 2 * LAY_GAP <= area.x1 + 1e-9 && atZ + d + 2 * LAY_GAP <= area.z1 + 1e-9;
|
|
22926
|
+
for (const thing of things) {
|
|
22927
|
+
const [w, h, d] = thing.size;
|
|
22928
|
+
if (!fits(w, d, x, z) && fits(w, d, area.x0, z + row)) [x, z, row] = [area.x0, z + row, 0];
|
|
22929
|
+
if (!fits(w, d, x, z)) {
|
|
22930
|
+
left.push(thing);
|
|
22931
|
+
continue;
|
|
22932
|
+
}
|
|
22933
|
+
const { stack } = thing;
|
|
22934
|
+
slots.push({ pos: [round3(x + LAY_GAP + w / 2), round3(area.y), round3(z + LAY_GAP + d / 2)], max: [w, h, d] });
|
|
22935
|
+
contents.push(stack);
|
|
22936
|
+
x += w + 2 * LAY_GAP;
|
|
22937
|
+
row = Math.max(row, d + 2 * LAY_GAP);
|
|
22938
|
+
}
|
|
22939
|
+
return { slots, contents, left };
|
|
22940
|
+
}
|
|
22941
|
+
var DIRTY_DISHES = [
|
|
22942
|
+
laid("plate", { dirt: DIRTY_PLATE }),
|
|
22943
|
+
laid("cup", { dirt: DIRTY_CUP }),
|
|
22944
|
+
laid("cutlery", { dirt: DIRTY_CUTLERY })
|
|
22945
|
+
];
|
|
22946
|
+
var WASHING_THINGS = [
|
|
22947
|
+
laid("detergent"),
|
|
22948
|
+
laid("sponge"),
|
|
22949
|
+
laid("cup")
|
|
22950
|
+
];
|
|
22951
|
+
function basinContents(c, basin, groups) {
|
|
22952
|
+
const laid2 = groups.map(({ things, area }) => layOnFloor({ ...area ?? { x0: basin.from[0], x1: basin.to[0], z0: basin.from[2], z1: basin.to[2] }, y: basin.from[1] }, things));
|
|
22953
|
+
c.container({ id: "in_basin", from: [...basin.from], to: [...basin.to], slots: laid2.flatMap((l) => l.slots), contents: laid2.flatMap((l) => l.contents) });
|
|
22954
|
+
return laid2.flatMap((l) => l.left);
|
|
22955
|
+
}
|
|
22956
|
+
function washDishes(c, basin, rack) {
|
|
22957
|
+
c.add("uses", {
|
|
22958
|
+
id: "wash_dishes",
|
|
22959
|
+
do: "wash",
|
|
22960
|
+
fixture: "tap",
|
|
22961
|
+
surface: "dishes",
|
|
22962
|
+
clip: "wash_dishes",
|
|
22963
|
+
label: "use.wash_dishes",
|
|
22964
|
+
needs: [...DISH_NEEDS],
|
|
22965
|
+
dose: { need: 0 },
|
|
22966
|
+
dishes: { ids: [...DISHES], basin: basin.id, rack }
|
|
22967
|
+
});
|
|
22968
|
+
}
|
|
22824
22969
|
function tap2(c, x, y, z, id, partId, basin) {
|
|
22825
22970
|
c.cyl("metal", x, y - 2e-3, z, 0.03, 0.022, STEEL, "cyl");
|
|
22826
22971
|
c.cyl("metal", x, y + 0.02, z, 0.017, 0.19, CHROME, "cyl");
|
|
@@ -22842,6 +22987,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
22842
22987
|
c.add("fixtures", { id, kind: "tap", outlet, dir: [0, -1, 0], flow: 7, part: partId, tank: "auto" });
|
|
22843
22988
|
c.add("emitters", { id: `${id}_water`, kind: "water", pos: outlet, dir: [0, -1, 0], source: id, size: 0.02, ...streamInto(basin, outlet) });
|
|
22844
22989
|
c.interact(`use_${id}`, [round3(x + 0.05), round3(y + 0.126), round3(z)], { do: "toggle_fixture", fixture: id }, "prompt.tap", 1.3);
|
|
22990
|
+
c.add("uses", { id: `drink_${id}`, do: "drink", from: "vessel", fixture: id, clip: "drink", fillClip: "fill_cup", label: "use.drink_water" });
|
|
22991
|
+
c.add("uses", { id: `drink_hands_${id}`, do: "drink", from: "hands", fixture: id, clip: "drink_cupped_hands", label: "use.drink_from_hands" });
|
|
22845
22992
|
return outlet;
|
|
22846
22993
|
}
|
|
22847
22994
|
function stove(c) {
|
|
@@ -23009,6 +23156,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
23009
23156
|
c.add("basins", basin);
|
|
23010
23157
|
return basin;
|
|
23011
23158
|
}
|
|
23159
|
+
function drainboardSpots(x0, x1, z0, z1, y) {
|
|
23160
|
+
const spots = [];
|
|
23161
|
+
for (const k of [0.7, 0.3]) for (const j of [0.2, 0.5, 0.8]) spots.push([round3(x0 + (x1 - x0) * j), round3(y), round3(z0 + (z1 - z0) * k)]);
|
|
23162
|
+
return spots;
|
|
23163
|
+
}
|
|
23012
23164
|
var KITCHEN_BASIN_DEPTH = 0.2;
|
|
23013
23165
|
var BATHROOM_BASIN_DEPTH = 0.14;
|
|
23014
23166
|
var TAILPIECE_GAP = 2e-3;
|
|
@@ -23037,6 +23189,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
23037
23189
|
const basin = counterWithBasin(c, { top, bx0, bx1, bz0, bz1, depth: KITCHEN_BASIN_DEPTH, counter: 8157816, steel: true });
|
|
23038
23190
|
for (let i = 0; i < 7; i++) c.b("metal", bx1 + 0.06, top, bz0 + 0.04 + i * 0.07, hw - 0.06, top + 4e-3, bz0 + 0.052 + i * 0.07, 10133154);
|
|
23039
23191
|
tap2(c, (bx0 + bx1) / 2, top, -hd + 0.07, "tap", "tap_handle", basin);
|
|
23192
|
+
washDishes(c, basin, drainboardSpots(bx1 + 0.06, hw - 0.06, bz0 + 0.04, bz0 + 0.04 + 6 * 0.07 + 0.012, top + 5e-3));
|
|
23193
|
+
const counter = { x0: -hw, x1: round3(bx0 - 0.01), z0: -hd, z1: zf };
|
|
23194
|
+
const onCounter = layOnFloor({ ...counter, y: top }, WASHING_THINGS);
|
|
23195
|
+
c.container({ id: "counter", from: [counter.x0, top, counter.z0], to: [counter.x1, round3(top + 0.3), counter.z1], slots: onCounter.slots, contents: onCounter.contents });
|
|
23196
|
+
basinContents(c, basin, [{ things: [...DIRTY_DISHES, ...onCounter.left] }]);
|
|
23040
23197
|
pipes(c, (bx0 + bx1) / 2, top - KITCHEN_BASIN_DEPTH, (bz0 + bz1) / 2);
|
|
23041
23198
|
const mid = 15e-4;
|
|
23042
23199
|
hingedDoor(c, { id: "door_1", x0: -hw + 3e-3, x1: -mid, y0: 0.103, y1: top - 0.043, zf, t, side: "left", color: front, inner: lining, handle: "bar_v", handleLen: 0.22, label: "prompt.door" });
|
|
@@ -23100,6 +23257,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
23100
23257
|
const tub = { id: "basin", from: [round3(x0 + 0.03), round3(tubTop - 0.276), round3(z0 + 0.03)], to: [round3(x1 - 0.03), tubTop, round3(z1 - 0.03)] };
|
|
23101
23258
|
c.add("basins", tub);
|
|
23102
23259
|
tap2(c, 0, tubTop + 0.08, -hd + 0.08, "tap", "tap_handle", tub);
|
|
23260
|
+
washDishes(c, tub, drainboardSpots(round3(x1 - 0.03 - (x1 - x0) * 0.4) + 0.01, round3(x1 - 0.05), round3(z0 + 0.05), round3(z1 - 0.23), round3(tubTop - 0.276 + 5e-3)));
|
|
23261
|
+
const rackX = round3(x1 - 0.03 - (x1 - x0) * 0.4);
|
|
23262
|
+
const washboardZ = round3(z1 - 0.2);
|
|
23263
|
+
basinContents(c, tub, [
|
|
23264
|
+
{ things: DIRTY_DISHES.slice(0, 2), area: { x0: tub.from[0], x1: rackX, z0: tub.from[2], z1: washboardZ } },
|
|
23265
|
+
{ things: WASHING_THINGS, area: { x0: round3(x0 + 0.04 + (x1 - x0) * 0.4), x1: tub.to[0], z0: washboardZ, z1: tub.to[2] } }
|
|
23266
|
+
]);
|
|
23103
23267
|
c.add("fixtures", { id: "basin", kind: "utility_sink", outlet: [0, round3(tubTop - 0.1), 0], dir: [0, -1, 0], flow: 12, tank: "auto" });
|
|
23104
23268
|
}
|
|
23105
23269
|
var SHOWER_DOOR = 0.72;
|
|
@@ -23198,8 +23362,16 @@ var GameInteractablesHousehold = (() => {
|
|
|
23198
23362
|
c.b("plain", -0.195, ty + th, -hd - 0, 0.195, ty + th + 0.025, -hd + 0.205, sh);
|
|
23199
23363
|
c.b("plain", -0.185, ty + 0.01, -hd + 0.2, 0.185, ty + 0.03, -hd + 0.215, sh);
|
|
23200
23364
|
const seatY = 0.4;
|
|
23201
|
-
c.
|
|
23202
|
-
|
|
23365
|
+
c.part(
|
|
23366
|
+
"seat_ring",
|
|
23367
|
+
[0, seatY, -0.05],
|
|
23368
|
+
{ kind: "hinge", axis: [1, 0, 0], angle: -1.55 },
|
|
23369
|
+
() => {
|
|
23370
|
+
c.lathe("plain", 0, 0, BOWL_Z, SEAT_PROFILE, 15659248);
|
|
23371
|
+
c.b("plain", -0.165, seatY + 2e-3, -0.07, 0.165, seatY + 0.023, -0.03, 15659248);
|
|
23372
|
+
},
|
|
23373
|
+
{ label: "prompt.toilet_seat", at: [0.16, seatY + 0.02, 0.2] }
|
|
23374
|
+
);
|
|
23203
23375
|
c.part(
|
|
23204
23376
|
"lid",
|
|
23205
23377
|
[0, seatY + 0.025, -0.06],
|
|
@@ -23222,10 +23394,14 @@ var GameInteractablesHousehold = (() => {
|
|
|
23222
23394
|
{ label: "prompt.flush", at: false, noSweep: true }
|
|
23223
23395
|
);
|
|
23224
23396
|
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" });
|
|
23225
|
-
const
|
|
23397
|
+
const drain = { weir: 0.06, trap: 0.05, carries: 0.5, siphon: 3, prime: 0.02, refill: 20 };
|
|
23398
|
+
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, drain };
|
|
23226
23399
|
c.add("basins", bowl);
|
|
23227
|
-
c.add("
|
|
23228
|
-
|
|
23400
|
+
c.add("seats", { id: "seat", pose: "sit", pos: [0, round3(seatY + 0.025), 0.06], ry: 0, exit: [0, 0, round3(hd + 0.3)] });
|
|
23401
|
+
const parts2 = { cover: "lid", ring: "seat_ring", seat: "seat" };
|
|
23402
|
+
c.add("uses", { id: "pee", do: "relieve", basin: "bowl", kind: "urine", label: "use.relieve.urine", seconds: 8, ...parts2, stand: [0, 0, round3(BOWL_Z + 0.5)] });
|
|
23403
|
+
c.add("uses", { id: "poo", do: "relieve", basin: "bowl", kind: "feces", label: "use.relieve.feces", seconds: 12, ...parts2 });
|
|
23404
|
+
c.add("uses", { id: "plunge", do: "plunge", basin: "bowl", label: "use.plunge", tool: "plunger", seconds: 4, stand: [0, 0, round3(BOWL_Z + 0.55)] });
|
|
23229
23405
|
const rim = [0, 0.385, BOWL_Z];
|
|
23230
23406
|
c.add("emitters", { id: "flush_water", kind: "water", pos: rim, dir: [0, -1, 0], source: "flush", size: 0.08, ...streamInto(bowl, rim) });
|
|
23231
23407
|
c.interact("use_flush", [0, ty + th + 0.05, -hd + 0.1], { do: "toggle_fixture", fixture: "flush" }, "prompt.flush");
|