@adatechnology/game-interactables-household 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.global.js +164 -6
- package/dist/index.global.js.map +1 -1
- package/package.json +3 -3
package/dist/index.global.js
CHANGED
|
@@ -426,6 +426,11 @@ var GameInteractablesHousehold = (() => {
|
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
|
+
var consumableLiters = (spec) => spec?.form === "liquid" && spec.unit === "ml" ? spec.amount / 1e3 : void 0;
|
|
430
|
+
var itemFluid = (item) => {
|
|
431
|
+
if (!item.fluid) return void 0;
|
|
432
|
+
return { liquid: item.fluid.liquid, liters: consumableLiters(item.consumable) ?? item.fluid.liters ?? 0 };
|
|
433
|
+
};
|
|
429
434
|
var FRESH_NUTRITION = { satietyFactor: 1, poisonChance: 0, morale: 0, isEdible: true };
|
|
430
435
|
var nutritionOf = (item, context, rules) => {
|
|
431
436
|
const state = context.freshness ?? "fresh";
|
|
@@ -568,6 +573,121 @@ var GameInteractablesHousehold = (() => {
|
|
|
568
573
|
}
|
|
569
574
|
]
|
|
570
575
|
},
|
|
576
|
+
{
|
|
577
|
+
id: "eat_with_cutlery",
|
|
578
|
+
body: "mouth",
|
|
579
|
+
duration: 3.1,
|
|
580
|
+
note: "the fork or spoon in the working hand to the food the other hand holds before the chest, a mouthful to the mouth, three times",
|
|
581
|
+
keys: [
|
|
582
|
+
{
|
|
583
|
+
t: 0,
|
|
584
|
+
position: [
|
|
585
|
+
0.22,
|
|
586
|
+
-0.2,
|
|
587
|
+
-0.4
|
|
588
|
+
],
|
|
589
|
+
rotation: [
|
|
590
|
+
0,
|
|
591
|
+
0,
|
|
592
|
+
0
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
t: 0.35,
|
|
597
|
+
position: [
|
|
598
|
+
-0.04,
|
|
599
|
+
-0.3,
|
|
600
|
+
-0.36
|
|
601
|
+
],
|
|
602
|
+
rotation: [
|
|
603
|
+
0.25,
|
|
604
|
+
0,
|
|
605
|
+
0
|
|
606
|
+
]
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
t: 0.8,
|
|
610
|
+
position: [
|
|
611
|
+
0.01,
|
|
612
|
+
0,
|
|
613
|
+
-0.17
|
|
614
|
+
],
|
|
615
|
+
rotation: [
|
|
616
|
+
-0.3,
|
|
617
|
+
0,
|
|
618
|
+
0
|
|
619
|
+
],
|
|
620
|
+
action: "bite"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
t: 1.2,
|
|
624
|
+
position: [
|
|
625
|
+
-0.04,
|
|
626
|
+
-0.3,
|
|
627
|
+
-0.36
|
|
628
|
+
],
|
|
629
|
+
rotation: [
|
|
630
|
+
0.25,
|
|
631
|
+
0,
|
|
632
|
+
0
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
t: 1.65,
|
|
637
|
+
position: [
|
|
638
|
+
0.01,
|
|
639
|
+
0,
|
|
640
|
+
-0.17
|
|
641
|
+
],
|
|
642
|
+
rotation: [
|
|
643
|
+
-0.3,
|
|
644
|
+
0,
|
|
645
|
+
0
|
|
646
|
+
],
|
|
647
|
+
action: "bite"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
t: 2.05,
|
|
651
|
+
position: [
|
|
652
|
+
-0.04,
|
|
653
|
+
-0.3,
|
|
654
|
+
-0.36
|
|
655
|
+
],
|
|
656
|
+
rotation: [
|
|
657
|
+
0.25,
|
|
658
|
+
0,
|
|
659
|
+
0
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
t: 2.5,
|
|
664
|
+
position: [
|
|
665
|
+
0.01,
|
|
666
|
+
0,
|
|
667
|
+
-0.17
|
|
668
|
+
],
|
|
669
|
+
rotation: [
|
|
670
|
+
-0.3,
|
|
671
|
+
0,
|
|
672
|
+
0
|
|
673
|
+
],
|
|
674
|
+
action: "bite"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
t: 3.1,
|
|
678
|
+
position: [
|
|
679
|
+
0.22,
|
|
680
|
+
-0.2,
|
|
681
|
+
-0.4
|
|
682
|
+
],
|
|
683
|
+
rotation: [
|
|
684
|
+
0,
|
|
685
|
+
0,
|
|
686
|
+
0
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
},
|
|
571
691
|
{
|
|
572
692
|
id: "drink",
|
|
573
693
|
body: "mouth",
|
|
@@ -4495,6 +4615,19 @@ var GameInteractablesHousehold = (() => {
|
|
|
4495
4615
|
isTakeable: true,
|
|
4496
4616
|
weight: 0.7,
|
|
4497
4617
|
isSupply: false
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
type: "talheres",
|
|
4621
|
+
item: "cutlery",
|
|
4622
|
+
name: "Talheres",
|
|
4623
|
+
qty: [
|
|
4624
|
+
1,
|
|
4625
|
+
2
|
|
4626
|
+
],
|
|
4627
|
+
viewerCategory: "utensilio",
|
|
4628
|
+
isTakeable: true,
|
|
4629
|
+
weight: 1.5,
|
|
4630
|
+
isSupply: false
|
|
4498
4631
|
}
|
|
4499
4632
|
],
|
|
4500
4633
|
aereo: [
|
|
@@ -14315,12 +14448,20 @@ var GameInteractablesHousehold = (() => {
|
|
|
14315
14448
|
shape: "jar",
|
|
14316
14449
|
color: 15786216,
|
|
14317
14450
|
rarity: "common",
|
|
14451
|
+
parts: [
|
|
14452
|
+
{
|
|
14453
|
+
id: "body",
|
|
14454
|
+
material: "plastic",
|
|
14455
|
+
thickness: 6e-4
|
|
14456
|
+
}
|
|
14457
|
+
],
|
|
14318
14458
|
nutrition: {
|
|
14319
14459
|
satiety: 10,
|
|
14320
14460
|
hydration: 5
|
|
14321
14461
|
},
|
|
14322
14462
|
shelfLife: 28,
|
|
14323
14463
|
estimated: [
|
|
14464
|
+
"parts",
|
|
14324
14465
|
"nutrition",
|
|
14325
14466
|
"shelfLife",
|
|
14326
14467
|
"fluid"
|
|
@@ -14430,12 +14571,20 @@ var GameInteractablesHousehold = (() => {
|
|
|
14430
14571
|
shape: "jar",
|
|
14431
14572
|
color: 15784160,
|
|
14432
14573
|
rarity: "common",
|
|
14574
|
+
parts: [
|
|
14575
|
+
{
|
|
14576
|
+
id: "body",
|
|
14577
|
+
material: "plastic",
|
|
14578
|
+
thickness: 6e-4
|
|
14579
|
+
}
|
|
14580
|
+
],
|
|
14433
14581
|
nutrition: {
|
|
14434
14582
|
satiety: 10,
|
|
14435
14583
|
hydration: 4
|
|
14436
14584
|
},
|
|
14437
14585
|
shelfLife: 180,
|
|
14438
14586
|
estimated: [
|
|
14587
|
+
"parts",
|
|
14439
14588
|
"nutrition",
|
|
14440
14589
|
"shelfLife"
|
|
14441
14590
|
]
|
|
@@ -14673,8 +14822,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
14673
14822
|
"parts"
|
|
14674
14823
|
],
|
|
14675
14824
|
fluid: {
|
|
14676
|
-
liquid: "shampoo"
|
|
14677
|
-
liters: 0.3
|
|
14825
|
+
liquid: "shampoo"
|
|
14678
14826
|
}
|
|
14679
14827
|
},
|
|
14680
14828
|
{
|
|
@@ -14856,8 +15004,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
14856
15004
|
"consumable"
|
|
14857
15005
|
],
|
|
14858
15006
|
fluid: {
|
|
14859
|
-
liquid: "detergent"
|
|
14860
|
-
liters: 0.45
|
|
15007
|
+
liquid: "detergent"
|
|
14861
15008
|
},
|
|
14862
15009
|
consumable: {
|
|
14863
15010
|
form: "liquid",
|
|
@@ -21124,6 +21271,17 @@ var GameInteractablesHousehold = (() => {
|
|
|
21124
21271
|
clip: "turn_key"
|
|
21125
21272
|
}
|
|
21126
21273
|
},
|
|
21274
|
+
{
|
|
21275
|
+
id: "eat_with_cutlery",
|
|
21276
|
+
effect: "eat_with",
|
|
21277
|
+
consumes: false,
|
|
21278
|
+
items: [
|
|
21279
|
+
"cutlery"
|
|
21280
|
+
],
|
|
21281
|
+
params: {
|
|
21282
|
+
clip: "eat_with_cutlery"
|
|
21283
|
+
}
|
|
21284
|
+
},
|
|
21127
21285
|
{
|
|
21128
21286
|
id: "swap_bag",
|
|
21129
21287
|
effect: "swap_bag",
|
|
@@ -21308,7 +21466,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
21308
21466
|
var liquidContainer = {
|
|
21309
21467
|
id: "liquid_container",
|
|
21310
21468
|
check: (item) => {
|
|
21311
|
-
const fluid = item
|
|
21469
|
+
const fluid = itemFluid(item);
|
|
21312
21470
|
if (fluid) {
|
|
21313
21471
|
const problems = [];
|
|
21314
21472
|
if (typeof fluid.liquid !== "string" || !SNAKE_CASE.test(fluid.liquid)) problems.push("fluid.liquid must be a liquid id");
|
|
@@ -22430,7 +22588,7 @@ var GameInteractablesHousehold = (() => {
|
|
|
22430
22588
|
};
|
|
22431
22589
|
var GOODS_STRINGS = { en: en_default, "pt-BR": pt_BR_default };
|
|
22432
22590
|
var drinkHydrationOf = (item, liquids = LIQUIDS) => {
|
|
22433
|
-
const fluid = item
|
|
22591
|
+
const fluid = itemFluid(item);
|
|
22434
22592
|
const drink = fluid ? liquids.find((liquid) => liquid.id === fluid.liquid)?.drink : void 0;
|
|
22435
22593
|
if (!fluid || !drink) return void 0;
|
|
22436
22594
|
const doses = item.durability?.kind === "doses" ? Math.max(1, item.durability.amount ?? 1) : 1;
|