@adatechnology/game-items-goods 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -54,6 +54,7 @@ import { checkCategorized, defineCategories } from "@adatechnology/game-contract
54
54
 
55
55
  // src/contracts.ts
56
56
  import { checkSpec } from "@adatechnology/game-contracts";
57
+ import { itemFluid } from "@adatechnology/game-items";
57
58
 
58
59
  // src/data/ammo-boxes.json
59
60
  var ammo_boxes_default = [
@@ -990,6 +991,19 @@ var house_pools_default = {
990
991
  isTakeable: true,
991
992
  weight: 0.7,
992
993
  isSupply: false
994
+ },
995
+ {
996
+ type: "talheres",
997
+ item: "cutlery",
998
+ name: "Talheres",
999
+ qty: [
1000
+ 1,
1001
+ 2
1002
+ ],
1003
+ viewerCategory: "utensilio",
1004
+ isTakeable: true,
1005
+ weight: 1.5,
1006
+ isSupply: false
993
1007
  }
994
1008
  ],
995
1009
  aereo: [
@@ -10812,15 +10826,28 @@ var items_default = [
10812
10826
  shape: "jar",
10813
10827
  color: 15786216,
10814
10828
  rarity: "common",
10829
+ parts: [
10830
+ {
10831
+ id: "body",
10832
+ material: "plastic",
10833
+ thickness: 6e-4
10834
+ }
10835
+ ],
10815
10836
  nutrition: {
10816
10837
  satiety: 10,
10817
10838
  hydration: 5
10818
10839
  },
10819
10840
  shelfLife: 28,
10820
10841
  estimated: [
10842
+ "parts",
10821
10843
  "nutrition",
10822
- "shelfLife"
10823
- ]
10844
+ "shelfLife",
10845
+ "fluid"
10846
+ ],
10847
+ fluid: {
10848
+ liquid: "yogurt",
10849
+ liters: 0.17
10850
+ }
10824
10851
  },
10825
10852
  {
10826
10853
  id: "apple",
@@ -10922,12 +10949,20 @@ var items_default = [
10922
10949
  shape: "jar",
10923
10950
  color: 15784160,
10924
10951
  rarity: "common",
10952
+ parts: [
10953
+ {
10954
+ id: "body",
10955
+ material: "plastic",
10956
+ thickness: 6e-4
10957
+ }
10958
+ ],
10925
10959
  nutrition: {
10926
10960
  satiety: 10,
10927
10961
  hydration: 4
10928
10962
  },
10929
10963
  shelfLife: 180,
10930
10964
  estimated: [
10965
+ "parts",
10931
10966
  "nutrition",
10932
10967
  "shelfLife"
10933
10968
  ]
@@ -11161,8 +11196,12 @@ var items_default = [
11161
11196
  }
11162
11197
  ],
11163
11198
  estimated: [
11199
+ "fluid",
11164
11200
  "parts"
11165
- ]
11201
+ ],
11202
+ fluid: {
11203
+ liquid: "shampoo"
11204
+ }
11166
11205
  },
11167
11206
  {
11168
11207
  id: "toothpaste",
@@ -11339,8 +11378,12 @@ var items_default = [
11339
11378
  ],
11340
11379
  estimated: [
11341
11380
  "parts",
11381
+ "fluid",
11342
11382
  "consumable"
11343
11383
  ],
11384
+ fluid: {
11385
+ liquid: "detergent"
11386
+ },
11344
11387
  consumable: {
11345
11388
  form: "liquid",
11346
11389
  unit: "ml",
@@ -11375,8 +11418,13 @@ var items_default = [
11375
11418
  }
11376
11419
  ],
11377
11420
  estimated: [
11378
- "parts"
11379
- ]
11421
+ "parts",
11422
+ "fluid"
11423
+ ],
11424
+ fluid: {
11425
+ liquid: "bleach",
11426
+ liters: 1
11427
+ }
11380
11428
  },
11381
11429
  {
11382
11430
  id: "sponge",
@@ -11979,7 +12027,14 @@ var items_default = [
11979
12027
  stack: 1,
11980
12028
  shape: "can",
11981
12029
  color: 15261904,
11982
- rarity: "common"
12030
+ rarity: "common",
12031
+ estimated: [
12032
+ "fluid"
12033
+ ],
12034
+ fluid: {
12035
+ liquid: "paint",
12036
+ liters: 3.6
12037
+ }
11983
12038
  },
11984
12039
  {
11985
12040
  id: "ice_pack",
@@ -12339,8 +12394,13 @@ var items_default = [
12339
12394
  }
12340
12395
  ],
12341
12396
  estimated: [
12342
- "parts"
12343
- ]
12397
+ "parts",
12398
+ "fluid"
12399
+ ],
12400
+ fluid: {
12401
+ liquid: "disinfectant",
12402
+ liters: 0.5
12403
+ }
12344
12404
  },
12345
12405
  {
12346
12406
  id: "seasoning",
@@ -12560,8 +12620,12 @@ var items_default = [
12560
12620
  }
12561
12621
  ],
12562
12622
  estimated: [
12563
- "parts"
12564
- ]
12623
+ "parts",
12624
+ "powder"
12625
+ ],
12626
+ powder: {
12627
+ color: 15659508
12628
+ }
12565
12629
  },
12566
12630
  {
12567
12631
  id: "broom",
@@ -12673,8 +12737,13 @@ var items_default = [
12673
12737
  }
12674
12738
  ],
12675
12739
  estimated: [
12676
- "parts"
12677
- ]
12740
+ "parts",
12741
+ "fluid"
12742
+ ],
12743
+ fluid: {
12744
+ liquid: "fabric_softener",
12745
+ liters: 2
12746
+ }
12678
12747
  },
12679
12748
  {
12680
12749
  id: "clothespins",
@@ -13103,9 +13172,8 @@ var kinds_default = [
13103
13172
  shed: false
13104
13173
  },
13105
13174
  use: {
13106
- clip: "open_can_eat",
13175
+ clip: "eat_food",
13107
13176
  sounds: [
13108
- "can_open",
13109
13177
  "chew"
13110
13178
  ]
13111
13179
  },
@@ -13273,9 +13341,8 @@ var kinds_default = [
13273
13341
  shed: false
13274
13342
  },
13275
13343
  use: {
13276
- clip: "open_can_drink",
13344
+ clip: "drink",
13277
13345
  sounds: [
13278
- "can_open",
13279
13346
  "gulp"
13280
13347
  ]
13281
13348
  },
@@ -17846,6 +17913,17 @@ var use_effects_default = [
17846
17913
  clip: "turn_key"
17847
17914
  }
17848
17915
  },
17916
+ {
17917
+ id: "eat_with_cutlery",
17918
+ effect: "eat_with",
17919
+ consumes: false,
17920
+ items: [
17921
+ "cutlery"
17922
+ ],
17923
+ params: {
17924
+ clip: "eat_with_cutlery"
17925
+ }
17926
+ },
17849
17927
  {
17850
17928
  id: "swap_bag",
17851
17929
  effect: "swap_bag",
@@ -18045,7 +18123,7 @@ var preparation = (options) => {
18045
18123
  var liquidContainer = {
18046
18124
  id: "liquid_container",
18047
18125
  check: (item) => {
18048
- const fluid = item.fluid;
18126
+ const fluid = itemFluid(item);
18049
18127
  if (fluid) {
18050
18128
  const problems = [];
18051
18129
  if (typeof fluid.liquid !== "string" || !SNAKE_CASE.test(fluid.liquid)) problems.push("fluid.liquid must be a liquid id");
@@ -19200,9 +19278,9 @@ var goodsText = (key, locale) => GOODS_STRINGS[pickGoodsLocale(locale)][key] ??
19200
19278
  // src/item-use.ts
19201
19279
  import { resolveEntry } from "@adatechnology/game-contracts";
19202
19280
  import { LIQUIDS } from "@adatechnology/game-fluids";
19203
- import { resolveUse } from "@adatechnology/game-items";
19281
+ import { itemFluid as itemFluid2, resolveUse } from "@adatechnology/game-items";
19204
19282
  var drinkHydrationOf = (item, liquids = LIQUIDS) => {
19205
- const fluid = item.fluid;
19283
+ const fluid = itemFluid2(item);
19206
19284
  const drink = fluid ? liquids.find((liquid) => liquid.id === fluid.liquid)?.drink : void 0;
19207
19285
  if (!fluid || !drink) return void 0;
19208
19286
  const doses = item.durability?.kind === "doses" ? Math.max(1, item.durability.amount ?? 1) : 1;