@adatechnology/game-interactables-household 0.5.0 → 0.7.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 +13 -2
- package/dist/index.global.js +322 -17
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +70 -12
- 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
|
@@ -33,7 +33,7 @@ interface HouseholdItem extends PropItem {
|
|
|
33
33
|
id: string;
|
|
34
34
|
label?: string;
|
|
35
35
|
}>;
|
|
36
|
-
/** `conduit_run`: polyline in object-local coordinates. */
|
|
36
|
+
/** `conduit_run`: polyline in object-local coordinates. `service_mast`: the axis of the mast's pipe, foot to the weatherhead's open end (default: a straight mast of the item's height bent over the top). */
|
|
37
37
|
points?: Vec3[];
|
|
38
38
|
/** `service_entrance`: where the drop wire ends (the house attachment point), object-local. */
|
|
39
39
|
house?: Vec3;
|
|
@@ -142,6 +142,17 @@ declare const HOUSEHOLD_REGIONS: string[];
|
|
|
142
142
|
*/
|
|
143
143
|
declare function createHousehold(options?: HouseholdOptions): Household;
|
|
144
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
|
+
|
|
145
156
|
interface RecordedPart {
|
|
146
157
|
id: string;
|
|
147
158
|
pivot: Vec3;
|
|
@@ -168,4 +179,4 @@ declare function motionPoint(p: Vec3, pivot: Vec3, m: Motion, t: number): Vec3;
|
|
|
168
179
|
/** Floor rect [x0, z0, x1, z1] covered by object-local points while the part goes from t = 0 to t = 1. */
|
|
169
180
|
declare function sweepOf(points: Vec3[], pivot: Vec3, m: Motion, margin?: number): [number, number, number, number];
|
|
170
181
|
|
|
171
|
-
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,7 @@ 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 };
|
|
37
40
|
var DEFAULT_COST_ALLOCATION_BYTES = 1024 * 1024;
|
|
38
41
|
var STRUCTURE_ROLES = ["foundation", "column", "beam", "slab", "wall", "partition", "roof", "stair", "none"];
|
|
39
42
|
var BEARS = [true, false, "a_on_b", "b_on_a"];
|
|
@@ -140,15 +143,37 @@ var GameInteractablesHousehold = (() => {
|
|
|
140
143
|
var DEFERRED_QUEUE_ID = {
|
|
141
144
|
DESTRUCTION_EVENTS: "destruction.events",
|
|
142
145
|
BREACH_PAINT: "floorplan.breach-paint",
|
|
146
|
+
BREACH_CUT: "floorplan.breach-cut",
|
|
143
147
|
AUDIO_VOICES: "audio.voices",
|
|
144
|
-
VEHICLE_CREASE: "vehicles.crease"
|
|
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"
|
|
145
158
|
};
|
|
146
159
|
var DEFERRED_PRIORITY = {
|
|
147
160
|
[DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS]: { priority: 300, phase: "present" },
|
|
148
|
-
|
|
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 },
|
|
149
164
|
[DEFERRED_QUEUE_ID.AUDIO_VOICES]: { priority: 200, phase: "idle", reserveMs: 1 },
|
|
150
|
-
[DEFERRED_QUEUE_ID.
|
|
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 }
|
|
151
175
|
};
|
|
176
|
+
var MUST_DRAIN_QUEUE_IDS = /* @__PURE__ */ new Set([DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS, DEFERRED_QUEUE_ID.BREACH_CUT]);
|
|
152
177
|
var WARNED_KEY = /* @__PURE__ */ Symbol.for("@adatechnology/game-contracts.warned");
|
|
153
178
|
var warnedKeys = () => {
|
|
154
179
|
const holder = globalThis;
|
|
@@ -296,6 +321,22 @@ var GameInteractablesHousehold = (() => {
|
|
|
296
321
|
var FOOTSTEP_SOUND_IDS = SURFACE_IDS.flatMap((surface) => GAIT_IDS.map((gait) => footstepSoundId(surface, gait)));
|
|
297
322
|
var LAND_SOUND_IDS = SURFACE_IDS.flatMap((surface) => LANDING_IDS.map((landing) => `land_${surface}_${landing}`));
|
|
298
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
|
+
};
|
|
299
340
|
|
|
300
341
|
// ../game-items-goods/dist/index.js
|
|
301
342
|
var FLOORPLAN_POOL_KEYS = {
|
|
@@ -1396,6 +1437,32 @@ var GameInteractablesHousehold = (() => {
|
|
|
1396
1437
|
isTakeable: true,
|
|
1397
1438
|
weight: 0.8,
|
|
1398
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
|
|
1399
1466
|
}
|
|
1400
1467
|
],
|
|
1401
1468
|
comoda: [
|
|
@@ -1476,6 +1543,32 @@ var GameInteractablesHousehold = (() => {
|
|
|
1476
1543
|
isTakeable: true,
|
|
1477
1544
|
weight: 0.7,
|
|
1478
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
|
|
1479
1572
|
}
|
|
1480
1573
|
],
|
|
1481
1574
|
criado: [
|
|
@@ -1543,6 +1636,32 @@ var GameInteractablesHousehold = (() => {
|
|
|
1543
1636
|
isTakeable: true,
|
|
1544
1637
|
weight: 0.7,
|
|
1545
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
|
|
1546
1665
|
}
|
|
1547
1666
|
],
|
|
1548
1667
|
gaveteiro: [
|
|
@@ -1999,6 +2118,19 @@ var GameInteractablesHousehold = (() => {
|
|
|
1999
2118
|
isTakeable: true,
|
|
2000
2119
|
weight: 1,
|
|
2001
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
|
|
2002
2134
|
}
|
|
2003
2135
|
],
|
|
2004
2136
|
estante_ferr: [
|
|
@@ -2066,6 +2198,19 @@ var GameInteractablesHousehold = (() => {
|
|
|
2066
2198
|
isTakeable: true,
|
|
2067
2199
|
weight: 1.5,
|
|
2068
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
|
|
2069
2214
|
}
|
|
2070
2215
|
],
|
|
2071
2216
|
correio: [
|
|
@@ -5019,9 +5164,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
5019
5164
|
category: "tools",
|
|
5020
5165
|
kind: "tool",
|
|
5021
5166
|
size: [
|
|
5022
|
-
0.
|
|
5167
|
+
0.15985,
|
|
5023
5168
|
0.75,
|
|
5024
|
-
0.
|
|
5169
|
+
0.03054
|
|
5025
5170
|
],
|
|
5026
5171
|
weight: 1.5,
|
|
5027
5172
|
stack: 1,
|
|
@@ -5334,6 +5479,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
5334
5479
|
kind: "uses",
|
|
5335
5480
|
amount: 400
|
|
5336
5481
|
},
|
|
5482
|
+
weapon: "shovel",
|
|
5337
5483
|
finds: {
|
|
5338
5484
|
places: [
|
|
5339
5485
|
"farm",
|
|
@@ -12846,6 +12992,88 @@ var GameInteractablesHousehold = (() => {
|
|
|
12846
12992
|
"protection",
|
|
12847
12993
|
"parts"
|
|
12848
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"
|
|
12849
13077
|
}
|
|
12850
13078
|
];
|
|
12851
13079
|
var kinds_default = [
|
|
@@ -16200,6 +16428,21 @@ var GameInteractablesHousehold = (() => {
|
|
|
16200
16428
|
vc3: [
|
|
16201
16429
|
"oculos"
|
|
16202
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"
|
|
16203
16446
|
}
|
|
16204
16447
|
};
|
|
16205
16448
|
var recipes_default = [
|
|
@@ -17704,6 +17947,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
17704
17947
|
"item.sharpening_stone": "Sharpening stone",
|
|
17705
17948
|
"item.knife": "Kitchen knife",
|
|
17706
17949
|
"item.tactical_knife": "Tactical knife",
|
|
17950
|
+
"item.kabar": "KA-BAR combat knife",
|
|
17951
|
+
"item.katana": "Katana",
|
|
17952
|
+
"item.brass_knuckles": "Brass knuckles",
|
|
17707
17953
|
"item.machete": "Machete",
|
|
17708
17954
|
"item.meat_cleaver": "Butcher's cleaver",
|
|
17709
17955
|
"item.hatchet": "Hatchet",
|
|
@@ -18433,6 +18679,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
18433
18679
|
"item.wine_glass": "Ta\xE7a de vinho",
|
|
18434
18680
|
"item.book": "Livro",
|
|
18435
18681
|
"item.eyeglasses": "\xD3culos",
|
|
18682
|
+
"item.kabar": "Faca KA-BAR",
|
|
18683
|
+
"item.katana": "Katana",
|
|
18684
|
+
"item.brass_knuckles": "Soco ingl\xEAs",
|
|
18436
18685
|
"category.food": "Comida",
|
|
18437
18686
|
"category.drink": "Bebida",
|
|
18438
18687
|
"category.medical": "Medicina e primeiros socorros",
|
|
@@ -18617,7 +18866,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
18617
18866
|
|
|
18618
18867
|
// src/destruction.ts
|
|
18619
18868
|
var door = (material, joint = "hinge", piece2 = "door") => ({ material, joint, piece: piece2 });
|
|
18620
|
-
var drawer = { material: "mdf", joint: "
|
|
18869
|
+
var drawer = { material: "mdf", joint: "slide", piece: "drawer" };
|
|
18621
18870
|
var knob = { material: "plastic", joint: "clip", piece: "knob" };
|
|
18622
18871
|
var tap = { material: "steel", joint: "screw", piece: "handle" };
|
|
18623
18872
|
var mdfBody = { material: "mdf", joint: "screw" };
|
|
@@ -18652,6 +18901,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
18652
18901
|
wall_switch: { body: { material: "plastic", joint: "screw" }, parts: [["rocker", { material: "plastic", joint: "clip", piece: "rocker" }]] },
|
|
18653
18902
|
service_entrance: { body: { material: "steel", joint: "bolt" }, parts: [["meter_door", door("steel")]] },
|
|
18654
18903
|
conduit_run: { body: { material: "plastic", joint: "clip" }, parts: [] },
|
|
18904
|
+
service_mast: { body: { material: "steel", joint: "clip" }, parts: [] },
|
|
18655
18905
|
electrical_panel: {
|
|
18656
18906
|
body: { material: "steel", joint: "screw" },
|
|
18657
18907
|
parts: [[/^breaker/, { material: "plastic", joint: "clip", piece: "breaker" }], ["door", door("steel")]]
|
|
@@ -19845,6 +20095,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19845
20095
|
"type.wall_socket": "Wall socket",
|
|
19846
20096
|
"type.wall_switch": "Light switch",
|
|
19847
20097
|
"type.service_entrance": "Service entrance pole",
|
|
20098
|
+
"type.service_mast": "Service mast (pontalete)",
|
|
19848
20099
|
"type.conduit_run": "Conduit run",
|
|
19849
20100
|
"type.tv": "Television",
|
|
19850
20101
|
"type.microwave": "Microwave",
|
|
@@ -20089,6 +20340,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
20089
20340
|
"type.wall_socket": "Tomada",
|
|
20090
20341
|
"type.wall_switch": "Interruptor",
|
|
20091
20342
|
"type.service_entrance": "Poste de entrada de energia",
|
|
20343
|
+
"type.service_mast": "Pontalete de entrada de energia",
|
|
20092
20344
|
"type.conduit_run": "Eletroduto",
|
|
20093
20345
|
"type.tv": "Televis\xE3o",
|
|
20094
20346
|
"type.microwave": "Micro-ondas",
|
|
@@ -20568,9 +20820,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
20568
20820
|
{
|
|
20569
20821
|
id: "wall_socket",
|
|
20570
20822
|
group: "electrical",
|
|
20571
|
-
w: 0.
|
|
20823
|
+
w: 0.075,
|
|
20572
20824
|
d: 0.03,
|
|
20573
|
-
h: 0.
|
|
20825
|
+
h: 0.12,
|
|
20574
20826
|
y: 0.3,
|
|
20575
20827
|
solid: false,
|
|
20576
20828
|
massKg: 0.05
|
|
@@ -20578,9 +20830,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
20578
20830
|
{
|
|
20579
20831
|
id: "wall_switch",
|
|
20580
20832
|
group: "electrical",
|
|
20581
|
-
w: 0.
|
|
20833
|
+
w: 0.075,
|
|
20582
20834
|
d: 0.03,
|
|
20583
|
-
h: 0.
|
|
20835
|
+
h: 0.12,
|
|
20584
20836
|
y: 1.2,
|
|
20585
20837
|
solid: false,
|
|
20586
20838
|
massKg: 0.05
|
|
@@ -20595,6 +20847,16 @@ var GameInteractablesHousehold = (() => {
|
|
|
20595
20847
|
solid: true,
|
|
20596
20848
|
massKg: 60
|
|
20597
20849
|
},
|
|
20850
|
+
{
|
|
20851
|
+
id: "service_mast",
|
|
20852
|
+
group: "electrical",
|
|
20853
|
+
w: 0.1,
|
|
20854
|
+
d: 0.25,
|
|
20855
|
+
h: 4.4,
|
|
20856
|
+
y: 0,
|
|
20857
|
+
solid: true,
|
|
20858
|
+
massKg: 14
|
|
20859
|
+
},
|
|
20598
20860
|
{
|
|
20599
20861
|
id: "electrical_panel",
|
|
20600
20862
|
group: "electrical",
|
|
@@ -21107,13 +21369,14 @@ var GameInteractablesHousehold = (() => {
|
|
|
21107
21369
|
}
|
|
21108
21370
|
|
|
21109
21371
|
// src/builders/electrical.ts
|
|
21372
|
+
var WALL_PLATE = { width: 0.075, height: 0.12, thickness: 0.012, sink: 5e-3 };
|
|
21110
21373
|
function wallSocket(c) {
|
|
21111
|
-
const {
|
|
21374
|
+
const { w, h, y0 } = c;
|
|
21112
21375
|
const cx = 0;
|
|
21113
21376
|
const cy = y0 + h / 2;
|
|
21114
|
-
const zp = -
|
|
21377
|
+
const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
|
|
21115
21378
|
const plate = c.main(15856110);
|
|
21116
|
-
c.b("plain", -w / 2, y0, -
|
|
21379
|
+
c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
|
|
21117
21380
|
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));
|
|
21118
21381
|
c.rod("plain", "z", cx, cy, zp + 35e-4, 0.0285, 15e-4, shade(plate, 0.92));
|
|
21119
21382
|
const dark = 1842206;
|
|
@@ -21132,11 +21395,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
21132
21395
|
c.spec.colliders = [];
|
|
21133
21396
|
}
|
|
21134
21397
|
function wallSwitch(c) {
|
|
21135
|
-
const {
|
|
21398
|
+
const { w, h, y0 } = c;
|
|
21136
21399
|
const cy = y0 + h / 2;
|
|
21137
|
-
const zp = -
|
|
21400
|
+
const zp = WALL_PLATE.thickness - WALL_PLATE.sink;
|
|
21138
21401
|
const plate = c.main(15856110);
|
|
21139
|
-
c.b("plain", -w / 2, y0, -
|
|
21402
|
+
c.b("plain", -w / 2, y0, -WALL_PLATE.sink, w / 2, y0 + h, zp, plate);
|
|
21140
21403
|
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));
|
|
21141
21404
|
c.b("plain", -0.018, cy - 0.032, zp + 3e-3, 0.018, cy + 0.032, zp + 6e-3, shade(plate, 0.85));
|
|
21142
21405
|
c.part(
|
|
@@ -21153,7 +21416,20 @@ var GameInteractablesHousehold = (() => {
|
|
|
21153
21416
|
c.interact("use_switch", [0, round3(cy), round3(zp + 0.02)], { do: "toggle_switch", switch: "switch" }, "prompt.switch", 1);
|
|
21154
21417
|
c.spec.colliders = [];
|
|
21155
21418
|
}
|
|
21419
|
+
var NETWORK_POST = { half: 0.07, anchor: 5.7, bracket: 0.06 };
|
|
21420
|
+
function networkPost(c) {
|
|
21421
|
+
const { h } = c;
|
|
21422
|
+
const { half, anchor, bracket } = NETWORK_POST;
|
|
21423
|
+
c.b("plain", -half, 0, -half, half, h, half, c.main(11119009));
|
|
21424
|
+
c.b("metal", -0.02, anchor - 0.06, -half - bracket, 0.02, anchor + 0.04, -half - 2e-3, 4869200);
|
|
21425
|
+
c.add("wires", { id: "earth", kind: "cable", radius: 6e-3, points: [[0.04, 1.2, -half - 0.01], [0.04, 0.9, -half - 0.05], [0.04, 0.05, -half - 0.12]] });
|
|
21426
|
+
c.cyl("metal", 0.04, 1e-3, -half - 0.12, 0.01, 0.3, 12088115, "cyl6");
|
|
21427
|
+
c.spec.colliders = [];
|
|
21428
|
+
c.collider("pole", -half, 0, -half, half, h, half);
|
|
21429
|
+
c.add("damage", { target: "self", kind: "masonry", hp: 400 });
|
|
21430
|
+
}
|
|
21156
21431
|
function serviceEntrance(c) {
|
|
21432
|
+
if (c.M.variant === "network") return networkPost(c);
|
|
21157
21433
|
const { hw, h } = c;
|
|
21158
21434
|
const pole = c.main(11119009);
|
|
21159
21435
|
const top = h - 0.1;
|
|
@@ -21228,6 +21504,33 @@ var GameInteractablesHousehold = (() => {
|
|
|
21228
21504
|
c.add("wires", { id: "conduit", kind: "conduit", radius: 0.012, points: pts });
|
|
21229
21505
|
c.spec.colliders = [];
|
|
21230
21506
|
}
|
|
21507
|
+
var MAST = { radius: 0.021, bend: 0.08, capRadius: 0.032, capLength: 0.06, color: 11120307 };
|
|
21508
|
+
function mastAxis(h) {
|
|
21509
|
+
const top = h - MAST.bend - MAST.radius * 1.2;
|
|
21510
|
+
const arc = Array.from({ length: 8 }, (_, index) => {
|
|
21511
|
+
const angle = Math.PI * (index + 1) / 8;
|
|
21512
|
+
return [0, round3(top + MAST.bend * Math.sin(angle)), round3(-MAST.bend * Math.cos(angle))];
|
|
21513
|
+
});
|
|
21514
|
+
return [[0, 0, -MAST.bend], [0, top, -MAST.bend], ...arc];
|
|
21515
|
+
}
|
|
21516
|
+
function pipeSegment(c, a, b) {
|
|
21517
|
+
const dy = b[1] - a[1];
|
|
21518
|
+
const dz = b[2] - a[2];
|
|
21519
|
+
const length = Math.hypot(dy, dz);
|
|
21520
|
+
if (length < 1e-4) return;
|
|
21521
|
+
if (Math.abs(dz) < 1e-6 && dy > 0) return void c.cyl("metal", a[0], a[1], a[2], MAST.radius, length, MAST.color, "cyl");
|
|
21522
|
+
const reach = length + MAST.radius * 0.4;
|
|
21523
|
+
c.cyl("metal", a[0], (a[1] + b[1]) / 2, (a[2] + b[2]) / 2, MAST.radius, reach, MAST.color, "cyl", Math.atan2(dz, dy), 0);
|
|
21524
|
+
}
|
|
21525
|
+
function serviceMast(c) {
|
|
21526
|
+
const points = c.M.points && c.M.points.length >= 2 ? c.M.points.map((p) => [...p]) : mastAxis(c.h);
|
|
21527
|
+
for (let index = 0; index + 1 < points.length; index++) pipeSegment(c, points[index], points[index + 1]);
|
|
21528
|
+
const end = points[points.length - 1];
|
|
21529
|
+
c.cyl("metal", end[0], end[1] - MAST.capLength, end[2], MAST.capRadius, MAST.capLength, MAST.color, "cyl");
|
|
21530
|
+
c.spec.colliders = [];
|
|
21531
|
+
const foot = points[0];
|
|
21532
|
+
c.collider("mast", foot[0] - MAST.radius, foot[1], foot[2] - MAST.radius, foot[0] + MAST.radius, end[1], foot[2] + MAST.radius);
|
|
21533
|
+
}
|
|
21231
21534
|
function tv(c) {
|
|
21232
21535
|
const { hw, hd, w, h, y0 } = c;
|
|
21233
21536
|
const bz = 0.04;
|
|
@@ -21442,6 +21745,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21442
21745
|
}
|
|
21443
21746
|
|
|
21444
21747
|
// src/builders/kitchen.ts
|
|
21748
|
+
var STOVE_WALL_GAP = 0.04;
|
|
21445
21749
|
var STEEL = 11843772;
|
|
21446
21750
|
var CHROME = 13817562;
|
|
21447
21751
|
function tap2(c, x, y, z, id, partId) {
|
|
@@ -21547,7 +21851,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21547
21851
|
id: "gas_hose",
|
|
21548
21852
|
kind: "cable",
|
|
21549
21853
|
radius: 8e-3,
|
|
21550
|
-
points: [[round3(hw - 0.08), 0.18, -hd], [round3(hw - 0.08), 0.
|
|
21854
|
+
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)]]
|
|
21551
21855
|
});
|
|
21552
21856
|
c.add("damage", { target: "oven_door", kind: "glass", hp: 30 });
|
|
21553
21857
|
}
|
|
@@ -23794,6 +24098,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23794
24098
|
wall_switch: wallSwitch,
|
|
23795
24099
|
service_entrance: serviceEntrance,
|
|
23796
24100
|
conduit_run: conduitRun,
|
|
24101
|
+
service_mast: serviceMast,
|
|
23797
24102
|
electrical_panel: electricalPanel,
|
|
23798
24103
|
power_meter: powerMeter,
|
|
23799
24104
|
tv,
|