@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/README.md
CHANGED
|
@@ -200,12 +200,12 @@ Everything is plain JSON in `src/data` (bundled): `types.json`, `loot.json`, `lo
|
|
|
200
200
|
|
|
201
201
|
## Destruction
|
|
202
202
|
|
|
203
|
-
Every type has a default material and joint for its body (`spec.destruction`) and every movable part has its own (`part.destruction`: `material`, `joint`, `piece`), using the ids of `@adatechnology/game-destruction`. Damage, fire and blasts go through that SDK; the pack only tags. Doors are `hinge`, drawers `
|
|
203
|
+
Every type has a default material and joint for its body (`spec.destruction`) and every movable part has its own (`part.destruction`: `material`, `joint`, `piece`), using the ids of `@adatechnology/game-destruction`. Damage, fire and blasts go through that SDK; the pack only tags. Doors are `hinge`, drawers `slide`, MDF bodies `screw`, bricks `mortar`, welded metal `weld`. The `gas_bottle` body also has `explodes` and `contains` (pressurized gas, sized from the region's cylinder). Water fixtures hold no water themselves.
|
|
204
204
|
|
|
205
205
|
| Type | Body | Parts |
|
|
206
206
|
| --- | --- | --- |
|
|
207
207
|
| fridge, fridge_compact | steel, weld | doors steel, hinge |
|
|
208
|
-
| kitchen cabinets, pantry, wardrobe, dresser, nightstand, bathroom cabinet | mdf, screw | doors mdf, hinge; drawers mdf,
|
|
208
|
+
| kitchen cabinets, pantry, wardrobe, dresser, nightstand, bathroom cabinet | mdf, screw | doors mdf, hinge; drawers mdf, slide |
|
|
209
209
|
| stove | steel, weld | oven door steel, hinge; knobs plastic, clip |
|
|
210
210
|
| gas_bottle | steel, weld, explodes + contains gas | valve copper, screw |
|
|
211
211
|
| sink_kitchen, sink_bathroom, utility_sink | ceramic, glue | taps steel, screw; cabinet doors mdf, hinge |
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,13 @@ interface HouseholdTypeDef {
|
|
|
63
63
|
* two tonnes): a host that builds a physical body splits this mass over the pieces. Absent for what is built into the ground (a fireplace, a well).
|
|
64
64
|
*/
|
|
65
65
|
massKg?: number;
|
|
66
|
+
/**
|
|
67
|
+
* How its doors and lids sound worked by hand: a sound set by leaf part, `*` for all (`fridge`, `microwave`, `drawer`, `wood_door`, `metal_door`: the sets of
|
|
68
|
+
* game-audio `LEAF_FOLEY_SETS`). Absent: the host picks by the leaf's material. A host hands it on as `TestableItem.sounds`.
|
|
69
|
+
*/
|
|
70
|
+
sounds?: {
|
|
71
|
+
readonly leaves?: Readonly<Record<string, string>>;
|
|
72
|
+
};
|
|
66
73
|
}
|
|
67
74
|
interface HouseholdType extends HouseholdTypeDef {
|
|
68
75
|
/** Localized display name. */
|
|
@@ -135,6 +142,17 @@ declare const HOUSEHOLD_REGIONS: string[];
|
|
|
135
142
|
*/
|
|
136
143
|
declare function createHousehold(options?: HouseholdOptions): Household;
|
|
137
144
|
|
|
145
|
+
/** The gap a stove leaves to the wall behind it, metres: its gas hose runs in it, never through the wall. */
|
|
146
|
+
declare const STOVE_WALL_GAP = 0.04;
|
|
147
|
+
|
|
148
|
+
/** A 4x2 plate (portrait, as its box) in metres: it stands on the finished wall face, which the item's origin is just in front of (the plate's back sinks into the render by `sink`); the item's `y` is its base, so a point at height H gets `y = H - height / 2`. */
|
|
149
|
+
declare const WALL_PLATE: {
|
|
150
|
+
readonly width: 0.075;
|
|
151
|
+
readonly height: 0.12;
|
|
152
|
+
readonly thickness: 0.012;
|
|
153
|
+
readonly sink: 0.005;
|
|
154
|
+
};
|
|
155
|
+
|
|
138
156
|
interface RecordedPart {
|
|
139
157
|
id: string;
|
|
140
158
|
pivot: Vec3;
|
|
@@ -161,4 +179,4 @@ declare function motionPoint(p: Vec3, pivot: Vec3, m: Motion, t: number): Vec3;
|
|
|
161
179
|
/** Floor rect [x0, z0, x1, z1] covered by object-local points while the part goes from t = 0 to t = 1. */
|
|
162
180
|
declare function sweepOf(points: Vec3[], pivot: Vec3, m: Motion, margin?: number): [number, number, number, number];
|
|
163
181
|
|
|
164
|
-
export { type ContentsEntry, HOUSEHOLD_ITEM_IDS, HOUSEHOLD_REGIONS, HOUSEHOLD_TYPES, type Household, type HouseholdApi, type HouseholdGroup, type HouseholdItem, type HouseholdOptions, type HouseholdRecorder, type HouseholdType, type HouseholdTypeDef, type RecordedPart, type Region, cornersOf, createHousehold, createRecorder, motionPoint, sweepOf };
|
|
182
|
+
export { type ContentsEntry, HOUSEHOLD_ITEM_IDS, HOUSEHOLD_REGIONS, HOUSEHOLD_TYPES, type Household, type HouseholdApi, type HouseholdGroup, type HouseholdItem, type HouseholdOptions, type HouseholdRecorder, type HouseholdType, type HouseholdTypeDef, type RecordedPart, type Region, STOVE_WALL_GAP, WALL_PLATE, cornersOf, createHousehold, createRecorder, motionPoint, sweepOf };
|
package/dist/index.global.js
CHANGED
|
@@ -26,6 +26,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
26
26
|
HOUSEHOLD_ITEM_IDS: () => HOUSEHOLD_ITEM_IDS,
|
|
27
27
|
HOUSEHOLD_REGIONS: () => HOUSEHOLD_REGIONS,
|
|
28
28
|
HOUSEHOLD_TYPES: () => HOUSEHOLD_TYPES,
|
|
29
|
+
STOVE_WALL_GAP: () => STOVE_WALL_GAP,
|
|
30
|
+
WALL_PLATE: () => WALL_PLATE,
|
|
29
31
|
cornersOf: () => cornersOf,
|
|
30
32
|
createHousehold: () => createHousehold,
|
|
31
33
|
createRecorder: () => createRecorder,
|
|
@@ -34,6 +36,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
34
36
|
});
|
|
35
37
|
|
|
36
38
|
// ../game-contracts/dist/index.js
|
|
39
|
+
var DEFAULT_BLAST_IMPULSE = { bodyArea: 0.7, lift: 0.15, minSpeed: 0.3, tntPerJoule: 0.24 / 2e5 };
|
|
40
|
+
var DEFAULT_COST_ALLOCATION_BYTES = 1024 * 1024;
|
|
37
41
|
var STRUCTURE_ROLES = ["foundation", "column", "beam", "slab", "wall", "partition", "roof", "stair", "none"];
|
|
38
42
|
var BEARS = [true, false, "a_on_b", "b_on_a"];
|
|
39
43
|
var finite = (n) => typeof n === "number" && Number.isFinite(n);
|
|
@@ -136,6 +140,60 @@ var GameInteractablesHousehold = (() => {
|
|
|
136
140
|
}
|
|
137
141
|
return { ok: problems.length === 0, problems, warnings };
|
|
138
142
|
};
|
|
143
|
+
var DEFERRED_QUEUE_ID = {
|
|
144
|
+
DESTRUCTION_EVENTS: "destruction.events",
|
|
145
|
+
BREACH_PAINT: "floorplan.breach-paint",
|
|
146
|
+
BREACH_CUT: "floorplan.breach-cut",
|
|
147
|
+
AUDIO_VOICES: "audio.voices",
|
|
148
|
+
VEHICLE_CREASE: "vehicles.crease",
|
|
149
|
+
AUDIO_OCCLUSION: "audio.occlusion",
|
|
150
|
+
FLUID_FILM: "fluids.film",
|
|
151
|
+
VEHICLE_LOD_BATCH: "vehicles.lod-batch",
|
|
152
|
+
SETTLED_BATCH: "destruction.settled-batch",
|
|
153
|
+
STATIC_BATCH: "render.static-batch",
|
|
154
|
+
ANIMALS_STATIC_BATCH: "animals.static-batch",
|
|
155
|
+
CHARACTERS_STATIC_BATCH: "characters.static-batch",
|
|
156
|
+
HOUSE_SHADOW_BATCH: "floorplan.shadow-batch",
|
|
157
|
+
DESTRUCTION_PREFIT: "destruction.prefit"
|
|
158
|
+
};
|
|
159
|
+
var DEFERRED_PRIORITY = {
|
|
160
|
+
[DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS]: { priority: 300, phase: "present" },
|
|
161
|
+
// every frame: the walls cut since the last frame are painted once each, and a hole must show in the frame of the blast
|
|
162
|
+
[DEFERRED_QUEUE_ID.BREACH_CUT]: { priority: 260, phase: "present", minEveryFrames: 1 },
|
|
163
|
+
[DEFERRED_QUEUE_ID.BREACH_PAINT]: { priority: 250, phase: "present", minEveryFrames: 1 },
|
|
164
|
+
[DEFERRED_QUEUE_ID.AUDIO_VOICES]: { priority: 200, phase: "idle", reserveMs: 1 },
|
|
165
|
+
[DEFERRED_QUEUE_ID.AUDIO_OCCLUSION]: { priority: 190, phase: "idle", minEveryFrames: 8 },
|
|
166
|
+
[DEFERRED_QUEUE_ID.FLUID_FILM]: { priority: 120, phase: "idle", minEveryFrames: 2 },
|
|
167
|
+
[DEFERRED_QUEUE_ID.VEHICLE_CREASE]: { priority: 100, phase: "idle" },
|
|
168
|
+
[DEFERRED_QUEUE_ID.VEHICLE_LOD_BATCH]: { priority: 90, phase: "idle", minEveryFrames: 4 },
|
|
169
|
+
[DEFERRED_QUEUE_ID.SETTLED_BATCH]: { priority: 70, phase: "idle", minEveryFrames: 8 },
|
|
170
|
+
[DEFERRED_QUEUE_ID.STATIC_BATCH]: { priority: 60, phase: "idle", minEveryFrames: 8 },
|
|
171
|
+
[DEFERRED_QUEUE_ID.ANIMALS_STATIC_BATCH]: { priority: 60, phase: "idle", minEveryFrames: 8 },
|
|
172
|
+
[DEFERRED_QUEUE_ID.CHARACTERS_STATIC_BATCH]: { priority: 60, phase: "idle", minEveryFrames: 8 },
|
|
173
|
+
[DEFERRED_QUEUE_ID.HOUSE_SHADOW_BATCH]: { priority: 50, phase: "idle", minEveryFrames: 8 },
|
|
174
|
+
[DEFERRED_QUEUE_ID.DESTRUCTION_PREFIT]: { priority: 40, phase: "idle", minEveryFrames: 30 }
|
|
175
|
+
};
|
|
176
|
+
var MUST_DRAIN_QUEUE_IDS = /* @__PURE__ */ new Set([DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS, DEFERRED_QUEUE_ID.BREACH_CUT]);
|
|
177
|
+
var WARNED_KEY = /* @__PURE__ */ Symbol.for("@adatechnology/game-contracts.warned");
|
|
178
|
+
var warnedKeys = () => {
|
|
179
|
+
const holder = globalThis;
|
|
180
|
+
return holder[WARNED_KEY] ?? (holder[WARNED_KEY] = /* @__PURE__ */ new Set());
|
|
181
|
+
};
|
|
182
|
+
var isProduction = () => {
|
|
183
|
+
try {
|
|
184
|
+
return process.env.NODE_ENV === "production";
|
|
185
|
+
} catch {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
var isQuiet = () => globalThis.__GAME_KIT_QUIET__ === true;
|
|
190
|
+
var warnOnce = (key, message) => {
|
|
191
|
+
if (isQuiet() || isProduction()) return;
|
|
192
|
+
const seen = warnedKeys();
|
|
193
|
+
if (seen.has(key)) return;
|
|
194
|
+
seen.add(key);
|
|
195
|
+
console.warn(`[game-kit] ${message}`);
|
|
196
|
+
};
|
|
139
197
|
var UNSAFE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
140
198
|
var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
|
|
141
199
|
var deepMerge = (base, patch) => {
|
|
@@ -157,10 +215,13 @@ var GameInteractablesHousehold = (() => {
|
|
|
157
215
|
for (const [id, patch] of Object.entries(patches ?? {})) {
|
|
158
216
|
const entry = entries.get(id);
|
|
159
217
|
if (entry) entries.set(id, deepMerge(entry, patch));
|
|
218
|
+
else warnOnce(`registry.patch.${id}`, `patch for "${id}" ignored: no entry has that id`);
|
|
160
219
|
}
|
|
161
220
|
};
|
|
162
221
|
var removeIds = (entries, ids) => {
|
|
163
|
-
for (const id of ids ?? [])
|
|
222
|
+
for (const id of ids ?? []) {
|
|
223
|
+
if (!entries.delete(id)) warnOnce(`registry.remove.${id}`, `remove of "${id}" ignored: no entry has that id`);
|
|
224
|
+
}
|
|
164
225
|
};
|
|
165
226
|
var defineCategories = (defs, options = {}) => {
|
|
166
227
|
const problems = [];
|
|
@@ -224,6 +285,58 @@ var GameInteractablesHousehold = (() => {
|
|
|
224
285
|
};
|
|
225
286
|
return registry;
|
|
226
287
|
};
|
|
288
|
+
var SURFACE_IDS = ["concrete", "asphalt", "wood", "tile", "dirt", "grass", "gravel", "sand", "metal", "water", "glass", "carpet"];
|
|
289
|
+
var GAIT_IDS = ["walk", "run"];
|
|
290
|
+
var LANDING_IDS = ["light", "heavy"];
|
|
291
|
+
var BODY_SOUND_IDS = [
|
|
292
|
+
"jump",
|
|
293
|
+
"cloth_rustle",
|
|
294
|
+
"body_fall",
|
|
295
|
+
"fall_damage",
|
|
296
|
+
"player_hurt",
|
|
297
|
+
"player_breath_run",
|
|
298
|
+
"player_death",
|
|
299
|
+
"bite",
|
|
300
|
+
"grab",
|
|
301
|
+
"punch_swing",
|
|
302
|
+
"punch_hit_body",
|
|
303
|
+
"punch_hit_face",
|
|
304
|
+
"punch_hit_object",
|
|
305
|
+
"kick_swing",
|
|
306
|
+
"kick_hit",
|
|
307
|
+
"kick_hit_object",
|
|
308
|
+
"shove_two_hands",
|
|
309
|
+
"knife_swing",
|
|
310
|
+
"knife_stab",
|
|
311
|
+
"knife_slash",
|
|
312
|
+
"knife_hit_object",
|
|
313
|
+
"blunt_swing",
|
|
314
|
+
"blunt_hit",
|
|
315
|
+
"blunt_hit_object",
|
|
316
|
+
"axe_swing",
|
|
317
|
+
"axe_chop",
|
|
318
|
+
"axe_hit_object"
|
|
319
|
+
];
|
|
320
|
+
var footstepSoundId = (surface, gait) => `footstep_${surface}_${gait}`;
|
|
321
|
+
var FOOTSTEP_SOUND_IDS = SURFACE_IDS.flatMap((surface) => GAIT_IDS.map((gait) => footstepSoundId(surface, gait)));
|
|
322
|
+
var LAND_SOUND_IDS = SURFACE_IDS.flatMap((surface) => LANDING_IDS.map((landing) => `land_${surface}_${landing}`));
|
|
323
|
+
var BODY_FOLEY_IDS = [...FOOTSTEP_SOUND_IDS, ...LAND_SOUND_IDS, ...BODY_SOUND_IDS];
|
|
324
|
+
var WORKER_KIND_ID = {
|
|
325
|
+
GROUND_TILES: "destruction.ground-tiles",
|
|
326
|
+
CROWD_PHYSICS: "crowd.physics",
|
|
327
|
+
PIECE_BOXES: "destruction.piece-boxes",
|
|
328
|
+
STATIC_COLLIDERS: "destruction.static-colliders",
|
|
329
|
+
SHAPES_GENERATE: "shapes.generate",
|
|
330
|
+
WORLD_REGION: "world.region"
|
|
331
|
+
};
|
|
332
|
+
var WORKER_KIND_DEFAULTS = {
|
|
333
|
+
[WORKER_KIND_ID.GROUND_TILES]: { lane: "sim", priority: 300, latencyFrames: 2, late: "sync" },
|
|
334
|
+
[WORKER_KIND_ID.CROWD_PHYSICS]: { lane: "sim", priority: 250, latencyFrames: 1, late: "sync" },
|
|
335
|
+
[WORKER_KIND_ID.PIECE_BOXES]: { lane: "sim", priority: 200, latencyFrames: 2, late: "sync" },
|
|
336
|
+
[WORKER_KIND_ID.STATIC_COLLIDERS]: { lane: "build", priority: 150, late: "sync" },
|
|
337
|
+
[WORKER_KIND_ID.SHAPES_GENERATE]: { lane: "build", priority: 100, late: "sync" },
|
|
338
|
+
[WORKER_KIND_ID.WORLD_REGION]: { lane: "background", priority: 10, latencyFrames: 10, late: "drop" }
|
|
339
|
+
};
|
|
227
340
|
|
|
228
341
|
// ../game-items-goods/dist/index.js
|
|
229
342
|
var FLOORPLAN_POOL_KEYS = {
|
|
@@ -1324,6 +1437,32 @@ var GameInteractablesHousehold = (() => {
|
|
|
1324
1437
|
isTakeable: true,
|
|
1325
1438
|
weight: 0.8,
|
|
1326
1439
|
isSupply: true
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
type: "katana",
|
|
1443
|
+
item: "katana",
|
|
1444
|
+
name: "Katana",
|
|
1445
|
+
qty: [
|
|
1446
|
+
1,
|
|
1447
|
+
1
|
|
1448
|
+
],
|
|
1449
|
+
viewerCategory: "arma_improvisada",
|
|
1450
|
+
isTakeable: true,
|
|
1451
|
+
weight: 0.03,
|
|
1452
|
+
isSupply: false
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
type: "soco_ingles",
|
|
1456
|
+
item: "brass_knuckles",
|
|
1457
|
+
name: "Soco ingl\xEAs",
|
|
1458
|
+
qty: [
|
|
1459
|
+
1,
|
|
1460
|
+
1
|
|
1461
|
+
],
|
|
1462
|
+
viewerCategory: "arma_improvisada",
|
|
1463
|
+
isTakeable: true,
|
|
1464
|
+
weight: 0.03,
|
|
1465
|
+
isSupply: false
|
|
1327
1466
|
}
|
|
1328
1467
|
],
|
|
1329
1468
|
comoda: [
|
|
@@ -1404,6 +1543,32 @@ var GameInteractablesHousehold = (() => {
|
|
|
1404
1543
|
isTakeable: true,
|
|
1405
1544
|
weight: 0.7,
|
|
1406
1545
|
isSupply: true
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
type: "faca_kabar",
|
|
1549
|
+
item: "kabar",
|
|
1550
|
+
name: "Faca KA-BAR",
|
|
1551
|
+
qty: [
|
|
1552
|
+
1,
|
|
1553
|
+
1
|
|
1554
|
+
],
|
|
1555
|
+
viewerCategory: "arma_improvisada",
|
|
1556
|
+
isTakeable: true,
|
|
1557
|
+
weight: 0.06,
|
|
1558
|
+
isSupply: false
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
type: "soco_ingles",
|
|
1562
|
+
item: "brass_knuckles",
|
|
1563
|
+
name: "Soco ingl\xEAs",
|
|
1564
|
+
qty: [
|
|
1565
|
+
1,
|
|
1566
|
+
1
|
|
1567
|
+
],
|
|
1568
|
+
viewerCategory: "arma_improvisada",
|
|
1569
|
+
isTakeable: true,
|
|
1570
|
+
weight: 0.03,
|
|
1571
|
+
isSupply: false
|
|
1407
1572
|
}
|
|
1408
1573
|
],
|
|
1409
1574
|
criado: [
|
|
@@ -1471,6 +1636,32 @@ var GameInteractablesHousehold = (() => {
|
|
|
1471
1636
|
isTakeable: true,
|
|
1472
1637
|
weight: 0.7,
|
|
1473
1638
|
isSupply: true
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
type: "faca_kabar",
|
|
1642
|
+
item: "kabar",
|
|
1643
|
+
name: "Faca KA-BAR",
|
|
1644
|
+
qty: [
|
|
1645
|
+
1,
|
|
1646
|
+
1
|
|
1647
|
+
],
|
|
1648
|
+
viewerCategory: "arma_improvisada",
|
|
1649
|
+
isTakeable: true,
|
|
1650
|
+
weight: 0.06,
|
|
1651
|
+
isSupply: false
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
type: "soco_ingles",
|
|
1655
|
+
item: "brass_knuckles",
|
|
1656
|
+
name: "Soco ingl\xEAs",
|
|
1657
|
+
qty: [
|
|
1658
|
+
1,
|
|
1659
|
+
1
|
|
1660
|
+
],
|
|
1661
|
+
viewerCategory: "arma_improvisada",
|
|
1662
|
+
isTakeable: true,
|
|
1663
|
+
weight: 0.03,
|
|
1664
|
+
isSupply: false
|
|
1474
1665
|
}
|
|
1475
1666
|
],
|
|
1476
1667
|
gaveteiro: [
|
|
@@ -1927,6 +2118,19 @@ var GameInteractablesHousehold = (() => {
|
|
|
1927
2118
|
isTakeable: true,
|
|
1928
2119
|
weight: 1,
|
|
1929
2120
|
isSupply: true
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
type: "faca_kabar",
|
|
2124
|
+
item: "kabar",
|
|
2125
|
+
name: "Faca KA-BAR",
|
|
2126
|
+
qty: [
|
|
2127
|
+
1,
|
|
2128
|
+
1
|
|
2129
|
+
],
|
|
2130
|
+
viewerCategory: "arma_improvisada",
|
|
2131
|
+
isTakeable: true,
|
|
2132
|
+
weight: 0.06,
|
|
2133
|
+
isSupply: false
|
|
1930
2134
|
}
|
|
1931
2135
|
],
|
|
1932
2136
|
estante_ferr: [
|
|
@@ -1994,6 +2198,19 @@ var GameInteractablesHousehold = (() => {
|
|
|
1994
2198
|
isTakeable: true,
|
|
1995
2199
|
weight: 1.5,
|
|
1996
2200
|
isSupply: true
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
type: "faca_kabar",
|
|
2204
|
+
item: "kabar",
|
|
2205
|
+
name: "Faca KA-BAR",
|
|
2206
|
+
qty: [
|
|
2207
|
+
1,
|
|
2208
|
+
1
|
|
2209
|
+
],
|
|
2210
|
+
viewerCategory: "arma_improvisada",
|
|
2211
|
+
isTakeable: true,
|
|
2212
|
+
weight: 0.06,
|
|
2213
|
+
isSupply: false
|
|
1997
2214
|
}
|
|
1998
2215
|
],
|
|
1999
2216
|
correio: [
|
|
@@ -4947,9 +5164,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
4947
5164
|
category: "tools",
|
|
4948
5165
|
kind: "tool",
|
|
4949
5166
|
size: [
|
|
4950
|
-
0.
|
|
5167
|
+
0.15985,
|
|
4951
5168
|
0.75,
|
|
4952
|
-
0.
|
|
5169
|
+
0.03054
|
|
4953
5170
|
],
|
|
4954
5171
|
weight: 1.5,
|
|
4955
5172
|
stack: 1,
|
|
@@ -5262,6 +5479,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
5262
5479
|
kind: "uses",
|
|
5263
5480
|
amount: 400
|
|
5264
5481
|
},
|
|
5482
|
+
weapon: "shovel",
|
|
5265
5483
|
finds: {
|
|
5266
5484
|
places: [
|
|
5267
5485
|
"farm",
|
|
@@ -12774,6 +12992,88 @@ var GameInteractablesHousehold = (() => {
|
|
|
12774
12992
|
"protection",
|
|
12775
12993
|
"parts"
|
|
12776
12994
|
]
|
|
12995
|
+
},
|
|
12996
|
+
{
|
|
12997
|
+
id: "kabar",
|
|
12998
|
+
category: "melee",
|
|
12999
|
+
kind: "melee",
|
|
13000
|
+
size: [
|
|
13001
|
+
0.302,
|
|
13002
|
+
0.0383,
|
|
13003
|
+
0.0563
|
|
13004
|
+
],
|
|
13005
|
+
weight: 0.32,
|
|
13006
|
+
stack: 1,
|
|
13007
|
+
shape: "tool",
|
|
13008
|
+
color: 2895667,
|
|
13009
|
+
rarity: "uncommon",
|
|
13010
|
+
finds: {
|
|
13011
|
+
places: [
|
|
13012
|
+
"house",
|
|
13013
|
+
"military_base",
|
|
13014
|
+
"police_station",
|
|
13015
|
+
"gun_shop"
|
|
13016
|
+
]
|
|
13017
|
+
},
|
|
13018
|
+
durability: {
|
|
13019
|
+
kind: "hits",
|
|
13020
|
+
amount: 200
|
|
13021
|
+
},
|
|
13022
|
+
weapon: "kabar",
|
|
13023
|
+
model: "kabar"
|
|
13024
|
+
},
|
|
13025
|
+
{
|
|
13026
|
+
id: "katana",
|
|
13027
|
+
category: "melee",
|
|
13028
|
+
kind: "melee",
|
|
13029
|
+
size: [
|
|
13030
|
+
0.98,
|
|
13031
|
+
0.0788,
|
|
13032
|
+
0.08
|
|
13033
|
+
],
|
|
13034
|
+
weight: 1.1,
|
|
13035
|
+
stack: 1,
|
|
13036
|
+
shape: "tool",
|
|
13037
|
+
color: 9080208,
|
|
13038
|
+
rarity: "rare",
|
|
13039
|
+
finds: {
|
|
13040
|
+
places: [
|
|
13041
|
+
"house"
|
|
13042
|
+
]
|
|
13043
|
+
},
|
|
13044
|
+
durability: {
|
|
13045
|
+
kind: "hits",
|
|
13046
|
+
amount: 250
|
|
13047
|
+
},
|
|
13048
|
+
weapon: "katana",
|
|
13049
|
+
model: "katana"
|
|
13050
|
+
},
|
|
13051
|
+
{
|
|
13052
|
+
id: "brass_knuckles",
|
|
13053
|
+
category: "melee",
|
|
13054
|
+
kind: "melee",
|
|
13055
|
+
size: [
|
|
13056
|
+
0.12,
|
|
13057
|
+
0.0127,
|
|
13058
|
+
0.051
|
|
13059
|
+
],
|
|
13060
|
+
weight: 0.15,
|
|
13061
|
+
stack: 1,
|
|
13062
|
+
shape: "tool",
|
|
13063
|
+
color: 12095802,
|
|
13064
|
+
rarity: "rare",
|
|
13065
|
+
finds: {
|
|
13066
|
+
places: [
|
|
13067
|
+
"house",
|
|
13068
|
+
"police_station"
|
|
13069
|
+
]
|
|
13070
|
+
},
|
|
13071
|
+
durability: {
|
|
13072
|
+
kind: "hits",
|
|
13073
|
+
amount: 500
|
|
13074
|
+
},
|
|
13075
|
+
weapon: "brass_knuckles",
|
|
13076
|
+
model: "brass_knuckles"
|
|
12777
13077
|
}
|
|
12778
13078
|
];
|
|
12779
13079
|
var kinds_default = [
|
|
@@ -16128,6 +16428,21 @@ var GameInteractablesHousehold = (() => {
|
|
|
16128
16428
|
vc3: [
|
|
16129
16429
|
"oculos"
|
|
16130
16430
|
]
|
|
16431
|
+
},
|
|
16432
|
+
kabar: {
|
|
16433
|
+
created: true,
|
|
16434
|
+
idSource: "decision",
|
|
16435
|
+
sizeSource: "REF"
|
|
16436
|
+
},
|
|
16437
|
+
katana: {
|
|
16438
|
+
created: true,
|
|
16439
|
+
idSource: "decision",
|
|
16440
|
+
sizeSource: "REF"
|
|
16441
|
+
},
|
|
16442
|
+
brass_knuckles: {
|
|
16443
|
+
created: true,
|
|
16444
|
+
idSource: "decision",
|
|
16445
|
+
sizeSource: "REF"
|
|
16131
16446
|
}
|
|
16132
16447
|
};
|
|
16133
16448
|
var recipes_default = [
|
|
@@ -17632,6 +17947,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
17632
17947
|
"item.sharpening_stone": "Sharpening stone",
|
|
17633
17948
|
"item.knife": "Kitchen knife",
|
|
17634
17949
|
"item.tactical_knife": "Tactical knife",
|
|
17950
|
+
"item.kabar": "KA-BAR combat knife",
|
|
17951
|
+
"item.katana": "Katana",
|
|
17952
|
+
"item.brass_knuckles": "Brass knuckles",
|
|
17635
17953
|
"item.machete": "Machete",
|
|
17636
17954
|
"item.meat_cleaver": "Butcher's cleaver",
|
|
17637
17955
|
"item.hatchet": "Hatchet",
|
|
@@ -18361,6 +18679,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
18361
18679
|
"item.wine_glass": "Ta\xE7a de vinho",
|
|
18362
18680
|
"item.book": "Livro",
|
|
18363
18681
|
"item.eyeglasses": "\xD3culos",
|
|
18682
|
+
"item.kabar": "Faca KA-BAR",
|
|
18683
|
+
"item.katana": "Katana",
|
|
18684
|
+
"item.brass_knuckles": "Soco ingl\xEAs",
|
|
18364
18685
|
"category.food": "Comida",
|
|
18365
18686
|
"category.drink": "Bebida",
|
|
18366
18687
|
"category.medical": "Medicina e primeiros socorros",
|
|
@@ -18545,7 +18866,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
18545
18866
|
|
|
18546
18867
|
// src/destruction.ts
|
|
18547
18868
|
var door = (material, joint = "hinge", piece2 = "door") => ({ material, joint, piece: piece2 });
|
|
18548
|
-
var drawer = { material: "mdf", joint: "
|
|
18869
|
+
var drawer = { material: "mdf", joint: "slide", piece: "drawer" };
|
|
18549
18870
|
var knob = { material: "plastic", joint: "clip", piece: "knob" };
|
|
18550
18871
|
var tap = { material: "steel", joint: "screw", piece: "handle" };
|
|
18551
18872
|
var mdfBody = { material: "mdf", joint: "screw" };
|
|
@@ -20324,7 +20645,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
20324
20645
|
y: 0,
|
|
20325
20646
|
solid: true,
|
|
20326
20647
|
pushable: true,
|
|
20327
|
-
massKg: 70
|
|
20648
|
+
massKg: 70,
|
|
20649
|
+
sounds: {
|
|
20650
|
+
leaves: {
|
|
20651
|
+
"*": "fridge"
|
|
20652
|
+
}
|
|
20653
|
+
}
|
|
20328
20654
|
},
|
|
20329
20655
|
{
|
|
20330
20656
|
id: "fridge_compact",
|
|
@@ -20335,7 +20661,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
20335
20661
|
y: 0,
|
|
20336
20662
|
solid: true,
|
|
20337
20663
|
pushable: true,
|
|
20338
|
-
massKg: 30
|
|
20664
|
+
massKg: 30,
|
|
20665
|
+
sounds: {
|
|
20666
|
+
leaves: {
|
|
20667
|
+
"*": "fridge"
|
|
20668
|
+
}
|
|
20669
|
+
}
|
|
20339
20670
|
},
|
|
20340
20671
|
{
|
|
20341
20672
|
id: "kitchen_cabinet_base",
|
|
@@ -20486,9 +20817,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
20486
20817
|
{
|
|
20487
20818
|
id: "wall_socket",
|
|
20488
20819
|
group: "electrical",
|
|
20489
|
-
w: 0.
|
|
20820
|
+
w: 0.075,
|
|
20490
20821
|
d: 0.03,
|
|
20491
|
-
h: 0.
|
|
20822
|
+
h: 0.12,
|
|
20492
20823
|
y: 0.3,
|
|
20493
20824
|
solid: false,
|
|
20494
20825
|
massKg: 0.05
|
|
@@ -20496,9 +20827,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
20496
20827
|
{
|
|
20497
20828
|
id: "wall_switch",
|
|
20498
20829
|
group: "electrical",
|
|
20499
|
-
w: 0.
|
|
20830
|
+
w: 0.075,
|
|
20500
20831
|
d: 0.03,
|
|
20501
|
-
h: 0.
|
|
20832
|
+
h: 0.12,
|
|
20502
20833
|
y: 1.2,
|
|
20503
20834
|
solid: false,
|
|
20504
20835
|
massKg: 0.05
|
|
@@ -20561,7 +20892,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
20561
20892
|
h: 0.3,
|
|
20562
20893
|
y: 0.9,
|
|
20563
20894
|
solid: false,
|
|
20564
|
-
massKg: 14
|
|
20895
|
+
massKg: 14,
|
|
20896
|
+
sounds: {
|
|
20897
|
+
leaves: {
|
|
20898
|
+
"*": "microwave"
|
|
20899
|
+
}
|
|
20900
|
+
}
|
|
20565
20901
|
},
|
|
20566
20902
|
{
|
|
20567
20903
|
id: "washing_machine",
|
|
@@ -21020,13 +21356,14 @@ var GameInteractablesHousehold = (() => {
|
|
|
21020
21356
|
}
|
|
21021
21357
|
|
|
21022
21358
|
// src/builders/electrical.ts
|
|
21359
|
+
var WALL_PLATE = { width: 0.075, height: 0.12, thickness: 0.012, sink: 5e-3 };
|
|
21023
21360
|
function wallSocket(c) {
|
|
21024
|
-
const {
|
|
21361
|
+
const { w, h, y0 } = c;
|
|
21025
21362
|
const cx = 0;
|
|
21026
21363
|
const cy = y0 + h / 2;
|
|
21027
|
-
const zp = -
|
|
21364
|
+
const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
|
|
21028
21365
|
const plate = c.main(15856110);
|
|
21029
|
-
c.b("plain", -w / 2, y0, -
|
|
21366
|
+
c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
|
|
21030
21367
|
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));
|
|
21031
21368
|
c.rod("plain", "z", cx, cy, zp + 35e-4, 0.0285, 15e-4, shade(plate, 0.92));
|
|
21032
21369
|
const dark = 1842206;
|
|
@@ -21045,11 +21382,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
21045
21382
|
c.spec.colliders = [];
|
|
21046
21383
|
}
|
|
21047
21384
|
function wallSwitch(c) {
|
|
21048
|
-
const {
|
|
21385
|
+
const { w, h, y0 } = c;
|
|
21049
21386
|
const cy = y0 + h / 2;
|
|
21050
|
-
const zp = -
|
|
21387
|
+
const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
|
|
21051
21388
|
const plate = c.main(15856110);
|
|
21052
|
-
c.b("plain", -w / 2, y0, -
|
|
21389
|
+
c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
|
|
21053
21390
|
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));
|
|
21054
21391
|
c.b("plain", -0.018, cy - 0.032, zp + 3e-3, 0.018, cy + 0.032, zp + 6e-3, shade(plate, 0.85));
|
|
21055
21392
|
c.part(
|
|
@@ -21355,6 +21692,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21355
21692
|
}
|
|
21356
21693
|
|
|
21357
21694
|
// src/builders/kitchen.ts
|
|
21695
|
+
var STOVE_WALL_GAP = 0.04;
|
|
21358
21696
|
var STEEL = 11843772;
|
|
21359
21697
|
var CHROME = 13817562;
|
|
21360
21698
|
function tap2(c, x, y, z, id, partId) {
|
|
@@ -21460,7 +21798,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21460
21798
|
id: "gas_hose",
|
|
21461
21799
|
kind: "cable",
|
|
21462
21800
|
radius: 8e-3,
|
|
21463
|
-
points: [[round3(hw - 0.08), 0.18, -hd], [round3(hw - 0.08), 0.
|
|
21801
|
+
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)]]
|
|
21464
21802
|
});
|
|
21465
21803
|
c.add("damage", { target: "oven_door", kind: "glass", hp: 30 });
|
|
21466
21804
|
}
|