@adatechnology/game-interactables-household 0.7.3 → 0.7.5
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.d.ts +5 -1
- package/dist/index.global.js +1152 -148
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +233 -145
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.global.js
CHANGED
|
@@ -140,6 +140,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
140
140
|
}
|
|
141
141
|
return { ok: problems.length === 0, problems, warnings };
|
|
142
142
|
};
|
|
143
|
+
var sealBlock = (seal, state) => {
|
|
144
|
+
if (seal.spoilsWhenBreached && state.breached) return "breached";
|
|
145
|
+
if (seal.spoilsWhenBreached && state.leaked) return "leaked";
|
|
146
|
+
if (!state.opened) return "sealed";
|
|
147
|
+
return void 0;
|
|
148
|
+
};
|
|
143
149
|
var DEFERRED_QUEUE_ID = {
|
|
144
150
|
DESTRUCTION_EVENTS: "destruction.events",
|
|
145
151
|
BREACH_PAINT: "floorplan.breach-paint",
|
|
@@ -285,6 +291,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
285
291
|
};
|
|
286
292
|
return registry;
|
|
287
293
|
};
|
|
294
|
+
var resolveEntry = (registry, entry, kindField = "kind") => deepMerge(registry.defaults(String(entry[kindField])), entry);
|
|
288
295
|
var SURFACE_IDS = ["concrete", "asphalt", "wood", "tile", "dirt", "grass", "gravel", "sand", "metal", "water", "glass", "carpet"];
|
|
289
296
|
var GAIT_IDS = ["walk", "run"];
|
|
290
297
|
var LANDING_IDS = ["light", "heavy"];
|
|
@@ -327,7 +334,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
327
334
|
PIECE_BOXES: "destruction.piece-boxes",
|
|
328
335
|
STATIC_COLLIDERS: "destruction.static-colliders",
|
|
329
336
|
SHAPES_GENERATE: "shapes.generate",
|
|
330
|
-
WORLD_REGION: "world.region"
|
|
337
|
+
WORLD_REGION: "world.region",
|
|
338
|
+
VEHICLE_HULL_PLAN: "vehicles.hull-plan"
|
|
331
339
|
};
|
|
332
340
|
var WORKER_KIND_DEFAULTS = {
|
|
333
341
|
[WORKER_KIND_ID.GROUND_TILES]: { lane: "sim", priority: 300, latencyFrames: 2, late: "sync" },
|
|
@@ -335,9 +343,835 @@ var GameInteractablesHousehold = (() => {
|
|
|
335
343
|
[WORKER_KIND_ID.PIECE_BOXES]: { lane: "sim", priority: 200, latencyFrames: 2, late: "sync" },
|
|
336
344
|
[WORKER_KIND_ID.STATIC_COLLIDERS]: { lane: "build", priority: 150, late: "sync" },
|
|
337
345
|
[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" }
|
|
346
|
+
[WORKER_KIND_ID.WORLD_REGION]: { lane: "background", priority: 10, latencyFrames: 10, late: "drop" },
|
|
347
|
+
[WORKER_KIND_ID.VEHICLE_HULL_PLAN]: { lane: "build", priority: 120, late: "keep-waiting" }
|
|
339
348
|
};
|
|
340
349
|
|
|
350
|
+
// ../game-items/dist/index.js
|
|
351
|
+
var DEFAULT_RULES = {
|
|
352
|
+
rarity: {
|
|
353
|
+
weights: { common: 60, uncommon: 28, rare: 9, very_rare: 2.5, legendary: 0.5, unique: 0 },
|
|
354
|
+
fixedOnly: ["legendary", "unique"]
|
|
355
|
+
},
|
|
356
|
+
freshness: { stale: 0.5, spoiled: 1, rotten: 1.5 },
|
|
357
|
+
storage: {
|
|
358
|
+
fridge: { multiplier: 0.33, needsPower: true },
|
|
359
|
+
freezer: { multiplier: 0.1, needsPower: true },
|
|
360
|
+
cooler: { multiplier: 0.5, limitDays: 2, afterLimit: 1 },
|
|
361
|
+
delivery_bag: { multiplier: 0.8 },
|
|
362
|
+
cellar: { multiplier: 0.66 },
|
|
363
|
+
ambient: { multiplier: 1 },
|
|
364
|
+
hot: { multiplier: 2 }
|
|
365
|
+
},
|
|
366
|
+
carry: { baseKg: 8, perStrengthKg: 2.5, factor: 1.2, encumbered: 1, overloaded: 1.5 },
|
|
367
|
+
protection: { cap: 0.9, wear: { bite: 8, scratch: 3 }, tornShare: 0.25, repairMargin: 10 },
|
|
368
|
+
aging: { thawShelfDays: { freezer: 2 } },
|
|
369
|
+
inventory: {
|
|
370
|
+
defaultSlots: 10,
|
|
371
|
+
encumberedRunFactor: 0.75,
|
|
372
|
+
defaultLitres: 12,
|
|
373
|
+
defaultInside: [0.3, 0.25, 0.16],
|
|
374
|
+
bagInside: {
|
|
375
|
+
shopping_bag: [0.4, 0.35, 0.15],
|
|
376
|
+
trash_bag: [0.6, 0.45, 0.12],
|
|
377
|
+
fanny_pack: [0.22, 0.12, 0.1],
|
|
378
|
+
crossbody_bag: [0.25, 0.2, 0.12],
|
|
379
|
+
backpack: [0.5, 0.3, 0.2],
|
|
380
|
+
delivery_bag: [0.45, 0.45, 0.25],
|
|
381
|
+
hiking_backpack_40l: [0.6, 0.35, 0.19],
|
|
382
|
+
military_backpack: [0.6, 0.35, 0.21],
|
|
383
|
+
trekking_backpack_70l: [0.75, 0.38, 0.25],
|
|
384
|
+
rolling_suitcase: [0.6, 0.4, 0.21],
|
|
385
|
+
tactical_vest: [0.3, 0.2, 0.1],
|
|
386
|
+
tool_belt: [0.4, 0.2, 0.1],
|
|
387
|
+
cooler_box: [0.32, 0.25, 0.23],
|
|
388
|
+
shopping_cart: [0.9, 0.55, 0.16],
|
|
389
|
+
wheelbarrow: [1.2, 0.6, 0.15]
|
|
390
|
+
},
|
|
391
|
+
bagLitres: {
|
|
392
|
+
shopping_bag: 20,
|
|
393
|
+
trash_bag: 30,
|
|
394
|
+
fanny_pack: 3,
|
|
395
|
+
crossbody_bag: 6,
|
|
396
|
+
backpack: 30,
|
|
397
|
+
delivery_bag: 50,
|
|
398
|
+
hiking_backpack_40l: 40,
|
|
399
|
+
military_backpack: 45,
|
|
400
|
+
trekking_backpack_70l: 70,
|
|
401
|
+
rolling_suitcase: 50,
|
|
402
|
+
tactical_vest: 6,
|
|
403
|
+
tool_belt: 8,
|
|
404
|
+
cooler_box: 18,
|
|
405
|
+
shopping_cart: 80,
|
|
406
|
+
wheelbarrow: 100
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
use: {
|
|
410
|
+
freshness: {
|
|
411
|
+
stale: { satietyFactor: 0.7, poisonChance: 0.1, morale: 0, isEdible: true },
|
|
412
|
+
spoiled: { satietyFactor: 0.7, poisonChance: 0.5, morale: -20, isEdible: true },
|
|
413
|
+
rotten: { satietyFactor: 0, poisonChance: 0, morale: 0, isEdible: false }
|
|
414
|
+
},
|
|
415
|
+
cookedPoisonFactor: 0.25
|
|
416
|
+
},
|
|
417
|
+
spawn: {
|
|
418
|
+
retailNew: true,
|
|
419
|
+
retailPlaces: ["supermarket", "pharmacy", "mall", "gas_station", "gun_shop"],
|
|
420
|
+
retailContainers: ["store_shelf", "stockroom"],
|
|
421
|
+
condition: { common: [30, 90], uncommon: [40, 90], rare: [50, 100], very_rare: [50, 100], legendary: [50, 100], unique: [50, 100] },
|
|
422
|
+
ageShare: [0, 0.6],
|
|
423
|
+
charge: [0.2, 1],
|
|
424
|
+
fillable: ["fuel_jerrycan"],
|
|
425
|
+
fill: [0, 0.6]
|
|
426
|
+
},
|
|
427
|
+
finds: {
|
|
428
|
+
fallbackContainer: "zombie_corpse",
|
|
429
|
+
rollExcluded: ["ammo_7_62x39"],
|
|
430
|
+
depletion: [
|
|
431
|
+
{ places: ["pharmacy", "gun_shop", "police_station"], perDay: 0.05, floor: 0.3 },
|
|
432
|
+
{ places: ["supermarket", "gas_station"], perDay: 0.04, floor: 0.35 },
|
|
433
|
+
{ places: ["mall", "hospital"], perDay: 0.025, floor: 0.5 },
|
|
434
|
+
{ places: ["house", "apartment"], perDay: 0.01, floor: 0.7 },
|
|
435
|
+
{ places: ["farm", "warehouse", "mine", "dam", "lodge", "church"], perDay: 5e-3, floor: 0.85 },
|
|
436
|
+
{ places: ["military_base"], perDay: 0, floor: 1 }
|
|
437
|
+
],
|
|
438
|
+
regionMultiplier: {},
|
|
439
|
+
states: { normal: "normal", fortified: "fortified", abandoned: "abandoned" },
|
|
440
|
+
pool: {
|
|
441
|
+
defaultFootprint: 0.5,
|
|
442
|
+
offset: 1.5,
|
|
443
|
+
perSquareMetre: 3,
|
|
444
|
+
jitter: 1.5,
|
|
445
|
+
min: 2,
|
|
446
|
+
max: 5,
|
|
447
|
+
fortifiedExtra: 2,
|
|
448
|
+
supplyWeight: 2.5,
|
|
449
|
+
supplyExtraQty: 1,
|
|
450
|
+
abandonedEmptyChance: 0.4,
|
|
451
|
+
abandonedKept: 1,
|
|
452
|
+
junkChance: 0.5,
|
|
453
|
+
junkItem: "food_packaging",
|
|
454
|
+
spoiledFoodItem: "leftover_meal",
|
|
455
|
+
coldContainers: ["geladeira", "refrig_exp", "freezer"]
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
var FRESH_NUTRITION = { satietyFactor: 1, poisonChance: 0, morale: 0, isEdible: true };
|
|
460
|
+
var nutritionOf = (item, context, rules) => {
|
|
461
|
+
const state = context.freshness ?? "fresh";
|
|
462
|
+
const effect = state === "fresh" ? FRESH_NUTRITION : rules.use.freshness[state];
|
|
463
|
+
const poisonShare = context.isCooked ? rules.use.cookedPoisonFactor : 1;
|
|
464
|
+
return {
|
|
465
|
+
satiety: (item.nutrition?.satiety ?? 0) * effect.satietyFactor,
|
|
466
|
+
hydration: item.nutrition?.hydration ?? 0,
|
|
467
|
+
morale: effect.morale,
|
|
468
|
+
poisonChance: effect.poisonChance * poisonShare,
|
|
469
|
+
isEdible: effect.isEdible
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
var findEffect = (item, effects) => effects.find((entry) => entry.items?.includes(item.id)) ?? effects.find((entry) => entry.category?.includes(item.category));
|
|
473
|
+
var resolveUse = (item, effects, context = {}, rules = DEFAULT_RULES) => {
|
|
474
|
+
const def = findEffect(item, effects);
|
|
475
|
+
if (!def) return void 0;
|
|
476
|
+
const base = { useId: def.id, effect: def.effect, params: def.params ?? {}, consumes: def.consumes };
|
|
477
|
+
if (def.effect !== "consume_nutrition") return base;
|
|
478
|
+
const nutrition = nutritionOf(item, context, rules);
|
|
479
|
+
const blocked = item.seal && context.seal ? sealBlock(item.seal, context.seal) : void 0;
|
|
480
|
+
if (blocked) return { ...base, consumes: false, nutrition: { ...nutrition, isEdible: false }, blocked };
|
|
481
|
+
return { ...base, consumes: def.consumes && nutrition.isEdible, nutrition };
|
|
482
|
+
};
|
|
483
|
+
var MM = 1e-3;
|
|
484
|
+
var BOX_WALL = 6 * MM;
|
|
485
|
+
|
|
486
|
+
// ../game-fluids/dist/index.js
|
|
487
|
+
var liquids_default = [
|
|
488
|
+
{
|
|
489
|
+
id: "water",
|
|
490
|
+
color: 11064558,
|
|
491
|
+
opacity: 0.35,
|
|
492
|
+
stainColor: 7309206,
|
|
493
|
+
viscosity: 1,
|
|
494
|
+
density: 1e3,
|
|
495
|
+
dryTime: 180,
|
|
496
|
+
gloss: 0.9,
|
|
497
|
+
drink: {
|
|
498
|
+
thirst: 100,
|
|
499
|
+
effects: []
|
|
500
|
+
},
|
|
501
|
+
tags: [
|
|
502
|
+
"drink",
|
|
503
|
+
"clear"
|
|
504
|
+
]
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
id: "coffee",
|
|
508
|
+
color: 3875604,
|
|
509
|
+
opacity: 0.95,
|
|
510
|
+
stainColor: 2824202,
|
|
511
|
+
viscosity: 1.5,
|
|
512
|
+
density: 1005,
|
|
513
|
+
dryTime: 900,
|
|
514
|
+
gloss: 0.8,
|
|
515
|
+
leavesMark: true,
|
|
516
|
+
steamC: 60,
|
|
517
|
+
drink: {
|
|
518
|
+
thirst: 80,
|
|
519
|
+
effects: [
|
|
520
|
+
"caffeine"
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
tags: [
|
|
524
|
+
"drink",
|
|
525
|
+
"hot"
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
id: "tea",
|
|
530
|
+
color: 9063188,
|
|
531
|
+
opacity: 0.8,
|
|
532
|
+
stainColor: 6961682,
|
|
533
|
+
viscosity: 1.4,
|
|
534
|
+
density: 1005,
|
|
535
|
+
dryTime: 800,
|
|
536
|
+
gloss: 0.8,
|
|
537
|
+
leavesMark: true,
|
|
538
|
+
steamC: 60,
|
|
539
|
+
drink: {
|
|
540
|
+
thirst: 90,
|
|
541
|
+
effects: []
|
|
542
|
+
},
|
|
543
|
+
tags: [
|
|
544
|
+
"drink",
|
|
545
|
+
"hot"
|
|
546
|
+
]
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
id: "milk",
|
|
550
|
+
color: 16052712,
|
|
551
|
+
opacity: 0.98,
|
|
552
|
+
stainColor: 14473160,
|
|
553
|
+
viscosity: 2,
|
|
554
|
+
density: 1030,
|
|
555
|
+
dryTime: 900,
|
|
556
|
+
gloss: 0.5,
|
|
557
|
+
leavesMark: true,
|
|
558
|
+
drink: {
|
|
559
|
+
thirst: 70,
|
|
560
|
+
effects: []
|
|
561
|
+
},
|
|
562
|
+
tags: [
|
|
563
|
+
"drink"
|
|
564
|
+
]
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
id: "soda",
|
|
568
|
+
color: 3808530,
|
|
569
|
+
opacity: 0.85,
|
|
570
|
+
stainColor: 2757901,
|
|
571
|
+
viscosity: 1.3,
|
|
572
|
+
density: 1040,
|
|
573
|
+
dryTime: 1200,
|
|
574
|
+
gloss: 0.85,
|
|
575
|
+
leavesMark: true,
|
|
576
|
+
drink: {
|
|
577
|
+
thirst: 60,
|
|
578
|
+
effects: []
|
|
579
|
+
},
|
|
580
|
+
tags: [
|
|
581
|
+
"drink",
|
|
582
|
+
"sticky"
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
id: "juice",
|
|
587
|
+
color: 15239467,
|
|
588
|
+
opacity: 0.9,
|
|
589
|
+
stainColor: 12741916,
|
|
590
|
+
viscosity: 2,
|
|
591
|
+
density: 1045,
|
|
592
|
+
dryTime: 1100,
|
|
593
|
+
gloss: 0.8,
|
|
594
|
+
leavesMark: true,
|
|
595
|
+
drink: {
|
|
596
|
+
thirst: 75,
|
|
597
|
+
effects: []
|
|
598
|
+
},
|
|
599
|
+
tags: [
|
|
600
|
+
"drink",
|
|
601
|
+
"sticky"
|
|
602
|
+
]
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
id: "beer",
|
|
606
|
+
color: 14259740,
|
|
607
|
+
opacity: 0.8,
|
|
608
|
+
stainColor: 11039764,
|
|
609
|
+
viscosity: 1.4,
|
|
610
|
+
density: 1010,
|
|
611
|
+
dryTime: 900,
|
|
612
|
+
gloss: 0.8,
|
|
613
|
+
drink: {
|
|
614
|
+
thirst: 50,
|
|
615
|
+
effects: [
|
|
616
|
+
"alcohol"
|
|
617
|
+
]
|
|
618
|
+
},
|
|
619
|
+
tags: [
|
|
620
|
+
"drink",
|
|
621
|
+
"alcohol"
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
id: "wine",
|
|
626
|
+
color: 7016223,
|
|
627
|
+
opacity: 0.9,
|
|
628
|
+
stainColor: 5048854,
|
|
629
|
+
viscosity: 1.6,
|
|
630
|
+
density: 990,
|
|
631
|
+
dryTime: 800,
|
|
632
|
+
gloss: 0.85,
|
|
633
|
+
leavesMark: true,
|
|
634
|
+
drink: {
|
|
635
|
+
thirst: 40,
|
|
636
|
+
effects: [
|
|
637
|
+
"alcohol"
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
tags: [
|
|
641
|
+
"drink",
|
|
642
|
+
"alcohol"
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
id: "spirits",
|
|
647
|
+
color: 13214042,
|
|
648
|
+
opacity: 0.6,
|
|
649
|
+
stainColor: 10320959,
|
|
650
|
+
viscosity: 1.8,
|
|
651
|
+
density: 940,
|
|
652
|
+
dryTime: 200,
|
|
653
|
+
gloss: 0.85,
|
|
654
|
+
flammable: true,
|
|
655
|
+
drink: {
|
|
656
|
+
thirst: 5,
|
|
657
|
+
effects: [
|
|
658
|
+
"alcohol"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
tags: [
|
|
662
|
+
"drink",
|
|
663
|
+
"alcohol"
|
|
664
|
+
]
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
id: "fuel",
|
|
668
|
+
color: 14926682,
|
|
669
|
+
opacity: 0.6,
|
|
670
|
+
stainColor: 7232298,
|
|
671
|
+
viscosity: 0.6,
|
|
672
|
+
density: 740,
|
|
673
|
+
dryTime: 60,
|
|
674
|
+
gloss: 0.95,
|
|
675
|
+
leavesMark: false,
|
|
676
|
+
flammable: true,
|
|
677
|
+
drink: {
|
|
678
|
+
thirst: 0,
|
|
679
|
+
effects: [
|
|
680
|
+
"poison"
|
|
681
|
+
]
|
|
682
|
+
},
|
|
683
|
+
tags: [
|
|
684
|
+
"fuel",
|
|
685
|
+
"gasoline"
|
|
686
|
+
]
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
id: "diesel",
|
|
690
|
+
color: 12098094,
|
|
691
|
+
opacity: 0.8,
|
|
692
|
+
stainColor: 5917208,
|
|
693
|
+
viscosity: 3,
|
|
694
|
+
density: 830,
|
|
695
|
+
dryTime: 3600,
|
|
696
|
+
gloss: 0.95,
|
|
697
|
+
leavesMark: true,
|
|
698
|
+
flammable: true,
|
|
699
|
+
drink: {
|
|
700
|
+
thirst: 0,
|
|
701
|
+
effects: [
|
|
702
|
+
"poison"
|
|
703
|
+
]
|
|
704
|
+
},
|
|
705
|
+
tags: [
|
|
706
|
+
"fuel"
|
|
707
|
+
]
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
id: "motor_oil",
|
|
711
|
+
color: 3877388,
|
|
712
|
+
opacity: 0.95,
|
|
713
|
+
stainColor: 1840134,
|
|
714
|
+
viscosity: 100,
|
|
715
|
+
density: 880,
|
|
716
|
+
dryTime: 0,
|
|
717
|
+
gloss: 1,
|
|
718
|
+
leavesMark: true,
|
|
719
|
+
flammable: true,
|
|
720
|
+
drink: {
|
|
721
|
+
thirst: 0,
|
|
722
|
+
effects: [
|
|
723
|
+
"poison"
|
|
724
|
+
]
|
|
725
|
+
},
|
|
726
|
+
tags: [
|
|
727
|
+
"oil"
|
|
728
|
+
]
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
id: "cooking_oil",
|
|
732
|
+
color: 14267708,
|
|
733
|
+
opacity: 0.85,
|
|
734
|
+
stainColor: 11110698,
|
|
735
|
+
viscosity: 60,
|
|
736
|
+
density: 920,
|
|
737
|
+
dryTime: 0,
|
|
738
|
+
gloss: 1,
|
|
739
|
+
leavesMark: true,
|
|
740
|
+
flammable: true,
|
|
741
|
+
drink: {
|
|
742
|
+
thirst: 0,
|
|
743
|
+
effects: [
|
|
744
|
+
"poison"
|
|
745
|
+
]
|
|
746
|
+
},
|
|
747
|
+
tags: [
|
|
748
|
+
"oil",
|
|
749
|
+
"food"
|
|
750
|
+
]
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
id: "blood",
|
|
754
|
+
color: 7997964,
|
|
755
|
+
opacity: 0.92,
|
|
756
|
+
stainColor: 3874068,
|
|
757
|
+
viscosity: 4,
|
|
758
|
+
density: 1060,
|
|
759
|
+
dryTime: 600,
|
|
760
|
+
gloss: 0.75,
|
|
761
|
+
leavesMark: true,
|
|
762
|
+
drink: {
|
|
763
|
+
thirst: 10,
|
|
764
|
+
effects: [
|
|
765
|
+
"disgust"
|
|
766
|
+
]
|
|
767
|
+
},
|
|
768
|
+
tags: [
|
|
769
|
+
"organic"
|
|
770
|
+
]
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
id: "old_blood",
|
|
774
|
+
color: 7085078,
|
|
775
|
+
opacity: 0.92,
|
|
776
|
+
stainColor: 2758158,
|
|
777
|
+
viscosity: 4,
|
|
778
|
+
density: 1060,
|
|
779
|
+
dryTime: 360,
|
|
780
|
+
gloss: 0.7,
|
|
781
|
+
leavesMark: true,
|
|
782
|
+
drink: {
|
|
783
|
+
thirst: 10,
|
|
784
|
+
effects: [
|
|
785
|
+
"disgust"
|
|
786
|
+
]
|
|
787
|
+
},
|
|
788
|
+
tags: [
|
|
789
|
+
"organic"
|
|
790
|
+
]
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
id: "bile",
|
|
794
|
+
color: 9083434,
|
|
795
|
+
opacity: 0.9,
|
|
796
|
+
stainColor: 4080160,
|
|
797
|
+
viscosity: 6,
|
|
798
|
+
density: 1020,
|
|
799
|
+
dryTime: 900,
|
|
800
|
+
gloss: 0.75,
|
|
801
|
+
leavesMark: true,
|
|
802
|
+
drink: {
|
|
803
|
+
thirst: 0,
|
|
804
|
+
effects: [
|
|
805
|
+
"disgust"
|
|
806
|
+
]
|
|
807
|
+
},
|
|
808
|
+
tags: [
|
|
809
|
+
"organic"
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
id: "sap",
|
|
814
|
+
color: 13146940,
|
|
815
|
+
opacity: 0.8,
|
|
816
|
+
stainColor: 10122282,
|
|
817
|
+
viscosity: 200,
|
|
818
|
+
density: 1100,
|
|
819
|
+
dryTime: 3600,
|
|
820
|
+
gloss: 0.8,
|
|
821
|
+
leavesMark: true,
|
|
822
|
+
drink: {
|
|
823
|
+
thirst: 20,
|
|
824
|
+
effects: []
|
|
825
|
+
},
|
|
826
|
+
tags: [
|
|
827
|
+
"organic",
|
|
828
|
+
"sticky"
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
id: "acid",
|
|
833
|
+
color: 10146378,
|
|
834
|
+
opacity: 0.6,
|
|
835
|
+
stainColor: 7313970,
|
|
836
|
+
viscosity: 1.5,
|
|
837
|
+
density: 1200,
|
|
838
|
+
dryTime: 900,
|
|
839
|
+
gloss: 0.9,
|
|
840
|
+
leavesMark: true,
|
|
841
|
+
drink: {
|
|
842
|
+
thirst: 0,
|
|
843
|
+
effects: [
|
|
844
|
+
"poison"
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
tags: [
|
|
848
|
+
"corrosive"
|
|
849
|
+
]
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
id: "paint",
|
|
853
|
+
color: 11740715,
|
|
854
|
+
opacity: 0.98,
|
|
855
|
+
stainColor: 9050655,
|
|
856
|
+
viscosity: 300,
|
|
857
|
+
density: 1300,
|
|
858
|
+
dryTime: 1800,
|
|
859
|
+
gloss: 0.6,
|
|
860
|
+
leavesMark: true,
|
|
861
|
+
drink: {
|
|
862
|
+
thirst: 0,
|
|
863
|
+
effects: [
|
|
864
|
+
"poison"
|
|
865
|
+
]
|
|
866
|
+
},
|
|
867
|
+
tags: [
|
|
868
|
+
"paint"
|
|
869
|
+
]
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
id: "bleach",
|
|
873
|
+
color: 15134688,
|
|
874
|
+
opacity: 0.7,
|
|
875
|
+
stainColor: 13621446,
|
|
876
|
+
viscosity: 1.2,
|
|
877
|
+
density: 1100,
|
|
878
|
+
dryTime: 900,
|
|
879
|
+
gloss: 0.85,
|
|
880
|
+
leavesMark: true,
|
|
881
|
+
drink: {
|
|
882
|
+
thirst: 0,
|
|
883
|
+
effects: [
|
|
884
|
+
"poison"
|
|
885
|
+
]
|
|
886
|
+
},
|
|
887
|
+
tags: [
|
|
888
|
+
"corrosive"
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
id: "sewage",
|
|
893
|
+
color: 5921582,
|
|
894
|
+
opacity: 0.92,
|
|
895
|
+
stainColor: 3093273,
|
|
896
|
+
viscosity: 4,
|
|
897
|
+
density: 1010,
|
|
898
|
+
dryTime: 1800,
|
|
899
|
+
gloss: 0.8,
|
|
900
|
+
leavesMark: true,
|
|
901
|
+
drink: {
|
|
902
|
+
thirst: 0,
|
|
903
|
+
effects: [
|
|
904
|
+
"disgust",
|
|
905
|
+
"poison"
|
|
906
|
+
]
|
|
907
|
+
},
|
|
908
|
+
tags: [
|
|
909
|
+
"organic",
|
|
910
|
+
"waste"
|
|
911
|
+
]
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
id: "honey",
|
|
915
|
+
color: 14193162,
|
|
916
|
+
opacity: 0.9,
|
|
917
|
+
stainColor: 12089350,
|
|
918
|
+
viscosity: 3e3,
|
|
919
|
+
density: 1420,
|
|
920
|
+
dryTime: 14400,
|
|
921
|
+
gloss: 0.95,
|
|
922
|
+
leavesMark: true,
|
|
923
|
+
drink: {
|
|
924
|
+
thirst: 10,
|
|
925
|
+
effects: []
|
|
926
|
+
},
|
|
927
|
+
tags: [
|
|
928
|
+
"drink",
|
|
929
|
+
"sticky"
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
id: "mud",
|
|
934
|
+
color: 4008988,
|
|
935
|
+
opacity: 0.95,
|
|
936
|
+
stainColor: 3811866,
|
|
937
|
+
viscosity: 40,
|
|
938
|
+
density: 1600,
|
|
939
|
+
dryTime: 900,
|
|
940
|
+
gloss: 0.4,
|
|
941
|
+
tags: [
|
|
942
|
+
"dirty"
|
|
943
|
+
]
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
id: "coolant",
|
|
947
|
+
color: 3455050,
|
|
948
|
+
opacity: 0.7,
|
|
949
|
+
stainColor: 2783796,
|
|
950
|
+
viscosity: 4,
|
|
951
|
+
density: 1070,
|
|
952
|
+
dryTime: 1200,
|
|
953
|
+
gloss: 0.85,
|
|
954
|
+
leavesMark: true,
|
|
955
|
+
drink: {
|
|
956
|
+
thirst: 0,
|
|
957
|
+
effects: [
|
|
958
|
+
"poison"
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
tags: [
|
|
962
|
+
"coolant"
|
|
963
|
+
]
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
id: "brake_fluid",
|
|
967
|
+
color: 13145646,
|
|
968
|
+
opacity: 0.8,
|
|
969
|
+
stainColor: 9069600,
|
|
970
|
+
viscosity: 8,
|
|
971
|
+
density: 1050,
|
|
972
|
+
dryTime: 3600,
|
|
973
|
+
gloss: 0.9,
|
|
974
|
+
leavesMark: true,
|
|
975
|
+
drink: {
|
|
976
|
+
thirst: 0,
|
|
977
|
+
effects: [
|
|
978
|
+
"poison"
|
|
979
|
+
]
|
|
980
|
+
},
|
|
981
|
+
tags: [
|
|
982
|
+
"brake_fluid"
|
|
983
|
+
]
|
|
984
|
+
}
|
|
985
|
+
];
|
|
986
|
+
var LIQUIDS = liquids_default;
|
|
987
|
+
var SAMPLES = 16;
|
|
988
|
+
var COS = [];
|
|
989
|
+
var SIN = [];
|
|
990
|
+
for (let i = 0; i < SAMPLES; i++) {
|
|
991
|
+
COS.push(Math.cos(i / SAMPLES * Math.PI * 2));
|
|
992
|
+
SIN.push(Math.sin(i / SAMPLES * Math.PI * 2));
|
|
993
|
+
}
|
|
994
|
+
var RUNOFF_TILT = 6 * Math.PI / 180;
|
|
995
|
+
var RUNOFF_TILT_MAX = 60 * Math.PI / 180;
|
|
996
|
+
function hashCell(x, y) {
|
|
997
|
+
let value = x * 374761393 + y * 668265263 | 0;
|
|
998
|
+
value = (value ^ value >>> 13) * 1274126177 | 0;
|
|
999
|
+
return ((value ^ value >>> 16) >>> 0) / 4294967296;
|
|
1000
|
+
}
|
|
1001
|
+
function valueNoise(x, y) {
|
|
1002
|
+
const xi = Math.floor(x);
|
|
1003
|
+
const yi = Math.floor(y);
|
|
1004
|
+
const xf = x - xi;
|
|
1005
|
+
const yf = y - yi;
|
|
1006
|
+
const u = xf * xf * (3 - 2 * xf);
|
|
1007
|
+
const v = yf * yf * (3 - 2 * yf);
|
|
1008
|
+
const a = hashCell(xi, yi);
|
|
1009
|
+
const b = hashCell(xi + 1, yi);
|
|
1010
|
+
const c = hashCell(xi, yi + 1);
|
|
1011
|
+
const d = hashCell(xi + 1, yi + 1);
|
|
1012
|
+
return a + (b - a) * u + (c - a) * v + (a - b - c + d) * u * v;
|
|
1013
|
+
}
|
|
1014
|
+
var REGION_NAMES = ["wall", "sidewalk", "curb", "road"];
|
|
1015
|
+
var dot3 = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
1016
|
+
function impactOf(region, position, velocity, cellSize) {
|
|
1017
|
+
const local = [position[0] - region.origin[0], position[1] - region.origin[1], position[2] - region.origin[2]];
|
|
1018
|
+
return {
|
|
1019
|
+
row: region.firstRow + dot3(local, region.rowAxis) / cellSize,
|
|
1020
|
+
column: dot3(local, region.columnAxis) / cellSize,
|
|
1021
|
+
along: [dot3(velocity, region.columnAxis), dot3(velocity, region.rowAxis)],
|
|
1022
|
+
normalSpeed: -dot3(velocity, region.normal)
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
function cellToWorldOf(regions, cellSize, row, column) {
|
|
1026
|
+
let region = regions[regions.length - 1];
|
|
1027
|
+
for (const candidate of regions) {
|
|
1028
|
+
if (row < candidate.firstRow + candidate.rowCount) {
|
|
1029
|
+
region = candidate;
|
|
1030
|
+
break;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
const across = column * cellSize;
|
|
1034
|
+
const down = (row - region.firstRow) * cellSize;
|
|
1035
|
+
return [
|
|
1036
|
+
region.origin[0] + region.columnAxis[0] * across + region.rowAxis[0] * down,
|
|
1037
|
+
region.origin[1] + region.columnAxis[1] * across + region.rowAxis[1] * down,
|
|
1038
|
+
region.origin[2] + region.columnAxis[2] * across + region.rowAxis[2] * down
|
|
1039
|
+
];
|
|
1040
|
+
}
|
|
1041
|
+
function createFoldedLayout(params) {
|
|
1042
|
+
const { columns, cellSize, originX, wallRows, sidewalkRows, curbRows, roadRows, wallTopY, sidewalkY, roadY, wallZ, rules } = params;
|
|
1043
|
+
const curbStep = params.curbStep ?? (sidewalkY - roadY) / curbRows;
|
|
1044
|
+
const height = wallRows + sidewalkRows + curbRows + roadRows;
|
|
1045
|
+
const cellCount = columns * height;
|
|
1046
|
+
const bed = new Float32Array(cellCount);
|
|
1047
|
+
const pin = new Float32Array(cellCount);
|
|
1048
|
+
const vertical = new Float32Array(cellCount);
|
|
1049
|
+
const sidewalkEnd = wallRows + sidewalkRows;
|
|
1050
|
+
const curbEnd = sidewalkEnd + curbRows;
|
|
1051
|
+
const regionOfRow = (row) => row < wallRows ? 0 : row < sidewalkEnd ? 1 : row < curbEnd ? 2 : 3;
|
|
1052
|
+
for (let row = 0; row < height; row++) {
|
|
1053
|
+
for (let column = 0; column < columns; column++) {
|
|
1054
|
+
const index = row * columns + column;
|
|
1055
|
+
const region = regionOfRow(row);
|
|
1056
|
+
const x = originX + (column + 0.5) * cellSize;
|
|
1057
|
+
let bedHeight;
|
|
1058
|
+
let roughness = 0.2;
|
|
1059
|
+
if (region === 0) {
|
|
1060
|
+
bedHeight = (wallTopY - (row + 0.5) * cellSize) * 1e3;
|
|
1061
|
+
roughness = 0.3;
|
|
1062
|
+
} else if (region === 1) {
|
|
1063
|
+
const z = (row - wallRows + 0.5) * cellSize;
|
|
1064
|
+
bedHeight = sidewalkY * 1e3 - z * 6;
|
|
1065
|
+
const jointX = Math.abs(((x - originX) % 0.5 + 0.5) % 0.5 - 0.25);
|
|
1066
|
+
const jointZ = Math.abs((z % 0.5 + 0.5) % 0.5 - 0.25);
|
|
1067
|
+
if (jointX > 0.25 - cellSize * 0.6 || jointZ > 0.25 - cellSize * 0.6) bedHeight -= 0.9;
|
|
1068
|
+
roughness = 0.18;
|
|
1069
|
+
} else if (region === 2) {
|
|
1070
|
+
bedHeight = sidewalkY * 1e3 - (row - sidewalkEnd + 0.5) * curbStep * 1e3;
|
|
1071
|
+
} else {
|
|
1072
|
+
const z = (row - curbEnd + 0.5) * cellSize;
|
|
1073
|
+
bedHeight = roadY * 1e3 + z * 14 - (x - params.roadSlopeAnchorX) * 5;
|
|
1074
|
+
roughness = 0.55;
|
|
1075
|
+
}
|
|
1076
|
+
const noise = valueNoise(column * 0.35, row * 0.35) * 0.6 + valueNoise(column * 1.3, row * 1.3) * 0.4;
|
|
1077
|
+
bed[index] = bedHeight + (noise - 0.5) * roughness * 2;
|
|
1078
|
+
vertical[index] = region === 0 || region === 2 ? 0.95 : 1;
|
|
1079
|
+
pin[index] = 0.62 + 0.76 * (valueNoise(column * 0.21 + 40, row * 0.21) * 0.5 + hashCell(column, row) * 0.5) * (region === 3 ? 1.25 : 1);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
const curbZ = wallZ + sidewalkRows * cellSize;
|
|
1083
|
+
const roadEndZ = curbZ + roadRows * cellSize;
|
|
1084
|
+
const right = [1, 0, 0];
|
|
1085
|
+
const regions = [
|
|
1086
|
+
{ id: REGION_NAMES[0], firstRow: 0, rowCount: wallRows, origin: [originX, wallTopY, wallZ], columnAxis: right, rowAxis: [0, -1, 0], normal: [0, 0, 1], isVertical: true },
|
|
1087
|
+
{ id: REGION_NAMES[1], firstRow: wallRows, rowCount: sidewalkRows, origin: [originX, sidewalkY, wallZ], columnAxis: right, rowAxis: [0, 0, 1], normal: [0, 1, 0], isVertical: false },
|
|
1088
|
+
{ id: REGION_NAMES[2], firstRow: sidewalkEnd, rowCount: curbRows, origin: [originX, sidewalkY, curbZ], columnAxis: right, rowAxis: [0, -1, 0], normal: [0, 0, 1], isVertical: true },
|
|
1089
|
+
{ id: REGION_NAMES[3], firstRow: curbEnd, rowCount: roadRows, origin: [originX, roadY, curbZ], columnAxis: right, rowAxis: [0, 0, 1], normal: [0, 1, 0], isVertical: false }
|
|
1090
|
+
];
|
|
1091
|
+
const maxX = originX + columns * cellSize;
|
|
1092
|
+
return {
|
|
1093
|
+
id: params.id,
|
|
1094
|
+
width: columns,
|
|
1095
|
+
height,
|
|
1096
|
+
cellSize,
|
|
1097
|
+
bed,
|
|
1098
|
+
pin,
|
|
1099
|
+
vertical,
|
|
1100
|
+
regions,
|
|
1101
|
+
rules,
|
|
1102
|
+
cellToWorld: (row, column) => cellToWorldOf(regions, cellSize, row, column),
|
|
1103
|
+
collide(previous, position) {
|
|
1104
|
+
if (position[2] <= wallZ && position[1] > sidewalkY) {
|
|
1105
|
+
position[2] = wallZ;
|
|
1106
|
+
return 0;
|
|
1107
|
+
}
|
|
1108
|
+
if (position[2] < curbZ && (!rules.guardBehindWall || position[2] >= wallZ) && position[1] <= sidewalkY) {
|
|
1109
|
+
position[1] = sidewalkY;
|
|
1110
|
+
return 1;
|
|
1111
|
+
}
|
|
1112
|
+
if (rules.curbCatch && position[2] >= curbZ && previous[2] < curbZ && position[1] < sidewalkY) {
|
|
1113
|
+
position[2] = curbZ;
|
|
1114
|
+
return 2;
|
|
1115
|
+
}
|
|
1116
|
+
if (position[2] >= curbZ && position[1] <= roadY) {
|
|
1117
|
+
position[1] = roadY;
|
|
1118
|
+
return 3;
|
|
1119
|
+
}
|
|
1120
|
+
return -1;
|
|
1121
|
+
},
|
|
1122
|
+
impact: (region, position, velocity) => impactOf(regions[region], position, velocity, cellSize),
|
|
1123
|
+
contains: (position) => position[0] > originX && position[0] < maxX && (!rules.clipRoadEnd || position[2] < roadEndZ),
|
|
1124
|
+
escaped(position) {
|
|
1125
|
+
if (position[1] < -1) return true;
|
|
1126
|
+
const box = rules.escapeBox;
|
|
1127
|
+
return box !== void 0 && (position[0] < box.minX || position[0] > box.maxX || position[2] > box.maxZ);
|
|
1128
|
+
}
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
var PADRAO_CELL = 0.0125;
|
|
1132
|
+
var PADRAO_WALL_Z = 0;
|
|
1133
|
+
var PADRAO_LAYOUT = createFoldedLayout({
|
|
1134
|
+
id: "padrao",
|
|
1135
|
+
columns: 256,
|
|
1136
|
+
cellSize: PADRAO_CELL,
|
|
1137
|
+
originX: -1.6,
|
|
1138
|
+
wallRows: 144,
|
|
1139
|
+
sidewalkRows: 128,
|
|
1140
|
+
curbRows: 12,
|
|
1141
|
+
roadRows: 112,
|
|
1142
|
+
wallTopY: 1.95,
|
|
1143
|
+
sidewalkY: 0.15,
|
|
1144
|
+
roadY: 0,
|
|
1145
|
+
wallZ: PADRAO_WALL_Z,
|
|
1146
|
+
curbStep: PADRAO_CELL,
|
|
1147
|
+
roadSlopeAnchorX: 0,
|
|
1148
|
+
rules: {
|
|
1149
|
+
dropCapacity: 600,
|
|
1150
|
+
curbCatch: true,
|
|
1151
|
+
guardBehindWall: true,
|
|
1152
|
+
clipRoadEnd: true,
|
|
1153
|
+
escapeBox: { minX: -3, maxX: 3, maxZ: PADRAO_WALL_Z + 128 * PADRAO_CELL + 112 * PADRAO_CELL + 1 },
|
|
1154
|
+
dripStyle: "padrao"
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
var WORKSHOP_CELL = 0.0125;
|
|
1158
|
+
var WORKSHOP_LAYOUT = createFoldedLayout({
|
|
1159
|
+
id: "workshop",
|
|
1160
|
+
columns: 160,
|
|
1161
|
+
cellSize: WORKSHOP_CELL,
|
|
1162
|
+
originX: -2.2,
|
|
1163
|
+
wallRows: 160,
|
|
1164
|
+
sidewalkRows: 128,
|
|
1165
|
+
curbRows: 9,
|
|
1166
|
+
roadRows: 151,
|
|
1167
|
+
wallTopY: 2.12,
|
|
1168
|
+
sidewalkY: 0.1235,
|
|
1169
|
+
roadY: 9e-3,
|
|
1170
|
+
wallZ: -4.497,
|
|
1171
|
+
roadSlopeAnchorX: -1.2,
|
|
1172
|
+
rules: { dropCapacity: 400, curbCatch: false, guardBehindWall: false, clipRoadEnd: false, dripStyle: "workshop" }
|
|
1173
|
+
});
|
|
1174
|
+
|
|
341
1175
|
// ../game-items-goods/dist/index.js
|
|
342
1176
|
var FLOORPLAN_POOL_KEYS = {
|
|
343
1177
|
fridge: "geladeira",
|
|
@@ -13954,6 +14788,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
13954
14788
|
impact: {
|
|
13955
14789
|
response: "dent",
|
|
13956
14790
|
pushImpulse: true
|
|
14791
|
+
},
|
|
14792
|
+
use: {
|
|
14793
|
+
clip: "use_hygiene",
|
|
14794
|
+
sounds: [
|
|
14795
|
+
"scrub"
|
|
14796
|
+
]
|
|
13957
14797
|
}
|
|
13958
14798
|
}
|
|
13959
14799
|
}
|
|
@@ -17541,6 +18381,22 @@ var GameInteractablesHousehold = (() => {
|
|
|
17541
18381
|
items: [
|
|
17542
18382
|
"alcohol_70",
|
|
17543
18383
|
"povidone_iodine"
|
|
18384
|
+
],
|
|
18385
|
+
params: {
|
|
18386
|
+
clip: "apply_dressing"
|
|
18387
|
+
}
|
|
18388
|
+
},
|
|
18389
|
+
{
|
|
18390
|
+
id: "wash",
|
|
18391
|
+
effect: "wash",
|
|
18392
|
+
consumes: false,
|
|
18393
|
+
items: [
|
|
18394
|
+
"soap",
|
|
18395
|
+
"shampoo",
|
|
18396
|
+
"toothpaste",
|
|
18397
|
+
"toothbrush",
|
|
18398
|
+
"deodorant",
|
|
18399
|
+
"towel"
|
|
17544
18400
|
]
|
|
17545
18401
|
},
|
|
17546
18402
|
{
|
|
@@ -17562,7 +18418,44 @@ var GameInteractablesHousehold = (() => {
|
|
|
17562
18418
|
consumes: false,
|
|
17563
18419
|
items: [
|
|
17564
18420
|
"flashlight"
|
|
17565
|
-
]
|
|
18421
|
+
],
|
|
18422
|
+
params: {
|
|
18423
|
+
clip: "toggle_flashlight"
|
|
18424
|
+
}
|
|
18425
|
+
},
|
|
18426
|
+
{
|
|
18427
|
+
id: "ignite",
|
|
18428
|
+
effect: "ignite",
|
|
18429
|
+
consumes: false,
|
|
18430
|
+
items: [
|
|
18431
|
+
"lighter"
|
|
18432
|
+
],
|
|
18433
|
+
params: {
|
|
18434
|
+
clip: "light_lighter"
|
|
18435
|
+
}
|
|
18436
|
+
},
|
|
18437
|
+
{
|
|
18438
|
+
id: "radio_call",
|
|
18439
|
+
effect: "radio_call",
|
|
18440
|
+
consumes: false,
|
|
18441
|
+
items: [
|
|
18442
|
+
"portable_radio",
|
|
18443
|
+
"walkie_talkies"
|
|
18444
|
+
],
|
|
18445
|
+
params: {
|
|
18446
|
+
clip: "use_radio"
|
|
18447
|
+
}
|
|
18448
|
+
},
|
|
18449
|
+
{
|
|
18450
|
+
id: "turn_key",
|
|
18451
|
+
effect: "turn_key",
|
|
18452
|
+
consumes: false,
|
|
18453
|
+
category: [
|
|
18454
|
+
"keys"
|
|
18455
|
+
],
|
|
18456
|
+
params: {
|
|
18457
|
+
clip: "turn_key"
|
|
18458
|
+
}
|
|
17566
18459
|
},
|
|
17567
18460
|
{
|
|
17568
18461
|
id: "swap_bag",
|
|
@@ -18863,6 +19756,29 @@ var GameInteractablesHousehold = (() => {
|
|
|
18863
19756
|
"kind.hygiene.description": "Sabonete, pasta de dente, papel higi\xEAnico e toalha."
|
|
18864
19757
|
};
|
|
18865
19758
|
var GOODS_STRINGS = { en: en_default, "pt-BR": pt_BR_default };
|
|
19759
|
+
var drinkHydrationOf = (item, liquids = LIQUIDS) => {
|
|
19760
|
+
const fluid = item.fluid;
|
|
19761
|
+
const drink = fluid ? liquids.find((liquid) => liquid.id === fluid.liquid)?.drink : void 0;
|
|
19762
|
+
if (!fluid || !drink) return void 0;
|
|
19763
|
+
const doses = item.durability?.kind === "doses" ? Math.max(1, item.durability.amount ?? 1) : 1;
|
|
19764
|
+
return drink.thirst * fluid.liters / doses;
|
|
19765
|
+
};
|
|
19766
|
+
var createGoodsItemUse = (options = {}) => {
|
|
19767
|
+
const kinds = options.kinds ?? createGoodsKinds();
|
|
19768
|
+
const effects = options.effects ?? GOODS_USE_EFFECTS;
|
|
19769
|
+
const liquids = options.liquids ?? LIQUIDS;
|
|
19770
|
+
return (item) => {
|
|
19771
|
+
if (item.kind === void 0 || !kinds.has(item.kind)) return void 0;
|
|
19772
|
+
const result = resolveUse(item, effects);
|
|
19773
|
+
const { clip: effectClip, ...params } = result?.params ?? {};
|
|
19774
|
+
const clip = typeof effectClip === "string" ? effectClip : resolveEntry(kinds, item).use?.clip;
|
|
19775
|
+
if (clip === void 0) return void 0;
|
|
19776
|
+
if (!result) return { clip, consumes: false };
|
|
19777
|
+
const nutrition = result.nutrition ? { satiety: result.nutrition.satiety, hydration: drinkHydrationOf(item, liquids) ?? result.nutrition.hydration } : {};
|
|
19778
|
+
return { clip, consumes: result.consumes, effect: { id: result.effect, ...Object.keys(params).length > 0 ? { params } : {}, ...nutrition } };
|
|
19779
|
+
};
|
|
19780
|
+
};
|
|
19781
|
+
var goodsItemUse = createGoodsItemUse();
|
|
18866
19782
|
|
|
18867
19783
|
// src/destruction.ts
|
|
18868
19784
|
var door = (material, joint = "hinge", piece2 = "door") => ({ material, joint, piece: piece2 });
|
|
@@ -18874,6 +19790,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
18874
19790
|
var fridgeLike = { body: { material: "steel", joint: "weld" }, parts: [[/^door/, door("steel")]] };
|
|
18875
19791
|
var bin = { body: { material: "plastic", joint: "fused" }, parts: [["lid", door("plastic", "hinge", "lid")]] };
|
|
18876
19792
|
var upholstery = { material: "fabric", joint: "glue" };
|
|
19793
|
+
var POLE_CAGE = { material: "steel", spacing: 0.1, diameter: 0.01 };
|
|
18877
19794
|
var DESTRUCTION = {
|
|
18878
19795
|
fridge: fridgeLike,
|
|
18879
19796
|
fridge_compact: fridgeLike,
|
|
@@ -18899,7 +19816,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
18899
19816
|
},
|
|
18900
19817
|
wall_socket: { body: { material: "plastic", joint: "screw" }, parts: [] },
|
|
18901
19818
|
wall_switch: { body: { material: "plastic", joint: "screw" }, parts: [["rocker", { material: "plastic", joint: "clip", piece: "rocker" }]] },
|
|
18902
|
-
|
|
19819
|
+
// a cast concrete pole (NBR 8451: CA-50 bars in the concrete), its segments held by the bars; the meter box, the cross arm and the bracket are bolted to it
|
|
19820
|
+
service_entrance: { body: { material: "concrete", joint: "rebar", reinforcement: POLE_CAGE }, parts: [["meter_door", door("steel")]] },
|
|
18903
19821
|
conduit_run: { body: { material: "plastic", joint: "clip" }, parts: [] },
|
|
18904
19822
|
service_mast: { body: { material: "steel", joint: "clip" }, parts: [] },
|
|
18905
19823
|
electrical_panel: {
|
|
@@ -19034,6 +19952,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
19034
19952
|
}
|
|
19035
19953
|
} else if (p.kind === "leaf") {
|
|
19036
19954
|
out.push([p.x, p.y, p.z], [p.x, p.y + p.h, p.z]);
|
|
19955
|
+
} else if (p.kind === "lathe") {
|
|
19956
|
+
const r = Math.max(...p.points.map((q) => q[0]));
|
|
19957
|
+
const ys = p.points.map((q) => q[1]);
|
|
19958
|
+
for (const sx of [-1, 1]) for (const y of [Math.min(...ys), Math.max(...ys)]) for (const sz of [-1, 1]) out.push([p.x + sx * r, p.y + y, p.z + sz * r]);
|
|
19037
19959
|
} else {
|
|
19038
19960
|
out.push([p.x, p.y, p.z]);
|
|
19039
19961
|
}
|
|
@@ -19144,6 +20066,21 @@ var GameInteractablesHousehold = (() => {
|
|
|
19144
20066
|
this.track({ kind: "cylinder", M: this.M, material: m, x, y, z, r, h, color, rx, rz, shape });
|
|
19145
20067
|
this.api.cylinder(this.M, m, x - o[0], y - o[1], z - o[2], r, h, color, rx, rz, shape);
|
|
19146
20068
|
}
|
|
20069
|
+
/**
|
|
20070
|
+
* A solid of revolution round the vertical axis through (x, z): its closed profile `points` (`[r, y]`, y from `y`) goes up outside and down inside for a hollow
|
|
20071
|
+
* piece (a toilet bowl, a seat ring), so both faces show and what is inside is open. A host without lathes draws the cylinder round it.
|
|
20072
|
+
*/
|
|
20073
|
+
lathe(m, x, y, z, points, color) {
|
|
20074
|
+
const o = this.off;
|
|
20075
|
+
this.track({ kind: "lathe", M: this.M, material: m, x, y, z, points, color });
|
|
20076
|
+
if (this.api.lathe) {
|
|
20077
|
+
this.api.lathe(this.M, m, x - o[0], y - o[1], z - o[2], points, color);
|
|
20078
|
+
return;
|
|
20079
|
+
}
|
|
20080
|
+
const ys = points.map((q) => q[1]);
|
|
20081
|
+
const lo = Math.min(...ys);
|
|
20082
|
+
this.api.cylinder(this.M, m, x - o[0], y + lo - o[1], z - o[2], Math.max(...points.map((q) => q[0])), Math.max(...ys) - lo, color, 0, 0);
|
|
20083
|
+
}
|
|
19147
20084
|
/** Cylinder lying along x (`axis` 'x') or z (`axis` 'z'), centered at (x, y, z), length `len`. */
|
|
19148
20085
|
rod(m, axis, x, y, z, r, len, color, shape) {
|
|
19149
20086
|
if (axis === "x") this.cyl(m, x, y, z, r, len, color, shape, 0, Math.PI / 2);
|
|
@@ -19273,7 +20210,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
19273
20210
|
this.collider("body", -this.hw, this.y0, -this.hd, this.hw, this.y0 + this.h, this.hd);
|
|
19274
20211
|
}
|
|
19275
20212
|
const body = DESTRUCTION[this.type]?.body;
|
|
19276
|
-
if (body && !this.spec.destruction) this.spec.destruction = { ...body };
|
|
20213
|
+
if (body && !this.spec.destruction) this.spec.destruction = body.reinforcement ? { ...body, reinforcement: { ...body.reinforcement } } : { ...body };
|
|
19277
20214
|
for (const k of Object.keys(s)) if (Array.isArray(s[k]) && s[k].length === 0) delete s[k];
|
|
19278
20215
|
return this.spec;
|
|
19279
20216
|
}
|
|
@@ -20690,7 +21627,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20690
21627
|
h: 0.7,
|
|
20691
21628
|
y: 1.4,
|
|
20692
21629
|
solid: true,
|
|
20693
|
-
massKg: 15
|
|
21630
|
+
massKg: 15,
|
|
21631
|
+
fixed: true
|
|
20694
21632
|
},
|
|
20695
21633
|
{
|
|
20696
21634
|
id: "pantry",
|
|
@@ -20775,7 +21713,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20775
21713
|
h: 1.2,
|
|
20776
21714
|
y: 0,
|
|
20777
21715
|
solid: true,
|
|
20778
|
-
massKg: 40
|
|
21716
|
+
massKg: 40,
|
|
21717
|
+
fixed: true
|
|
20779
21718
|
},
|
|
20780
21719
|
{
|
|
20781
21720
|
id: "sink_bathroom",
|
|
@@ -20785,7 +21724,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20785
21724
|
h: 1.05,
|
|
20786
21725
|
y: 0,
|
|
20787
21726
|
solid: true,
|
|
20788
|
-
massKg: 25
|
|
21727
|
+
massKg: 25,
|
|
21728
|
+
fixed: true
|
|
20789
21729
|
},
|
|
20790
21730
|
{
|
|
20791
21731
|
id: "shower",
|
|
@@ -20795,7 +21735,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20795
21735
|
h: 2.1,
|
|
20796
21736
|
y: 0,
|
|
20797
21737
|
solid: true,
|
|
20798
|
-
massKg: 90
|
|
21738
|
+
massKg: 90,
|
|
21739
|
+
fixed: true
|
|
20799
21740
|
},
|
|
20800
21741
|
{
|
|
20801
21742
|
id: "toilet",
|
|
@@ -20805,7 +21746,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20805
21746
|
h: 0.8,
|
|
20806
21747
|
y: 0,
|
|
20807
21748
|
solid: true,
|
|
20808
|
-
massKg: 30
|
|
21749
|
+
massKg: 30,
|
|
21750
|
+
fixed: true
|
|
20809
21751
|
},
|
|
20810
21752
|
{
|
|
20811
21753
|
id: "utility_sink",
|
|
@@ -20815,7 +21757,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20815
21757
|
h: 1.2,
|
|
20816
21758
|
y: 0,
|
|
20817
21759
|
solid: true,
|
|
20818
|
-
massKg: 25
|
|
21760
|
+
massKg: 25,
|
|
21761
|
+
fixed: true
|
|
20819
21762
|
},
|
|
20820
21763
|
{
|
|
20821
21764
|
id: "wall_socket",
|
|
@@ -20845,7 +21788,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
20845
21788
|
h: 6.5,
|
|
20846
21789
|
y: 0,
|
|
20847
21790
|
solid: true,
|
|
20848
|
-
massKg:
|
|
21791
|
+
massKg: 320,
|
|
21792
|
+
fixed: true
|
|
20849
21793
|
},
|
|
20850
21794
|
{
|
|
20851
21795
|
id: "service_mast",
|
|
@@ -21466,8 +22410,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
21466
22410
|
const mx = 0.19;
|
|
21467
22411
|
const my = 1.45;
|
|
21468
22412
|
const mz = 0.14;
|
|
21469
|
-
c.b("metal", -mx, my, mz - 0.06, mx, my + 0.5, mz
|
|
21470
|
-
c.b("
|
|
22413
|
+
c.b("metal", -mx, my, mz - 0.06, mx, my + 0.5, mz, 9080466);
|
|
22414
|
+
c.b("metal", -mx, my, mz, mx, my + 0.02, mz + 0.06, 9080466);
|
|
22415
|
+
c.b("metal", -mx, my + 0.48, mz, mx, my + 0.5, mz + 0.06, 9080466);
|
|
22416
|
+
c.b("metal", -mx, my + 0.02, mz, -mx + 0.02, my + 0.48, mz + 0.06, 9080466);
|
|
22417
|
+
c.b("metal", mx - 0.02, my + 0.02, mz, mx, my + 0.48, mz + 0.06, 9080466);
|
|
22418
|
+
c.b("plain", -mx + 0.02, my + 0.02, mz, mx - 0.02, my + 0.48, mz + 3e-3, 13948630);
|
|
21471
22419
|
c.cyl("plain", 0, my + 0.28, mz + 0.03, 0.09, 0.02, 15921904, "cyl");
|
|
21472
22420
|
c.rod("plain", "z", 0, my + 0.28, mz + 0.045, 0.07, 4e-3, 15263968);
|
|
21473
22421
|
for (let i = 0; i < 4; i++) c.b("plain", -0.06 + i * 0.03, my + 0.34, mz + 0.047, -0.04 + i * 0.03, my + 0.37, mz + 0.05, 2763306);
|
|
@@ -21565,11 +22513,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
21565
22513
|
const sh = shell(c, { x0: -hw, x1: hw, y0: y0 + 0.012, y1, z0: -hd, z1: zb, color: body, inner: 15264492, t: 0.014, tBack: 0.012, material: "plain" });
|
|
21566
22514
|
for (const sx of [-1, 1]) c.b("plain", sx * (hw - 0.04) - 0.02, y0, -hd + 0.04, sx * (hw - 0.04) + 0.02, y0 + 0.012, zb - 0.04, 2763308);
|
|
21567
22515
|
const px = hw * 0.55;
|
|
21568
|
-
c.b("plain", px, y0 + 0.
|
|
21569
|
-
c.cyl("metal", (sh.ix0 + px) / 2,
|
|
21570
|
-
c.cyl("plain", (sh.ix0 + px) / 2,
|
|
22516
|
+
c.b("plain", px, y0 + 0.014, zb, hw - 0.014, y1 - 0.016, zf, shade(body, 0.7));
|
|
22517
|
+
c.cyl("metal", (sh.ix0 + px) / 2, sh.iy0 + 2e-3, (sh.iz0 + zb) / 2, 0.14, 0.012, 13623526, "cyl");
|
|
22518
|
+
c.cyl("plain", (sh.ix0 + px) / 2, sh.iy0 - 6e-3, (sh.iz0 + zb) / 2, 0.03, 8e-3, 8948364, "cyl6");
|
|
21571
22519
|
for (let i = 0; i < 6; i++) c.b("plain", px + 0.02, y1 - 0.06 - i * 0.034, zf, hw - 0.04, y1 - 0.04 - i * 0.034, zf + 4e-3, i === 5 ? 4885066 : 4869200);
|
|
21572
|
-
c.b("plain", px + 0.02, y1 - 0.
|
|
22520
|
+
c.b("plain", px + 0.02, y1 - 0.038, zf, hw - 0.04, y1 - 0.024, zf + 2e-3, 793104);
|
|
21573
22521
|
hingedDoor(c, {
|
|
21574
22522
|
id: "door",
|
|
21575
22523
|
x0: sh.ix0 - 0.014 + 3e-3,
|
|
@@ -21629,10 +22577,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
21629
22577
|
[-R - 0.03, cy, dz],
|
|
21630
22578
|
{ kind: "hinge", axis: [0, 1, 0], angle: -1.7 },
|
|
21631
22579
|
() => {
|
|
21632
|
-
c.rod("plain", "z", 0, cy, dz + 0.
|
|
21633
|
-
c.rod("plain", "z", 0, cy, dz + 0.
|
|
22580
|
+
c.rod("plain", "z", 0, cy, dz + 0.018, R + 0.03, 0.036, 14869990);
|
|
22581
|
+
c.rod("plain", "z", 0, cy, dz + 0.0375, R - 0.02, 3e-3, 9080466);
|
|
21634
22582
|
c.rod("glass", "z", 0, cy, dz + 0.042, R - 0.035, 3e-3, 8296612);
|
|
21635
|
-
c.b("plain", R - 0, cy - 0.04, dz + 0.02, R + 0.045, cy + 0.04, dz + 0.
|
|
22583
|
+
c.b("plain", R - 0, cy - 0.04, dz + 0.02, R + 0.045, cy + 0.04, dz + 0.039, 13488338);
|
|
21636
22584
|
},
|
|
21637
22585
|
{ label: "prompt.washing_door", at: [0, cy, dz + 0.06], radius: 1.3 }
|
|
21638
22586
|
);
|
|
@@ -21750,7 +22698,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21750
22698
|
var STOVE_WALL_GAP = 0.04;
|
|
21751
22699
|
var STEEL = 11843772;
|
|
21752
22700
|
var CHROME = 13817562;
|
|
21753
|
-
function tap2(c, x, y, z, id, partId) {
|
|
22701
|
+
function tap2(c, x, y, z, id, partId, basin) {
|
|
21754
22702
|
c.cyl("metal", x, y - 2e-3, z, 0.03, 0.022, STEEL, "cyl");
|
|
21755
22703
|
c.cyl("metal", x, y + 0.02, z, 0.017, 0.19, CHROME, "cyl");
|
|
21756
22704
|
c.cyl("metal", x, y + 0.2, z, 0.021, 0.02, STEEL, "cyl");
|
|
@@ -21769,7 +22717,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21769
22717
|
);
|
|
21770
22718
|
const outlet = [round3(x), round3(y + 0.185), round3(z + 0.18)];
|
|
21771
22719
|
c.add("fixtures", { id, kind: "tap", outlet, dir: [0, -1, 0], flow: 7, part: partId, tank: "auto" });
|
|
21772
|
-
c.add("emitters", { id: `${id}_water`, kind: "water", pos: outlet, dir: [0, -1, 0], source: id, size: 0.02,
|
|
22720
|
+
c.add("emitters", { id: `${id}_water`, kind: "water", pos: outlet, dir: [0, -1, 0], source: id, size: 0.02, ...streamInto(basin, outlet) });
|
|
21773
22721
|
c.interact(`use_${id}`, [round3(x + 0.05), round3(y + 0.126), round3(z)], { do: "toggle_fixture", fixture: id }, "prompt.tap", 1.3);
|
|
21774
22722
|
return outlet;
|
|
21775
22723
|
}
|
|
@@ -21797,7 +22745,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21797
22745
|
c.b("plain", ox0 + 0.01, oy0 + 0.01, -hd + 0.03, ox1 - 0.01, oy1 - 0.01, -hd + 0.04, 7237490);
|
|
21798
22746
|
for (const y of [0.28, 0.46]) c.b("metal", ox0 + 0.01, y, -hd + 0.04, ox1 - 0.01, y + 6e-3, zb - 0.03, 10133154);
|
|
21799
22747
|
c.b("plain", -hw + 0.02, oy1 + 3e-3, zb, hw - 0.02, top, zf, body);
|
|
21800
|
-
c.b("plain", -hw + 0.02, oy1 +
|
|
22748
|
+
c.b("plain", -hw + 0.02, oy1 + 5e-3, zf - 4e-3, hw - 0.02, oy1 + 0.012, zf + 2e-3, shade(body, 0.8));
|
|
21801
22749
|
dropDoor(c, {
|
|
21802
22750
|
id: "oven_door",
|
|
21803
22751
|
x0: -hw + 0.012,
|
|
@@ -21814,7 +22762,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21814
22762
|
label: "prompt.oven_door",
|
|
21815
22763
|
extra: () => {
|
|
21816
22764
|
c.b("plain", -hw + 0.07, 0.15, zf - 2e-3, hw - 0.07, 0.56, zf + 2e-3, shade(body, 0.8));
|
|
21817
|
-
c.plane("glass", 0, 0.355, zf +
|
|
22765
|
+
c.plane("glass", 0, 0.355, zf + 45e-4, c.w - 0.2, 0.36, 1842722);
|
|
21818
22766
|
}
|
|
21819
22767
|
});
|
|
21820
22768
|
const bx = [-0.14, 0.14];
|
|
@@ -21834,7 +22782,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21834
22782
|
c.cyl("metal", x, topY + 0.015, z, r * 0.4, 6e-3, 9079952, "cyl");
|
|
21835
22783
|
for (const s of [-1, 1]) {
|
|
21836
22784
|
c.b("metal", x - r - 0.03, topY + 0.02, z + s * r - 6e-3, x + r + 0.03, topY + 0.032, z + s * r + 6e-3, 2236964);
|
|
21837
|
-
c.b("metal", x + s * r - 6e-3, topY + 0.
|
|
22785
|
+
c.b("metal", x + s * r - 6e-3, topY + 0.018, z - r - 0.03, x + s * r + 6e-3, topY + 0.03, z + r + 0.03, 2236964);
|
|
21838
22786
|
}
|
|
21839
22787
|
const knobId = `knob_${n}`;
|
|
21840
22788
|
const kx = knobXs[n - 1];
|
|
@@ -21881,7 +22829,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21881
22829
|
c.b("metal", gr - 8e-3, H - 0.034, -gr + 8e-3, gr + 8e-3, H - 0.022, gr - 8e-3, shade(col, 0.7));
|
|
21882
22830
|
c.cyl("metal", 0, H - 0.17, 0, 0.032, 0.1, 13148746, "cyl");
|
|
21883
22831
|
c.cyl("metal", 0, H - 0.075, 0, 0.022, 0.03, 10255410, "cyl6");
|
|
21884
|
-
c.b("metal", 0.02, H - 0.1, -0.012, 0.075, H - 0.
|
|
22832
|
+
c.b("metal", 0.02, H - 0.1, -0.012, 0.075, H - 0.072, 0.012, 11569716);
|
|
21885
22833
|
c.part(
|
|
21886
22834
|
"valve",
|
|
21887
22835
|
[0, H - 0.045, 0],
|
|
@@ -21905,6 +22853,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
21905
22853
|
c.spec.colliders = [];
|
|
21906
22854
|
c.collider("body", -R, 0, -R, R, H, R);
|
|
21907
22855
|
}
|
|
22856
|
+
function streamInto(basin, outlet) {
|
|
22857
|
+
const [x, , z] = outlet;
|
|
22858
|
+
const radius = Math.max(0.01, Math.min(x - basin.from[0], basin.to[0] - x, z - basin.from[2], basin.to[2] - z));
|
|
22859
|
+
return { reach: round3(outlet[1] - basin.from[1]), bowl: { radius: round3(radius), depth: round3(basin.to[1] - basin.from[1]) } };
|
|
22860
|
+
}
|
|
21908
22861
|
function counterWithBasin(c, o) {
|
|
21909
22862
|
const { hw, hd } = c;
|
|
21910
22863
|
const y0 = o.top - 0.04;
|
|
@@ -21929,10 +22882,16 @@ var GameInteractablesHousehold = (() => {
|
|
|
21929
22882
|
c.b(mat, o.bx0 - 0.02, o.top, o.bz1, o.bx1 + 0.02, o.top + 4e-3, o.bz1 + 0.02, wall);
|
|
21930
22883
|
c.b(mat, o.bx0 - 0.02, o.top, o.bz0, o.bx0, o.top + 4e-3, o.bz1, wall);
|
|
21931
22884
|
c.b(mat, o.bx1, o.top, o.bz0, o.bx1 + 0.02, o.top + 4e-3, o.bz1, wall);
|
|
22885
|
+
const basin = { id: "basin", from: [round3(o.bx0), round3(yb + 0.01), round3(o.bz0)], to: [round3(o.bx1), round3(o.top), round3(o.bz1)] };
|
|
22886
|
+
c.add("basins", basin);
|
|
22887
|
+
return basin;
|
|
21932
22888
|
}
|
|
21933
|
-
|
|
22889
|
+
var KITCHEN_BASIN_DEPTH = 0.2;
|
|
22890
|
+
var BATHROOM_BASIN_DEPTH = 0.14;
|
|
22891
|
+
var TAILPIECE_GAP = 2e-3;
|
|
22892
|
+
function pipes(c, x, bottom, z) {
|
|
21934
22893
|
const wall = -c.hd + 2e-3;
|
|
21935
|
-
c.cyl("metal", x, 0.2, z, 0.02,
|
|
22894
|
+
c.cyl("metal", x, 0.2, z, 0.02, bottom - 0.2 - TAILPIECE_GAP, 13159632, "cyl6");
|
|
21936
22895
|
c.rod("plain", "x", x + 0.06, 0.2, z, 0.02, 0.14, 15263976, "cyl6");
|
|
21937
22896
|
c.cyl("plain", x + 0.13, 0.07, z, 0.022, 0.15, 15263976, "cyl6");
|
|
21938
22897
|
c.rod("plain", "z", x + 0.13, 0.09, (z + wall) / 2, 0.02, z - wall, 15263976, "cyl6");
|
|
@@ -21952,10 +22911,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
21952
22911
|
const bx1 = -hw * 0.05;
|
|
21953
22912
|
const bz0 = -hd * 0.65;
|
|
21954
22913
|
const bz1 = hd * 0.45;
|
|
21955
|
-
counterWithBasin(c, { top, bx0, bx1, bz0, bz1, depth:
|
|
22914
|
+
const basin = counterWithBasin(c, { top, bx0, bx1, bz0, bz1, depth: KITCHEN_BASIN_DEPTH, counter: 8157816, steel: true });
|
|
21956
22915
|
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);
|
|
21957
|
-
tap2(c, (bx0 + bx1) / 2, top, -hd + 0.07, "tap", "tap_handle");
|
|
21958
|
-
pipes(c, (bx0 + bx1) / 2, top
|
|
22916
|
+
tap2(c, (bx0 + bx1) / 2, top, -hd + 0.07, "tap", "tap_handle", basin);
|
|
22917
|
+
pipes(c, (bx0 + bx1) / 2, top - KITCHEN_BASIN_DEPTH, (bz0 + bz1) / 2);
|
|
21959
22918
|
const mid = 15e-4;
|
|
21960
22919
|
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" });
|
|
21961
22920
|
hingedDoor(c, { id: "door_2", x0: mid, x1: hw - 3e-3, y0: 0.103, y1: top - 0.043, zf, t, side: "right", color: front, inner: lining, handle: "bar_v", handleLen: 0.22, label: "prompt.door" });
|
|
@@ -21980,10 +22939,12 @@ var GameInteractablesHousehold = (() => {
|
|
|
21980
22939
|
const zr = zf - t - 3e-3;
|
|
21981
22940
|
const sh = shell(c, { x0: -hw, x1: hw, y0: 0.08, y1: top - 0.04, z0: -hd, z1: zr, color: body, inner: lining, t: 0.016, noTop: true, material: "plain" });
|
|
21982
22941
|
c.b("plain", -hw + 0.01, 0, -hd + 0.03, hw - 0.01, 0.08, zr - 0.04, 3815478);
|
|
21983
|
-
|
|
22942
|
+
const bz0 = -hd * 0.5;
|
|
22943
|
+
const bz1 = hd * 0.55;
|
|
22944
|
+
const basin = counterWithBasin(c, { top, bx0: -hw * 0.6, bx1: hw * 0.6, bz0, bz1, depth: BATHROOM_BASIN_DEPTH, counter: 15328474, steel: false });
|
|
21984
22945
|
c.b("plain", -hw, top, -hd, hw, top + 0.08, -hd + 0.015, 15328474);
|
|
21985
|
-
tap2(c, 0, top, -hd + 0.07, "tap", "tap_handle");
|
|
21986
|
-
pipes(c, 0, top
|
|
22946
|
+
tap2(c, 0, top, -hd + 0.07, "tap", "tap_handle", basin);
|
|
22947
|
+
pipes(c, 0, top - BATHROOM_BASIN_DEPTH, (bz0 + bz1) / 2);
|
|
21987
22948
|
hingedDoor(c, { id: "door", x0: -hw + 3e-3, x1: hw - 3e-3, y0: 0.083, y1: top - 0.043, zf, t, side: c.M.hinge ?? "left", color: body, inner: lining, style: "flat", handle: "knob", label: "prompt.door" });
|
|
21988
22949
|
c.container({
|
|
21989
22950
|
id: "under_sink",
|
|
@@ -22013,7 +22974,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
22013
22974
|
c.b("plain", x0 + 0.03, tubTop - 0.278, z0 + 0.03, x1 - 0.03, tubTop - 0.276, z1 - 0.03, 15527662);
|
|
22014
22975
|
c.cyl("metal", 0, tubTop - 0.276, 0, 0.035, 4e-3, 6975090, "cyl");
|
|
22015
22976
|
c.b("plain", x0 + 0.04, tubTop - 0.27, z1 - 0.2, x0 + 0.04 + (x1 - x0) * 0.4, tubTop - 0.1, z1 - 0.06, 14343644, 0, 0.5);
|
|
22016
|
-
|
|
22977
|
+
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)] };
|
|
22978
|
+
c.add("basins", tub);
|
|
22979
|
+
tap2(c, 0, tubTop + 0.08, -hd + 0.08, "tap", "tap_handle", tub);
|
|
22017
22980
|
c.add("fixtures", { id: "basin", kind: "utility_sink", outlet: [0, round3(tubTop - 0.1), 0], dir: [0, -1, 0], flow: 12, tank: "auto" });
|
|
22018
22981
|
}
|
|
22019
22982
|
function shower(c) {
|
|
@@ -22025,15 +22988,15 @@ var GameInteractablesHousehold = (() => {
|
|
|
22025
22988
|
for (let i = 0; i < 4; i++) c.b("plain", -0.04, 0.076, -0.03 + i * 0.02, 0.04, 0.078, -0.022 + i * 0.02, 6975090);
|
|
22026
22989
|
c.b("plain", -hw, 0.07, -hd, hw, h, -hd + 0.03, tile);
|
|
22027
22990
|
c.b("plain", -hw, 0.07, -hd + 0.03, -hw + 0.03, h, hd - 0.05, tile);
|
|
22991
|
+
const f = 0.02;
|
|
22028
22992
|
for (let y = 0.4; y < h - 0.2; y += 0.3) {
|
|
22029
|
-
c.b("plain", -hw + 0.03, y, -hd + 0.03, hw, y + 6e-3, -hd + 0.033, 12764872);
|
|
22993
|
+
c.b("plain", -hw + 0.03, y, -hd + 0.03, hw - f, y + 6e-3, -hd + 0.033, 12764872);
|
|
22030
22994
|
c.b("plain", -hw + 0.03, y, -hd + 0.033, -hw + 0.033, y + 6e-3, hd - 0.05, 12764872);
|
|
22031
22995
|
}
|
|
22032
|
-
c.b("plain", -hw + 0.03, 1, -hd + 0.033, hw, 1.12, -hd + 0.036, 9086644);
|
|
22033
|
-
|
|
22034
|
-
c.b("metal", -hw + 0.03, h - f, hd - 0.05, hw, h, hd, 12896460);
|
|
22996
|
+
c.b("plain", -hw + 0.03, 1, -hd + 0.033, hw - f, 1.12, -hd + 0.036, 9086644);
|
|
22997
|
+
c.b("metal", -hw + 0.03, h - f, hd - 0.05, hw - f, h, hd, 12896460);
|
|
22035
22998
|
c.b("metal", hw - f, 0.07, -hd + 0.03, hw, h, hd, 12896460);
|
|
22036
|
-
c.b("metal", -hw + 0.03, h - f, -hd + 0.03, hw, h, -hd + 0.
|
|
22999
|
+
c.b("metal", -hw + 0.03, h - f, -hd + 0.03, hw - f, h, -hd + 0.04, 12896460);
|
|
22037
23000
|
const hy = 1.95;
|
|
22038
23001
|
c.b("metal", -0.015, hy, -hd + 0.03, 0.015, hy + 0.02, -hd + 0.2, CHROME);
|
|
22039
23002
|
c.cyl("metal", 0, hy - 0.02, -hd + 0.2, 0.075, 0.03, 15264492, "cyl");
|
|
@@ -22062,7 +23025,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22062
23025
|
[dx1 - dw / 2, gy, zSlide],
|
|
22063
23026
|
{ kind: "slide", axis: [-1, 0, 0], distance: round3(dw - 0.06) },
|
|
22064
23027
|
() => {
|
|
22065
|
-
c.b("glass", dx1 - dw, gy, zSlide - 4e-3, dx1, gy + gh, zSlide + 4e-3, gl);
|
|
23028
|
+
c.b("glass", dx1 - dw + 2e-3, gy + 2e-3, zSlide - 4e-3, dx1 - 2e-3, gy + gh - 2e-3, zSlide + 4e-3, gl);
|
|
22066
23029
|
c.b("metal", dx1 - dw, gy, zSlide - 8e-3, dx1, gy + 0.015, zSlide + 8e-3, 12896460);
|
|
22067
23030
|
c.b("metal", dx1 - dw, gy + gh - 0.015, zSlide - 8e-3, dx1, gy + gh, zSlide + 8e-3, 12896460);
|
|
22068
23031
|
c.b("metal", dx1 - dw, gy + gh * 0.45, zSlide + 4e-3, dx1 - dw + 0.02, gy + gh * 0.45 + 0.3, zSlide + 0.024, 12896460);
|
|
@@ -22076,31 +23039,45 @@ var GameInteractablesHousehold = (() => {
|
|
|
22076
23039
|
c.collider("wall_back", -hw, 0, -hd, hw, h, -hd + 0.03);
|
|
22077
23040
|
c.collider("wall_left", -hw, 0, -hd + 0.03, -hw + 0.03, h, hd - 0.05);
|
|
22078
23041
|
}
|
|
23042
|
+
var FLUSH_TRAVEL = 8e-3;
|
|
23043
|
+
var BOWL_Z = 0.12;
|
|
23044
|
+
var BOWL_PROFILE = [
|
|
23045
|
+
[0, 0],
|
|
23046
|
+
[0.12, 0],
|
|
23047
|
+
[0.11, 0.16],
|
|
23048
|
+
[0.15, 0.24],
|
|
23049
|
+
[0.185, 0.31],
|
|
23050
|
+
[0.19, 0.36],
|
|
23051
|
+
[0.19, 0.4],
|
|
23052
|
+
[0.15, 0.4],
|
|
23053
|
+
[0.145, 0.37],
|
|
23054
|
+
[0.12, 0.32],
|
|
23055
|
+
[0.08, 0.28],
|
|
23056
|
+
[0.04, 0.255],
|
|
23057
|
+
[0, 0.25]
|
|
23058
|
+
];
|
|
23059
|
+
var SEAT_PROFILE = [[0.135, 0.4], [0.2, 0.4], [0.2, 0.425], [0.135, 0.425], [0.135, 0.4]];
|
|
22079
23060
|
function toilet(c) {
|
|
22080
23061
|
const { hd } = c;
|
|
22081
23062
|
const w = c.main(16053748);
|
|
22082
23063
|
const sh = shade(w, 0.94);
|
|
22083
|
-
c.
|
|
22084
|
-
c.
|
|
22085
|
-
c.b("plain", -0.17, 0.36, -0.2, 0.17, 0.4, -0.02, w);
|
|
22086
|
-
c.cyl("plain", 0, 0.36, 0.12, 0.19, 0.04, w, "cyl");
|
|
22087
|
-
c.cyl("plain", 0, 0.395, 0.12, 0.14, 5e-3, 14674156, "cyl");
|
|
23064
|
+
c.lathe("plain", 0, 0, BOWL_Z, BOWL_PROFILE, w);
|
|
23065
|
+
c.b("plain", -0.17, 0.362, -0.2, 0.17, 0.398, -0.04, sh);
|
|
22088
23066
|
const ty = 0.42;
|
|
22089
23067
|
const th = 0.8 - ty - 0.025;
|
|
22090
23068
|
c.b("plain", -0.19, ty, -hd, 0.19, ty + th, -hd + 0.2, w);
|
|
22091
23069
|
c.b("plain", -0.195, ty + th, -hd - 0, 0.195, ty + th + 0.025, -hd + 0.205, sh);
|
|
22092
23070
|
c.b("plain", -0.185, ty + 0.01, -hd + 0.2, 0.185, ty + 0.03, -hd + 0.215, sh);
|
|
22093
23071
|
const seatY = 0.4;
|
|
22094
|
-
c.
|
|
22095
|
-
c.
|
|
22096
|
-
c.b("plain", -0.17, seatY, -0.07, 0.17, seatY + 0.025, 0, 15659248);
|
|
23072
|
+
c.lathe("plain", 0, 0, BOWL_Z, SEAT_PROFILE, 15659248);
|
|
23073
|
+
c.b("plain", -0.17, seatY + 2e-3, -0.07, 0.17, seatY + 0.023, -0.03, 15659248);
|
|
22097
23074
|
c.part(
|
|
22098
23075
|
"lid",
|
|
22099
23076
|
[0, seatY + 0.025, -0.06],
|
|
22100
23077
|
{ kind: "hinge", axis: [1, 0, 0], angle: -1.65 },
|
|
22101
23078
|
() => {
|
|
22102
23079
|
c.cyl("plain", 0, seatY + 0.027, 0.12, 0.2, 0.012, w, "cyl");
|
|
22103
|
-
c.b("plain", -0.17, seatY + 0.
|
|
23080
|
+
c.b("plain", -0.17, seatY + 0.029, -0.07, 0.17, seatY + 0.037, 0, w);
|
|
22104
23081
|
c.cyl("plain", 0, seatY + 0.039, 0.12, 0.17, 3e-3, shade(w, 1.02), "cyl");
|
|
22105
23082
|
},
|
|
22106
23083
|
{ label: "prompt.toilet_lid", at: [0, seatY + 0.05, 0.14] }
|
|
@@ -22108,15 +23085,18 @@ var GameInteractablesHousehold = (() => {
|
|
|
22108
23085
|
c.part(
|
|
22109
23086
|
"flush_button",
|
|
22110
23087
|
[0, ty + th + 0.025, -hd + 0.1],
|
|
22111
|
-
{ kind: "slide", axis: [0, -1, 0], distance:
|
|
23088
|
+
{ kind: "slide", axis: [0, -1, 0], distance: FLUSH_TRAVEL },
|
|
22112
23089
|
() => {
|
|
22113
23090
|
c.cyl("metal", 0, ty + th + 0.025, -hd + 0.1, 0.04, 0.012, 13817562, "cyl");
|
|
22114
23091
|
c.cyl("metal", 0, ty + th + 0.037, -hd + 0.1, 0.03, 2e-3, 15133422, "cyl");
|
|
22115
23092
|
},
|
|
22116
23093
|
{ label: "prompt.flush", at: false, noSweep: true }
|
|
22117
23094
|
);
|
|
22118
|
-
c.add("fixtures", { id: "flush", kind: "flush", outlet: [0, 0.36,
|
|
22119
|
-
|
|
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" };
|
|
23097
|
+
c.add("basins", bowl);
|
|
23098
|
+
const rim = [0, 0.385, BOWL_Z];
|
|
23099
|
+
c.add("emitters", { id: "flush_water", kind: "water", pos: rim, dir: [0, -1, 0], source: "flush", size: 0.08, ...streamInto(bowl, rim) });
|
|
22120
23100
|
c.interact("use_flush", [0, ty + th + 0.05, -hd + 0.1], { do: "toggle_fixture", fixture: "flush" }, "prompt.flush");
|
|
22121
23101
|
c.add("damage", { target: "self", kind: "plastic", hp: 60 });
|
|
22122
23102
|
}
|
|
@@ -22305,7 +23285,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22305
23285
|
function sleeve(side, u, v, len, width, angle, color) {
|
|
22306
23286
|
const du = Math.sin(angle) * side;
|
|
22307
23287
|
const dv = -Math.cos(angle);
|
|
22308
|
-
return piece("sleeve", u + du * len / 2, v + dv * len / 2, width, len, color, { t: CLOTH -
|
|
23288
|
+
return piece("sleeve", u + du * len / 2, v + dv * len / 2, width, len, color, { t: CLOTH - 4e-3, tilt: side * angle });
|
|
22309
23289
|
}
|
|
22310
23290
|
function tshirt(col) {
|
|
22311
23291
|
const p = [];
|
|
@@ -22314,9 +23294,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
22314
23294
|
p.push(span("body", -bw, TOP - 0.07, bw, -0.6, col));
|
|
22315
23295
|
for (const s of [-1, 1]) p.push(span("shoulder", s * 0.045, TOP, s * (bw + 0.01), TOP - 0.07, col, { t: 0.014 }));
|
|
22316
23296
|
p.push(span("inside", -0.045, TOP - 5e-3, 0.045, TOP - 0.05, shade(col, 0.55), { n: -CLOTH }));
|
|
22317
|
-
p.push(span("collar", -0.052, TOP - 0.045, 0.052, TOP - 0.06, trim, { t: 0.
|
|
23297
|
+
p.push(span("collar", -0.052, TOP - 0.045, 0.052, TOP - 0.06, trim, { t: 0.018 }));
|
|
22318
23298
|
for (const s of [-1, 1]) p.push(sleeve(s, s * (bw + 5e-3), TOP - 0.04, 0.2, 0.115, 0.95, shade(col, 0.96)));
|
|
22319
|
-
p.push(span("trim", -bw, -0.585, bw, -0.
|
|
23299
|
+
p.push(span("trim", -bw, -0.585, bw, -0.602, trim, { t: 0.016 }));
|
|
22320
23300
|
p.push(span("pocket", 0.05, -0.2, 0.13, -0.27, shade(col, 0.9), { t: 0.016 }));
|
|
22321
23301
|
return { kind: "tshirt", pieces: p, width: 0.62, height: 0.6, pegs: [-0.16, 0.16] };
|
|
22322
23302
|
}
|
|
@@ -22325,7 +23305,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22325
23305
|
g.kind = "shirt";
|
|
22326
23306
|
g.pieces = g.pieces.filter((q) => q.role !== "sleeve" && q.role !== "pocket");
|
|
22327
23307
|
for (const s of [-1, 1]) g.pieces.push(sleeve(s, s * 0.205, TOP - 0.04, 0.5, 0.085, 0.16, shade(col, 0.96)));
|
|
22328
|
-
g.pieces.push(span("trim", -0.01, -0.07, 0.01, -0.
|
|
23308
|
+
g.pieces.push(span("trim", -0.01, -0.07, 0.01, -0.604, shade(col, 0.78), { t: 0.024 }));
|
|
22329
23309
|
g.width = 0.5;
|
|
22330
23310
|
return g;
|
|
22331
23311
|
}
|
|
@@ -22336,7 +23316,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22336
23316
|
g.pieces = g.pieces.filter((q) => q.role !== "trim");
|
|
22337
23317
|
g.pieces.push(span("trim", -0.205, -0.7, 0.205, -0.72, dark, { t: 0.017 }));
|
|
22338
23318
|
g.pieces.push(span("body", -0.2, -0.6, 0.2, -0.7, col));
|
|
22339
|
-
g.pieces.push(span("trim", -0.012, -0.07, 0.012, -0.
|
|
23319
|
+
g.pieces.push(span("trim", -0.012, -0.07, 0.012, -0.724, dark, { t: 0.022 }));
|
|
22340
23320
|
for (const s of [-1, 1]) g.pieces.push(span("trim", s * 0.07, -0.34, s * 0.16, -0.4, dark, { t: 0.018 }));
|
|
22341
23321
|
g.height = 0.72;
|
|
22342
23322
|
return g;
|
|
@@ -22347,10 +23327,10 @@ var GameInteractablesHousehold = (() => {
|
|
|
22347
23327
|
p.push(span("waist", -0.17, TOP, 0.17, TOP - 0.05, dark, { t: 0.015 }));
|
|
22348
23328
|
p.push(span("crotch", -0.16, TOP - 0.05, 0.16, TOP - 0.2, col));
|
|
22349
23329
|
for (const s of [-1, 1]) {
|
|
22350
|
-
p.push(piece("leg", s * 0.085, TOP - 0.2 - 0.27, 0.155, 0.54, s > 0 ? col : shade(col, 0.94), { tilt: s * 0.02 }));
|
|
23330
|
+
p.push(piece("leg", s * 0.085, TOP - 0.2 - 0.27, 0.155, 0.54, s > 0 ? col : shade(col, 0.94), { tilt: s * 0.02, t: CLOTH - 4e-3 }));
|
|
22351
23331
|
p.push(span("trim", s * 0.01 + s * 0, -0.74, s * 0.165, -0.76, dark, { t: 0.015 }));
|
|
22352
23332
|
}
|
|
22353
|
-
p.push(span("seam", -4e-3, TOP - 0.
|
|
23333
|
+
p.push(span("seam", -4e-3, TOP - 0.052, 4e-3, TOP - 0.198, dark, { t: 0.016 }));
|
|
22354
23334
|
for (const s of [-1, 1]) p.push(span("trim", s * 0.09, TOP - 0.08, s * 0.15, TOP - 0.15, shade(col, 0.88), { t: 0.016 }));
|
|
22355
23335
|
return { kind: "trousers", pieces: p, width: 0.34, height: 0.76, pegs: [-0.14, 0.14] };
|
|
22356
23336
|
}
|
|
@@ -22359,15 +23339,15 @@ var GameInteractablesHousehold = (() => {
|
|
|
22359
23339
|
const stripe = mix(col, 16777215, 0.55);
|
|
22360
23340
|
p.push(span("body", -0.25, TOP, 0.25, -0.82, col, { t: 0.014, n: 9e-3 }));
|
|
22361
23341
|
p.push(span("body", -0.25, TOP, 0.25, -0.74, shade(col, 0.93), { t: 0.014, n: -9e-3 }));
|
|
22362
|
-
p.push(span("trim", -0.
|
|
22363
|
-
p.push(span("trim", -0.
|
|
23342
|
+
p.push(span("trim", -0.252, -0.62, 0.252, -0.67, stripe, { t: 0.017, n: 9e-3 }));
|
|
23343
|
+
p.push(span("trim", -0.252, -0.7, 0.252, -0.72, stripe, { t: 0.017, n: 9e-3 }));
|
|
22364
23344
|
for (let i = 0; i < 12; i++) p.push(span("fringe", -0.245 + i * 0.0417, -0.82, -0.215 + i * 0.0417, -0.86, shade(col, 1.04), { t: 0.01, n: 9e-3 }));
|
|
22365
23345
|
return { kind: "towel", pieces: p, width: 0.5, height: 0.86, pegs: [-0.2, 0.2] };
|
|
22366
23346
|
}
|
|
22367
23347
|
function dress(col) {
|
|
22368
23348
|
const p = [];
|
|
22369
23349
|
const trim = shade(col, 0.8);
|
|
22370
|
-
for (const s of [-1, 1]) p.push(span("strap", s * 0.05, TOP, s * 0.075, TOP - 0.12, trim, { t:
|
|
23350
|
+
for (const s of [-1, 1]) p.push(span("strap", s * 0.05, TOP, s * 0.075, TOP - 0.12, trim, { t: 8e-3 }));
|
|
22371
23351
|
p.push(span("body", -0.1, TOP - 0.1, 0.1, -0.34, col));
|
|
22372
23352
|
p.push(span("trim", -0.105, -0.34, 0.105, -0.37, trim, { t: 0.015 }));
|
|
22373
23353
|
const steps = 11;
|
|
@@ -22388,8 +23368,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
22388
23368
|
p.push(span("cuff", u - 0.037, TOP, u + 0.037, TOP - 0.035, toe, { t: 0.014 }));
|
|
22389
23369
|
p.push(span("leg", u - 0.033, TOP - 0.035, u + 0.033, -0.17, c));
|
|
22390
23370
|
p.push(span("foot", u - 0.033 * s, -0.17, u + 0.105 * s, -0.235, c));
|
|
22391
|
-
p.push(span("toe", u + 0.07 * s, -0.
|
|
22392
|
-
p.push(span("heel", u - 0.
|
|
23371
|
+
p.push(span("toe", u + 0.07 * s, -0.168, u + 0.107 * s, -0.237, toe, { t: 0.016 }));
|
|
23372
|
+
p.push(span("heel", u - 0.035 * s, -0.168, u - 1e-3 * s, -0.237, shade(c, 0.8), { t: 0.016 }));
|
|
22393
23373
|
}
|
|
22394
23374
|
return { kind: "socks", pieces: p, width: 0.36, height: 0.235, pegs: [-0.075, 0.075] };
|
|
22395
23375
|
}
|
|
@@ -22424,8 +23404,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
22424
23404
|
function pegs(g, color) {
|
|
22425
23405
|
const out = [];
|
|
22426
23406
|
for (const u of g.pegs) {
|
|
22427
|
-
out.push({ m: "plain", u, v: TOP / 2 - 0.012, w: 0.018, h: 0.065, t: 0.
|
|
22428
|
-
out.push({ m: "plain", u, v: TOP / 2 + 0.017, w: 0.022, h: 0.012, t: 0.
|
|
23407
|
+
out.push({ m: "plain", u, v: TOP / 2 - 0.012, w: 0.018, h: 0.065, t: 0.036, color, role: "peg" });
|
|
23408
|
+
out.push({ m: "plain", u, v: TOP / 2 + 0.017, w: 0.022, h: 0.012, t: 0.04, color: shade(color, 0.8), role: "peg" });
|
|
22429
23409
|
}
|
|
22430
23410
|
return out;
|
|
22431
23411
|
}
|
|
@@ -22436,13 +23416,14 @@ var GameInteractablesHousehold = (() => {
|
|
|
22436
23416
|
const len = Math.hypot(half, rise);
|
|
22437
23417
|
const ang = Math.atan2(rise, half);
|
|
22438
23418
|
const out = [
|
|
22439
|
-
{ m: "metal", u: 0, v: -0.03, w: 5e-3, h: 0.06, t:
|
|
23419
|
+
{ m: "metal", u: 0, v: -0.03, w: 5e-3, h: 0.06, t: 8e-3, color: col, role: "hanger" },
|
|
23420
|
+
// thicker than the wires it meets (CLAUDE.md §13)
|
|
22440
23421
|
{ m: "metal", u: 0, v: 0.013, w: 0.026, h: 5e-3, t: 5e-3, color: col, role: "hanger" }
|
|
22441
23422
|
];
|
|
22442
23423
|
for (const s of [-1, 1]) {
|
|
22443
23424
|
out.push({ m: "metal", u: s * half / 2, v: -0.06 - rise / 2, w: len, h: 4e-3, t: 4e-3, color: col, tilt: s > 0 ? -ang : ang, role: "hanger" });
|
|
22444
23425
|
}
|
|
22445
|
-
out.push({ m: "metal", u: 0, v: -0.06 - rise, w: half * 2, h: 4e-3, t:
|
|
23426
|
+
out.push({ m: "metal", u: 0, v: -0.06 - rise, w: half * 2, h: 4e-3, t: 8e-3, color: col, role: "hanger" });
|
|
22446
23427
|
return out;
|
|
22447
23428
|
}
|
|
22448
23429
|
function drawPieces(c, pieces, f) {
|
|
@@ -22585,7 +23566,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22585
23566
|
label: "prompt.fridge_door",
|
|
22586
23567
|
extra: () => doorLedge(c, dx0 + 0.04, dx1 - 0.04, trayY, zdi, 0.08, 15003376)
|
|
22587
23568
|
});
|
|
22588
|
-
dropDoor(c, { id: "door_freezer", x0: dx0, x1: dx1, y0: yd + 0.015 + 2e-3, y1: h - 4e-3, zf, t: dt, color: shade(body, 0.97), inner: lining, angle: 1.45, handle: "bar_h", handleLen: 0.16, label: "prompt.freezer_door" });
|
|
23569
|
+
dropDoor(c, { id: "door_freezer", x0: dx0 + 2e-3, x1: dx1 - 2e-3, y0: yd + 0.015 + 2e-3, y1: h - 4e-3, zf, t: dt, color: shade(body, 0.97), inner: lining, angle: 1.45, handle: "bar_h", handleLen: 0.16, label: "prompt.freezer_door" });
|
|
22589
23570
|
const slots = [
|
|
22590
23571
|
...c.row(sh.ix0 + 0.02, sh.ix1 - 0.02, fy0, zc, 1, [0.4, 0.2, 0.3]),
|
|
22591
23572
|
...c.row(sh.ix0 + 0.02, sh.ix1 - 0.02, mid, zc, 1, [0.4, yd - mid - 0.02, 0.3]),
|
|
@@ -23023,7 +24004,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
23023
24004
|
const px = ix0 + 0.05 + c.rnd() * (ix1 - ix0 - 0.14);
|
|
23024
24005
|
const pz = iz0 + 0.05 + c.rnd() * (iz1 - iz0 - 0.14);
|
|
23025
24006
|
const s = 0.04 + c.rnd() * 0.04;
|
|
23026
|
-
|
|
24007
|
+
const sink = 1e-3 + i * 14e-4;
|
|
24008
|
+
c.b("plain", px, bedY + 0.03 - sink, pz, px + s, bedY + 0.03 + 0.032 + i * 17e-4, pz + s, c.rnd() < 0.3 ? 5592405 : 1842206, c.rnd() * 3, 0, 0);
|
|
23027
24009
|
}
|
|
23028
24010
|
const gy = 0.88;
|
|
23029
24011
|
for (const s of [-1, 1]) c.b("metal", s < 0 ? ix0 : ix1 - 0.015, gy - 0.02, iz0, s < 0 ? ix0 + 0.015 : ix1, gy, iz1, 2763824);
|
|
@@ -23043,7 +24025,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23043
24025
|
bricks(c, sx0, topChamber + 0.36, -hd, sx1, stackTop, -hd + 0.32, brick);
|
|
23044
24026
|
c.b("plain", sx0 - 0.02, stackTop, -hd - 0, sx1 + 0.02, stackTop + 0.03, -hd + 0.34, 14209732);
|
|
23045
24027
|
c.cyl("metal", (sx0 + sx1) / 2, stackTop + 0.03, -hd + 0.16, 0.085, h - stackTop - 0.03, 6975090, "cyl");
|
|
23046
|
-
c.cyl("metal", (sx0 + sx1) / 2, stackTop + 0.
|
|
24028
|
+
c.cyl("metal", (sx0 + sx1) / 2, stackTop + 0.032, -hd + 0.16, 0.06, h - stackTop - 0.03, 1842206, "cyl");
|
|
23047
24029
|
const topC = 0.9;
|
|
23048
24030
|
bricks(c, cx0, 0, -hd, cx1, topC - 0.04, -hd + 0.1, brick);
|
|
23049
24031
|
bricks(c, cx0, 0, -hd + 0.1, cx0 + 0.08, topC - 0.04, zf, brick);
|
|
@@ -23059,7 +24041,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23059
24041
|
c.b("plain", lx0, 0.05, lz0, lx1, topC - 0.12, lz0 + 4e-3, 14210248);
|
|
23060
24042
|
c.b("plain", lx0, 0.05, lz0 + 4e-3, lx0 + 4e-3, topC - 0.12, lz1, 13157560);
|
|
23061
24043
|
c.b("plain", lx1 - 4e-3, 0.05, lz0 + 4e-3, lx1, topC - 0.12, lz1, 13157560);
|
|
23062
|
-
c.b("plain", lx0, 0.4, lz0, lx1, 0.416, lz1, 13157560);
|
|
24044
|
+
c.b("plain", lx0 + 4e-3, 0.4, lz0 + 4e-3, lx1 - 4e-3, 0.416, lz1 - 4e-3, 13157560);
|
|
23063
24045
|
hingedDoor(c, {
|
|
23064
24046
|
id: "counter_door",
|
|
23065
24047
|
x0: lx0 + 2e-3,
|
|
@@ -23190,17 +24172,18 @@ var GameInteractablesHousehold = (() => {
|
|
|
23190
24172
|
c.b("plain", -hw + 0.02, 0, hd - 0.07, -hw + 0.07, 0.015, hd - 0.02, DARK);
|
|
23191
24173
|
c.b("plain", hw - 0.07, 0, hd - 0.07, hw - 0.02, 0.015, hd - 0.02, DARK);
|
|
23192
24174
|
for (const s of [-1, 1]) c.b("plain", s * hw, top - 0.1, -0.1, s * hw + s * 0.015, top - 0.07, 0.1, DARK);
|
|
23193
|
-
c.b("plain", hw -
|
|
24175
|
+
c.b("plain", hw - 2e-3, 0.05, hd - 0.14, hw + 4e-3, 0.09, hd - 0.1, DARK);
|
|
23194
24176
|
c.part(
|
|
23195
24177
|
"lid",
|
|
23196
24178
|
[0, h, -hd],
|
|
23197
24179
|
{ kind: "hinge", axis: [1, 0, 0], angle: -1.5 },
|
|
23198
24180
|
() => {
|
|
23199
24181
|
c.b("plain", -hw, top, -hd, hw, h, hd, white);
|
|
23200
|
-
|
|
23201
|
-
c.b("plain", -
|
|
23202
|
-
c.b("plain", -
|
|
23203
|
-
c.b("plain", hw
|
|
24182
|
+
const rim = t + 4e-3 + 2e-3;
|
|
24183
|
+
c.b("plain", -hw + rim, top - 0.012, -hd + rim, hw - rim, top, hd - rim, shade(white, 0.92));
|
|
24184
|
+
c.b("plain", -0.09, h - 0.012, hd - 0.05, 0.09, h + 3e-3, hd + 4e-3, shade(body, 0.8));
|
|
24185
|
+
c.b("plain", -hw + 0.04, h - 2e-3, -hd + 0.04, -hw + 0.07, h + 4e-3, hd - 0.04, shade(white, 0.9));
|
|
24186
|
+
c.b("plain", hw - 0.07, h - 2e-3, -hd + 0.04, hw - 0.04, h + 4e-3, hd - 0.04, shade(white, 0.9));
|
|
23204
24187
|
},
|
|
23205
24188
|
{ label: "prompt.cooler_lid", at: [0, h, hd - 0.03], radius: 1.6 }
|
|
23206
24189
|
);
|
|
@@ -23223,7 +24206,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
23223
24206
|
const px = Math.sin(a) * r;
|
|
23224
24207
|
const pz = Math.cos(a) * r;
|
|
23225
24208
|
const s = 0.17 + c.rnd() * 0.06;
|
|
23226
|
-
|
|
24209
|
+
const sink = i % 5 * 2e-3;
|
|
24210
|
+
c.box("plain", px, -sink, pz, s, sink + 0.13 + i % 5 * 0.011 + c.rnd() * 4e-3, s * 0.9, shade(9275778, 0.7 + c.rnd() * 0.5), a + c.rnd() * 0.5);
|
|
23227
24211
|
if (i % 3 === 0) c.box("plain", px * 0.96, 0.13, pz * 0.96, s * 0.8, 0.08, s * 0.7, shade(9275778, 0.8 + c.rnd() * 0.4), a);
|
|
23228
24212
|
}
|
|
23229
24213
|
c.cyl("plain", 0, 1e-3, 0, ringR - 0.1, 0.03, 3815478, "cyl");
|
|
@@ -23278,7 +24262,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23278
24262
|
for (const a of [0, 2.094, 4.189]) {
|
|
23279
24263
|
const px = Math.sin(a) * 0.085;
|
|
23280
24264
|
const pz = Math.cos(a) * 0.085;
|
|
23281
|
-
c.b("metal", px - 8e-3, burnerY + 0.02, pz - 8e-3, px + 8e-3, Y + h -
|
|
24265
|
+
c.b("metal", px - 8e-3, burnerY + 0.02, pz - 8e-3, px + 8e-3, Y + h - 2e-3, pz + 8e-3, DARK);
|
|
23282
24266
|
}
|
|
23283
24267
|
c.cyl("metal", 0, Y + h - 0.012, 0, 0.1, 8e-3, DARK, "cyl6");
|
|
23284
24268
|
c.b("metal", -hw + 5e-3, burnerY, -hd + 5e-3, -hw + 0.012, Y + h - 0.01, zf - 0.04, shade(steel, 0.9));
|
|
@@ -23315,7 +24299,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23315
24299
|
const col = Number.parseInt(g.color.replace("#", ""), 16);
|
|
23316
24300
|
c.cyl("metal", 0, Y + 1e-3, 0, R * 0.96, 0.011, 6975090, "cyl");
|
|
23317
24301
|
c.cyl("metal", 0, Y + 0.012, 0, R, H - 0.012 - 0.045, col, "cyl");
|
|
23318
|
-
c.cyl("metal", 0, Y + 0.012 + (H - 0.057) * 0.35, 0, R +
|
|
24302
|
+
c.cyl("metal", 0, Y + 0.012 + (H - 0.057) * 0.35, 0, R + 2e-3, (H - 0.057) * 0.3, 15789280, "cyl");
|
|
23319
24303
|
c.cyl("metal", 0, Y + H - 0.075, 0, R * 0.96, 0.04, col, "sphere");
|
|
23320
24304
|
c.cyl("metal", 0, Y + H - 0.05, 0, R * 0.45, 0.012, 10133154, "cyl");
|
|
23321
24305
|
c.cyl("metal", 0, Y + H - 0.04, 0, R * 0.3, 0.02, 11569716, "cyl6");
|
|
@@ -23499,7 +24483,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23499
24483
|
c.b("plain", x0 + t, by0 + 0.03, zb + t, x1 - t, top - 5e-3, zb + t + 0.015, brick);
|
|
23500
24484
|
c.b("plain", x0 + t, by0 + 0.03, zb + t + 0.015, x0 + t + 0.015, top - 5e-3, zf - 0.03, mix(brick, 16777215, 0.08));
|
|
23501
24485
|
c.b("plain", x1 - t - 0.015, by0 + 0.03, zb + t + 0.015, x1 - t, top - 5e-3, zf - 0.03, mix(brick, 16777215, 0.08));
|
|
23502
|
-
c.b("plain", x0 + t, top - 0.02, zb + t + 0.015, x1 - t, top -
|
|
24486
|
+
c.b("plain", x0 + t + 0.015, top - 0.02, zb + t + 0.015, x1 - t - 0.015, top - 7e-3, zf - 0.032, mix(brick, 0, 0.2));
|
|
23503
24487
|
c.b("plain", x0 + t + 0.03, by0 + 0.03, zb + t + 0.03, x1 - t - 0.03, by0 + 0.06, zf - 0.08, 5917250);
|
|
23504
24488
|
for (let i = 0; i < 5; i++) c.b("metal", x0 + t + 0.03, by0 + 0.06, zb + t + 0.04 + i * 0.06, x1 - t - 0.03, by0 + 0.07, zb + t + 0.05 + i * 0.06, shade(iron, 1.4));
|
|
23505
24489
|
const potX = 0;
|
|
@@ -23511,7 +24495,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23511
24495
|
c.cyl("metal", fx, pipeBase, fz, 0.07, flueTop - pipeBase, shade(iron, 1.1), "cyl");
|
|
23512
24496
|
for (let y = pipeBase + 0.25; y < flueTop - 0.12; y += 0.45) c.cyl("metal", fx, y, fz, 0.076, 0.03, shade(iron, 1.5), "cyl");
|
|
23513
24497
|
c.cyl("metal", fx, flueTop - 0.05, fz, 0.1, 0.03, shade(iron, 0.9), "cyl");
|
|
23514
|
-
c.cyl("metal", fx, flueTop -
|
|
24498
|
+
c.cyl("metal", fx, flueTop - 1e-3, fz, 0.052, 3e-3, 4866106, "cyl");
|
|
23515
24499
|
c.b("metal", fx + 0.07, pipeBase + 0.2, fz - 8e-3, fx + 0.17, pipeBase + 0.212, fz + 8e-3, shade(iron, 1.6));
|
|
23516
24500
|
const side = c.M.hinge ?? "left";
|
|
23517
24501
|
const dx0 = ox0 + 6e-3;
|
|
@@ -23530,7 +24514,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23530
24514
|
c.b("metal", dx0, dy0, zf, dx1, dy1, zf + dt, iron);
|
|
23531
24515
|
c.b("metal", dx0 + 0.025, dy0 + 0.025, zf + dt, dx1 - 0.025, dy1 - 0.025, zf + dt + 4e-3, shade(iron, 1.5));
|
|
23532
24516
|
c.plane("glass", (dx0 + dx1) / 2, (dy0 + dy1) / 2, zf + dt + 65e-4, dx1 - dx0 - 0.07, dy1 - dy0 - 0.07, 5913130);
|
|
23533
|
-
c.b("metal", hx - 8e-3, (dy0 + dy1) / 2 - 0.05, zf + dt, hx + 8e-3, (dy0 + dy1) / 2 + 0.05, zf + dt + 0.03, 11843772);
|
|
24517
|
+
c.b("metal", hx - 8e-3, (dy0 + dy1) / 2 - 0.05, zf + dt + 2e-3, hx + 8e-3, (dy0 + dy1) / 2 + 0.05, zf + dt + 0.03, 11843772);
|
|
23534
24518
|
},
|
|
23535
24519
|
{ label: "prompt.firebox_door", at: [(dx0 + dx1) / 2, (dy0 + dy1) / 2, zf + dt + HANDLE] }
|
|
23536
24520
|
);
|
|
@@ -23643,8 +24627,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
23643
24627
|
c.b("wood", xa, 0.05, bz0 + t + i * bd + 2e-3, xa + t, wallTop, bz0 + t + (i + 1) * bd - 2e-3, col);
|
|
23644
24628
|
}
|
|
23645
24629
|
}
|
|
23646
|
-
boards(c, -bx, dx0, 0.05, wallTop, bz1 - t, t, wood);
|
|
23647
|
-
boards(c, dx1, bx, 0.05, wallTop, bz1 - t, t, wood);
|
|
24630
|
+
boards(c, -bx + t, dx0, 0.05, wallTop, bz1 - t, t, wood);
|
|
24631
|
+
boards(c, dx1, bx - t, 0.05, wallTop, bz1 - t, t, wood);
|
|
23648
24632
|
boards(c, dx0, dx1, doorTop, wallTop, bz1 - t, t, wood);
|
|
23649
24633
|
const roofY = wallTop + 0.07;
|
|
23650
24634
|
c.b("wood", -hw, roofY, -hd, hw, roofY + 0.04, hd, shade(wood, 0.8), 0, -0.08);
|
|
@@ -23654,8 +24638,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
23654
24638
|
const sz1 = sz0 + 0.46;
|
|
23655
24639
|
const sx = bx - t;
|
|
23656
24640
|
c.b("wood", -sx, 0.05, sz1 - 0.025, sx, seatY - 0.03, sz1, shade(wood, 1.05));
|
|
23657
|
-
c.b("wood", -sx, 0.05, sz0, -sx + 0.025, seatY - 0.03, sz1, shade(wood, 0.95));
|
|
23658
|
-
c.b("wood", sx - 0.025, 0.05, sz0, sx, seatY - 0.03, sz1, shade(wood, 0.95));
|
|
24641
|
+
c.b("wood", -sx, 0.05, sz0, -sx + 0.025, seatY - 0.03, sz1 - 0.025, shade(wood, 0.95));
|
|
24642
|
+
c.b("wood", sx - 0.025, 0.05, sz0, sx, seatY - 0.03, sz1 - 0.025, shade(wood, 0.95));
|
|
23659
24643
|
c.b("plain", -sx + 0.025, 0.05, sz0, sx - 0.025, 0.07, sz1 - 0.025, 3878695);
|
|
23660
24644
|
const hc = (sz0 + sz1) / 2;
|
|
23661
24645
|
const hr = 0.14;
|
|
@@ -23766,22 +24750,25 @@ var GameInteractablesHousehold = (() => {
|
|
|
23766
24750
|
const a = (i + course * 0.5) / n * Math.PI * 2;
|
|
23767
24751
|
const px = Math.sin(a) * rMid;
|
|
23768
24752
|
const pz = Math.cos(a) * rMid;
|
|
23769
|
-
|
|
24753
|
+
const k = i % 2 ? 2e-3 : 0;
|
|
24754
|
+
c.box("plain", px, course * 0.45 + 4e-3 + k, pz, bwid, 0.442 - 2 * k, 0.17, shade(stoneCol, 0.85 + c.rnd() * 0.3), Math.atan2(px, pz));
|
|
23770
24755
|
}
|
|
23771
24756
|
}
|
|
23772
24757
|
for (let i = 0; i < n; i++) {
|
|
23773
24758
|
const a = (i + 0.25) / n * Math.PI * 2;
|
|
23774
24759
|
const px = Math.sin(a) * 0.47;
|
|
23775
24760
|
const pz = Math.cos(a) * 0.47;
|
|
23776
|
-
|
|
24761
|
+
const k = i % 2 ? 2e-3 : 0;
|
|
24762
|
+
c.box("plain", px, rim + k, pz, bwid + 0.03, 0.05 - 2 * k, 0.25, shade(stoneCol, 1.05 + c.rnd() * 0.12), Math.atan2(px, pz));
|
|
23777
24763
|
}
|
|
23778
24764
|
c.cyl("plain", 0, 0, 0, rIn + 0.01, 0.1, 4867906, "cyl");
|
|
23779
24765
|
c.cyl("water", 0, 0.1, 0, rIn, 0.01, 3828358, "cyl");
|
|
23780
|
-
for (const s of [-1, 1]) c.b("wood", s * 0.62 - 0.05, 0, -0.05, s * 0.62 + 0.05, 1.
|
|
24766
|
+
for (const s of [-1, 1]) c.b("wood", s * 0.62 - 0.05, 0, -0.05, s * 0.62 + 0.05, 1.898, 0.05, wood);
|
|
23781
24767
|
c.b("wood", -0.68, 1.8, -0.06, 0.68, 1.9, 0.06, shade(wood, 0.9));
|
|
23782
24768
|
for (const s of [-1, 1]) {
|
|
23783
|
-
|
|
23784
|
-
c.box("
|
|
24769
|
+
const e = s > 0 ? 0 : 4e-3;
|
|
24770
|
+
c.box("wood", 0, 1.99, s * 0.33, 1.46 - e, 0.04, 0.8, shade(wood, 0.85), 0, s * 0.5);
|
|
24771
|
+
c.box("plain", 0, 2.02, s * 0.33, 1.44 - e, 0.01, 0.78, 5654074, 0, s * 0.5);
|
|
23785
24772
|
}
|
|
23786
24773
|
c.b("wood", -0.69, 2.05, -0.03, 0.69, 2.12, 0.03, shade(wood, 0.7));
|
|
23787
24774
|
const tz0 = 0.58;
|
|
@@ -23802,7 +24789,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
23802
24789
|
() => {
|
|
23803
24790
|
c.rod("wood", "x", 0, spindleY, 0, 0.045, 1.24, shade(wood, 1.1));
|
|
23804
24791
|
c.b("wood", 0.62, spindleY - 0.01, -0.025, 0.69, spindleY + 0.01, 0.025, shade(wood, 0.9));
|
|
23805
|
-
c.b("wood", 0.
|
|
24792
|
+
c.b("wood", 0.662, spindleY - 8e-3, -0.023, 0.688, spindleY + 0.2, 0.023, shade(wood, 0.9));
|
|
23806
24793
|
c.rod("wood", "x", 0.7, spindleY + 0.2, 0, 0.022, 0.08, shade(wood, 0.7));
|
|
23807
24794
|
},
|
|
23808
24795
|
{ label: "prompt.well_crank", at: false, noSweep: true, group: "draw" }
|
|
@@ -23883,8 +24870,8 @@ var GameInteractablesHousehold = (() => {
|
|
|
23883
24870
|
const { hw, hd, h } = c;
|
|
23884
24871
|
const col = c.main(4157004);
|
|
23885
24872
|
const rim = h - 0.04;
|
|
23886
|
-
const b = binBody(c, { x0: -hw, x1: hw, z0: -hd, z1: hd, y0:
|
|
23887
|
-
frame(c, -hw - 6e-3, -hd - 6e-3, hw + 6e-3, hd + 6e-3, rim - 0.03, rim, 0.
|
|
24873
|
+
const b = binBody(c, { x0: -hw, x1: hw, z0: -hd, z1: hd, y0: 6e-3, y1: rim - 4e-3, t: 0.02, color: col, inner: 11120820 });
|
|
24874
|
+
frame(c, -hw - 6e-3, -hd - 6e-3, hw + 6e-3, hd + 6e-3, rim - 0.03, rim, 0.022, shade(col, 1.12));
|
|
23888
24875
|
c.b("plain", -hw + 0.04, 0, -hd + 0.04, hw - 0.04, 0.012, hd - 0.04, 1974306);
|
|
23889
24876
|
const hy = h - 0.04;
|
|
23890
24877
|
const top = hy + 0.036;
|
|
@@ -23909,17 +24896,23 @@ var GameInteractablesHousehold = (() => {
|
|
|
23909
24896
|
const col = c.main(3103370);
|
|
23910
24897
|
const rim = h - 0.08;
|
|
23911
24898
|
const t = 0.025;
|
|
23912
|
-
const
|
|
23913
|
-
|
|
23914
|
-
|
|
24899
|
+
const lip = 0.016;
|
|
24900
|
+
const zBody = hd - 0.028;
|
|
24901
|
+
const b = binBody(c, { x0: -hw + 0.03, x1: hw - 0.03, z0: -hd + 0.05, z1: zBody, y0: 0.08, y1: rim - 4e-3, t, color: col, inner: 8293010 });
|
|
24902
|
+
frame(c, -hw + lip, -hd + 0.03, hw - lip, hd - lip, rim - 0.06, rim, 0.05, shade(col, 1.1));
|
|
24903
|
+
for (let i = 0; i < 3; i++) {
|
|
24904
|
+
const rx = -hw + 0.1 + i * ((c.w - 0.2) / 2);
|
|
24905
|
+
c.b("plain", rx - 0.01, 0.2, zBody - 3e-3, rx + 0.01, rim - 0.1, zBody + 6e-3, shade(col, 0.85));
|
|
24906
|
+
}
|
|
23915
24907
|
c.rod("metal", "x", 0, 0.1, -hd + 0.1, 0.012, c.w - 0.04, 9080466);
|
|
23916
24908
|
for (const s of [-1, 1]) {
|
|
23917
|
-
c.rod("plain", "x", s * (hw - 0.
|
|
23918
|
-
c.rod("plain", "x", s * (hw - 0.
|
|
24909
|
+
c.rod("plain", "x", s * (hw - 0.026), 0.1, -hd + 0.1, 0.1, 0.05, 1842206);
|
|
24910
|
+
c.rod("plain", "x", s * (hw - 0.026), 0.1, -hd + 0.1, 0.05, 0.056, 9080466);
|
|
23919
24911
|
}
|
|
23920
24912
|
c.b("plain", -hw + 0.06, rim - 0.05, -hd + 0, hw - 0.06, rim - 0.01, -hd + 0.05, shade(col, 0.7));
|
|
23921
|
-
c.b("plain", -0.1, 0.05,
|
|
24913
|
+
c.b("plain", -0.1, 0.05, zBody - 0.07, 0.1, 0.1, zBody + 0.01, 1842206);
|
|
23922
24914
|
const hy = rim;
|
|
24915
|
+
const sk = lip - 2e-3;
|
|
23923
24916
|
c.part(
|
|
23924
24917
|
"lid",
|
|
23925
24918
|
[0, hy, -hd + 0.06],
|
|
@@ -23927,9 +24920,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
23927
24920
|
() => {
|
|
23928
24921
|
c.b("plain", -hw, hy, -hd + 0.05, hw, hy + 0.03, hd, shade(col, 1.04));
|
|
23929
24922
|
c.b("plain", -hw + 0.04, hy + 0.03, -hd + 0.09, hw - 0.04, hy + 0.045, hd - 0.04, shade(col, 1.2));
|
|
23930
|
-
c.b("plain", -hw, hy - 0.04, -hd + 0.05, -hw +
|
|
23931
|
-
c.b("plain", hw -
|
|
23932
|
-
c.b("plain", -hw, hy - 0.04, hd -
|
|
24923
|
+
c.b("plain", -hw, hy - 0.04, -hd + 0.05, -hw + sk, hy, hd, shade(col, 0.9));
|
|
24924
|
+
c.b("plain", hw - sk, hy - 0.04, -hd + 0.05, hw, hy, hd, shade(col, 0.9));
|
|
24925
|
+
c.b("plain", -hw + sk, hy - 0.04, hd - sk, hw - sk, hy, hd, shade(col, 0.9));
|
|
23933
24926
|
},
|
|
23934
24927
|
{ label: "prompt.bin_lid", at: [0, hy + 0.05, hd - 0.1], radius: 1.8 }
|
|
23935
24928
|
);
|
|
@@ -23946,9 +24939,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
23946
24939
|
const bh = 0.24;
|
|
23947
24940
|
const bw = Math.min(c.w, 0.3) - (style === "post" ? 0.04 : 0);
|
|
23948
24941
|
const zf = hd - HANDLE - 0.01;
|
|
23949
|
-
c.b(style === "post" ? "wood" : "metal", -0.035, 1e-3, -0.035 - hd + 0.18, 0.035, by, 0.035 - hd + 0.18, postCol);
|
|
24942
|
+
c.b(style === "post" ? "wood" : "metal", -0.035, 1e-3, -0.035 - hd + 0.18, 0.035, by - 4e-3, 0.035 - hd + 0.18, postCol);
|
|
23950
24943
|
c.b("plain", -0.1, 0, -hd + 0.08, 0.1, 0.06, -hd + 0.28, 9079428);
|
|
23951
|
-
c.b(style === "post" ? "wood" : "metal", -0.
|
|
24944
|
+
c.b(style === "post" ? "wood" : "metal", -0.03, by - 0.06, -hd + 0.18 - 0.03, 0.03, by, hd - 0.1, shade(postCol, 0.9));
|
|
23952
24945
|
const t = 0.012;
|
|
23953
24946
|
const x0 = -bw / 2;
|
|
23954
24947
|
const x1 = bw / 2;
|
|
@@ -23958,9 +24951,9 @@ var GameInteractablesHousehold = (() => {
|
|
|
23958
24951
|
c.b("metal", x1 - t, by + t, z0, x1, by + bh, zf, col);
|
|
23959
24952
|
c.b("metal", x0 + t, by + t, z0, x1 - t, by + bh, z0 + t, shade(col, 0.9));
|
|
23960
24953
|
const lin = 14343388;
|
|
23961
|
-
c.b("plain", x0 + t, by + t, z0 + t, x1 - t, by + t + 3e-3, zf, lin);
|
|
23962
|
-
c.b("plain", x0 + t, by + t + 3e-3, z0 + t, x0 + t + 3e-3, by + bh - 0.01, zf, lin);
|
|
23963
|
-
c.b("plain", x1 - t - 3e-3, by + t + 3e-3, z0 + t, x1 - t, by + bh - 0.01, zf, lin);
|
|
24954
|
+
c.b("plain", x0 + t, by + t, z0 + t, x1 - t, by + t + 3e-3, zf - 4e-3, lin);
|
|
24955
|
+
c.b("plain", x0 + t, by + t + 3e-3, z0 + t, x0 + t + 3e-3, by + bh - 0.01, zf - 4e-3, lin);
|
|
24956
|
+
c.b("plain", x1 - t - 3e-3, by + t + 3e-3, z0 + t, x1 - t, by + bh - 0.01, zf - 4e-3, lin);
|
|
23964
24957
|
if (style === "post") {
|
|
23965
24958
|
c.rod("metal", "z", 0, by + bh - bw / 2, (z0 + zf) / 2, bw / 2, zf - z0, col, "cyl");
|
|
23966
24959
|
c.b("metal", x0, by + t, z0, x1, by + bh - bw / 2, zf, col);
|
|
@@ -24016,6 +25009,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
24016
25009
|
const trim = 15260864;
|
|
24017
25010
|
const inner = 14204042;
|
|
24018
25011
|
const floorCol = 13215092;
|
|
25012
|
+
const roofCol = 5917242;
|
|
24019
25013
|
const bw = c.w - 0.12;
|
|
24020
25014
|
const x0 = -bw / 2;
|
|
24021
25015
|
const x1 = bw / 2;
|
|
@@ -24023,61 +25017,70 @@ var GameInteractablesHousehold = (() => {
|
|
|
24023
25017
|
const z1 = hd - 0.22;
|
|
24024
25018
|
const y0 = 0.06;
|
|
24025
25019
|
const wallH = 0.58;
|
|
25020
|
+
const wallTop = y0 + wallH;
|
|
24026
25021
|
const t = 0.03;
|
|
24027
|
-
|
|
25022
|
+
const l = 4e-3;
|
|
25023
|
+
for (const sx of [-1, 1]) for (const sz of [0, 1]) c.b("wood", sx < 0 ? x0 : x1 - 0.06, 0, sz ? z1 - 0.06 : z0, sx < 0 ? x0 + 0.06 : x1, y0 - 0.02, sz ? z1 : z0 + 0.06, 5914664);
|
|
24028
25024
|
c.b("wood", x0 - 0.01, y0 - 0.02, z0 - 0.01, x1 + 0.01, y0, z1 + 0.01, 8018490);
|
|
24029
25025
|
c.b("wood", x0 + t, y0, z0 + t, x1 - t, y0 + 0.012, z1 - t, floorCol);
|
|
24030
|
-
|
|
24031
|
-
c.b("wood", x0, y0, z0, x1, y0 +
|
|
24032
|
-
c.b("wood", x0, y0, z0
|
|
24033
|
-
c.b("wood",
|
|
25026
|
+
const pitch = (z1 - z0 - 2 * t) / 6;
|
|
25027
|
+
for (let i = 1; i < 6; i++) c.b("wood", x0 + t + l, y0 + 0.012, z0 + t + i * pitch - 2e-3, x1 - t - l, y0 + 0.014, z0 + t + i * pitch + 2e-3, shade(floorCol, 0.85));
|
|
25028
|
+
c.b("wood", x0 + t, y0, z0, x1 - t, wallTop, z0 + t, paint);
|
|
25029
|
+
c.b("wood", x0, y0, z0, x0 + t, wallTop + 4e-3, z1, shade(paint, 0.96));
|
|
25030
|
+
c.b("wood", x1 - t, y0, z0, x1, wallTop + 4e-3, z1, shade(paint, 0.96));
|
|
24034
25031
|
const ow = 0.36;
|
|
24035
25032
|
const oh = 0.46;
|
|
24036
|
-
c.b("wood", x0 + t, y0, z1 - t, -ow / 2,
|
|
24037
|
-
c.b("wood", ow / 2, y0, z1 - t, x1 - t,
|
|
24038
|
-
c.b("wood", -ow / 2, y0 + oh, z1 - t, ow / 2,
|
|
24039
|
-
c.b("wood",
|
|
24040
|
-
c.b("wood",
|
|
24041
|
-
c.b("wood", -ow / 2 - 0.025, y0, z1, -ow / 2, y0 + oh + 0.025, z1 + 0.012, trim);
|
|
24042
|
-
c.b("wood", ow / 2, y0, z1, ow / 2 + 0.025, y0 + oh + 0.025, z1 + 0.012, trim);
|
|
25033
|
+
c.b("wood", x0 + t, y0, z1 - t, -ow / 2, wallTop, z1, paint);
|
|
25034
|
+
c.b("wood", ow / 2, y0, z1 - t, x1 - t, wallTop, z1, paint);
|
|
25035
|
+
c.b("wood", -ow / 2, y0 + oh, z1 - t, ow / 2, wallTop, z1, paint);
|
|
25036
|
+
c.b("wood", -ow / 2 - 0.025, y0, z1, -ow / 2, y0 + oh, z1 + 0.012, trim);
|
|
25037
|
+
c.b("wood", ow / 2, y0, z1, ow / 2 + 0.025, y0 + oh, z1 + 0.012, trim);
|
|
24043
25038
|
c.b("wood", -ow / 2 - 0.025, y0 + oh, z1, ow / 2 + 0.025, y0 + oh + 0.025, z1 + 0.012, trim);
|
|
24044
|
-
|
|
24045
|
-
c.b("plain", x0 + t, y0 + 0.012, z0 + t,
|
|
24046
|
-
c.b("plain",
|
|
24047
|
-
c.b("plain",
|
|
24048
|
-
c.b("plain",
|
|
24049
|
-
c.b("plain", ow / 2, y0 +
|
|
24050
|
-
|
|
24051
|
-
const rise =
|
|
24052
|
-
const
|
|
24053
|
-
for (let i = 0; i < steps; i++) {
|
|
24054
|
-
const f = 1 - (i + 0.5) / steps;
|
|
24055
|
-
const gx = bw / 2 * f;
|
|
24056
|
-
const yy = y0 + wallH + i * rise / steps;
|
|
24057
|
-
c.b("wood", -gx, yy, z1 - t, gx, yy + rise / steps + 2e-3, z1, shade(paint, 0.98));
|
|
24058
|
-
c.b("wood", -gx, yy, z0, gx, yy + rise / steps + 2e-3, z0 + t, shade(paint, 0.98));
|
|
24059
|
-
}
|
|
24060
|
-
const half = Math.min(hw - 0.015, bw / 2 + 0.05);
|
|
24061
|
-
const run = half;
|
|
25039
|
+
c.b("plain", x0 + t, y0 + 0.012, z0 + t, x1 - t, wallTop, z0 + t + l, inner);
|
|
25040
|
+
c.b("plain", x0 + t, y0 + 0.012, z0 + t + l, x0 + t + l, wallTop, z1 - t, mix(inner, paint, 0.1));
|
|
25041
|
+
c.b("plain", x1 - t - l, y0 + 0.012, z0 + t + l, x1 - t, wallTop, z1 - t, mix(inner, paint, 0.1));
|
|
25042
|
+
c.b("plain", x0 + t + l, y0 + 0.012, z1 - t - l, -ow / 2, wallTop, z1 - t, shade(inner, 0.95));
|
|
25043
|
+
c.b("plain", ow / 2, y0 + 0.012, z1 - t - l, x1 - t - l, wallTop, z1 - t, shade(inner, 0.95));
|
|
25044
|
+
c.b("plain", -ow / 2, y0 + oh - l, z1 - t - l, ow / 2, wallTop, z1 - t, shade(inner, 0.95));
|
|
25045
|
+
const top = h - 0.02;
|
|
25046
|
+
const rise = top - wallTop;
|
|
25047
|
+
const run = Math.min(hw - 0.015, bw / 2 + 0.05);
|
|
24062
25048
|
const L = Math.hypot(run, rise);
|
|
24063
25049
|
const ang = Math.atan2(rise, run);
|
|
25050
|
+
const sin = Math.sin(ang);
|
|
25051
|
+
const cos = Math.cos(ang);
|
|
24064
25052
|
const roofT = 0.03;
|
|
24065
25053
|
const rz0 = z0 - 0.04;
|
|
24066
25054
|
const rz1 = z1 + 0.06;
|
|
25055
|
+
const onSlope = (m, s, u0, u1, v0, v1, za, zb, color) => {
|
|
25056
|
+
const u = (u0 + u1) / 2;
|
|
25057
|
+
const v = (v0 + v1) / 2;
|
|
25058
|
+
const cx = s * (u * cos + v * sin);
|
|
25059
|
+
const cy = top - u * sin + v * cos;
|
|
25060
|
+
c.box(m, cx, cy - (v1 - v0) / 2, (za + zb) / 2, u1 - u0, v1 - v0, zb - za, color, 0, 0, -s * ang);
|
|
25061
|
+
};
|
|
25062
|
+
const cut = roofT / 2 * Math.tan(ang);
|
|
24067
25063
|
for (const s of [-1, 1]) {
|
|
24068
|
-
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
25064
|
+
onSlope("wood", s, cut, L, -roofT / 2, roofT / 2, rz0, rz1, roofCol);
|
|
25065
|
+
for (let i = 1; i < 5; i++) {
|
|
25066
|
+
const zz = rz0 + i * ((rz1 - rz0) / 5);
|
|
25067
|
+
onSlope("wood", s, cut + 0.03, L - 0.01, roofT / 2, roofT / 2 + 4e-3, zz - 3e-3, zz + 3e-3, shade(roofCol, 0.8));
|
|
25068
|
+
}
|
|
25069
|
+
const g = s < 0 ? 2e-3 : 4e-3;
|
|
25070
|
+
const vTop = -roofT / 2 - 2e-3;
|
|
25071
|
+
const vBottom = -rise * cos - 5e-3;
|
|
25072
|
+
const uEnd = (bw / 2 - vTop * sin) / cos;
|
|
25073
|
+
onSlope("wood", s, 0, uEnd, vBottom, vTop, z1 - t + g, z1 - g, shade(paint, 0.98));
|
|
25074
|
+
onSlope("wood", s, 0, uEnd, vBottom, vTop, z0 + g, z0 + t - g, shade(paint, 0.98));
|
|
24072
25075
|
}
|
|
24073
|
-
c.b("wood", -0.03,
|
|
24074
|
-
c.b("fabric", x0 + t + 0.03, y0 + 0.
|
|
25076
|
+
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
|
+
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));
|
|
24075
25078
|
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));
|
|
24076
25079
|
if (c.M.variant !== "no_bowl") {
|
|
24077
25080
|
const bx = x1 - 0.1;
|
|
24078
25081
|
const bz = z1 + 0.11;
|
|
24079
25082
|
c.cyl("metal", bx, 0, bz, 0.085, 0.045, 11843772, "cyl");
|
|
24080
|
-
c.cyl("plain", bx, 0.
|
|
25083
|
+
c.cyl("plain", bx, 0.045, bz, 0.07, 4e-3, 8018480, "cyl");
|
|
24081
25084
|
}
|
|
24082
25085
|
}
|
|
24083
25086
|
|
|
@@ -24184,6 +25187,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
24184
25187
|
leaf: (M, x, y, z, w, h, color, ry, rx) => push({ kind: "leaf", M, x, y, z, w, h, color, ry, rx }),
|
|
24185
25188
|
plane: (M, material, x, y, z, w, h, color, ry, rx, rz, uv) => push({ kind: "plane", M, material, x, y, z, w, h, color, ry, rx, rz, uv }),
|
|
24186
25189
|
light: (M, x, y, z, color, range, lightKind) => push({ kind: "light", M, x, y, z, color, range, lightKind }),
|
|
25190
|
+
lathe: (M, material, x, y, z, points, color) => push({ kind: "lathe", M, material, x, y, z, points, color }),
|
|
24187
25191
|
part(id, pivot, ry, draw) {
|
|
24188
25192
|
const rec = { id, pivot, ry, primitives: [] };
|
|
24189
25193
|
parts2[id] = rec;
|