@adatechnology/game-items-goods 0.7.1 → 0.8.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.
@@ -202,6 +202,7 @@ var GameItemsGoods = (() => {
202
202
  [DEFERRED_QUEUE_ID.DESTRUCTION_PREFIT]: { priority: 40, phase: "idle", minEveryFrames: 30 }
203
203
  };
204
204
  var MUST_DRAIN_QUEUE_IDS = /* @__PURE__ */ new Set([DEFERRED_QUEUE_ID.DESTRUCTION_EVENTS, DEFERRED_QUEUE_ID.BREACH_CUT]);
205
+ var ITEM_TOOLS = ["plunger"];
205
206
  var WARNED_KEY = /* @__PURE__ */ Symbol.for("@adatechnology/game-contracts.warned");
206
207
  var warnedKeys = () => {
207
208
  const holder = globalThis;
@@ -570,6 +571,7 @@ var GameItemsGoods = (() => {
570
571
  if (item.shelfLife !== void 0 && !isPositive(item.shelfLife)) issue(`has a shelf life of ${item.shelfLife} days`);
571
572
  if (item.portions !== void 0 && !(Number.isInteger(item.portions) && item.portions > 0)) issue(`has ${item.portions} portions`);
572
573
  if (item.durability && !DURABILITY_KINDS.includes(item.durability.kind)) issue(`has unknown durability kind "${item.durability.kind}"`);
574
+ for (const tool of item.tools ?? []) if (!ITEM_TOOLS.includes(tool)) issue(`works as unknown tool "${tool}"`);
573
575
  if (item.consumable) for (const problem of consumableProblems(item.consumable)) issue(problem);
574
576
  const { protection } = item;
575
577
  if (protection) {
@@ -11874,7 +11876,20 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
11874
11876
  stack: 6,
11875
11877
  shape: "cup",
11876
11878
  color: 14215408,
11877
- rarity: "common"
11879
+ rarity: "common",
11880
+ parts: [
11881
+ {
11882
+ id: "body",
11883
+ material: "glass",
11884
+ thickness: 3e-3
11885
+ }
11886
+ ],
11887
+ container: {
11888
+ capacityLiters: 0.3
11889
+ },
11890
+ estimated: [
11891
+ "container"
11892
+ ]
11878
11893
  },
11879
11894
  {
11880
11895
  id: "cutlery",
@@ -12125,8 +12140,17 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
12125
12140
  }
12126
12141
  ],
12127
12142
  estimated: [
12128
- "parts"
12129
- ]
12143
+ "parts",
12144
+ "consumable"
12145
+ ],
12146
+ consumable: {
12147
+ form: "liquid",
12148
+ unit: "ml",
12149
+ amount: 450,
12150
+ dose: 5,
12151
+ emptyKg: 0.03,
12152
+ density: 1.03
12153
+ }
12130
12154
  },
12131
12155
  {
12132
12156
  id: "bleach",
@@ -13616,8 +13640,12 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
13616
13640
  thickness: 2e-3
13617
13641
  }
13618
13642
  ],
13643
+ container: {
13644
+ capacityLiters: 0.35
13645
+ },
13619
13646
  estimated: [
13620
- "parts"
13647
+ "parts",
13648
+ "container"
13621
13649
  ]
13622
13650
  },
13623
13651
  {
@@ -13764,6 +13792,41 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
13764
13792
  },
13765
13793
  weapon: "brass_knuckles",
13766
13794
  model: "brass_knuckles"
13795
+ },
13796
+ {
13797
+ id: "plunger",
13798
+ category: "tools",
13799
+ kind: "tool",
13800
+ tags: [
13801
+ "cleaning"
13802
+ ],
13803
+ tools: [
13804
+ "plunger"
13805
+ ],
13806
+ size: [
13807
+ 0.14,
13808
+ 0.55,
13809
+ 0.14
13810
+ ],
13811
+ weight: 0.45,
13812
+ stack: 1,
13813
+ shape: "tool",
13814
+ color: 11545120,
13815
+ rarity: "common",
13816
+ finds: {
13817
+ places: [
13818
+ "house",
13819
+ "apartment"
13820
+ ]
13821
+ },
13822
+ parts: [
13823
+ {
13824
+ id: "body",
13825
+ material: "rubber",
13826
+ thickness: 4e-3
13827
+ }
13828
+ ],
13829
+ model: "plunger"
13767
13830
  }
13768
13831
  ];
13769
13832
 
@@ -15583,6 +15646,14 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
15583
15646
  "alicate"
15584
15647
  ]
15585
15648
  },
15649
+ plunger: {
15650
+ created: true,
15651
+ idSource: "decision",
15652
+ sizeSource: "REF",
15653
+ vc3: [
15654
+ "desentupidor"
15655
+ ]
15656
+ },
15586
15657
  adjustable_wrench: {
15587
15658
  ite: "chave_inglesa",
15588
15659
  idSource: "decision",
@@ -18873,14 +18944,18 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
18873
18944
 
18874
18945
  // src/pack.ts
18875
18946
  var KINDS = createGoodsKinds();
18876
- var withSeal = (item) => {
18947
+ var withKind = (item) => {
18877
18948
  const kind = item.kind;
18878
- const seal = kind && KINDS.has(kind) ? KINDS.defaults(kind).seal : void 0;
18879
- return seal ? { ...item, seal: { ...seal, ...item.seal } } : item;
18949
+ if (!kind || !KINDS.has(kind)) return item;
18950
+ const defaults = KINDS.defaults(kind);
18951
+ const seal = defaults.seal;
18952
+ const parts2 = defaults.parts;
18953
+ const own = item.parts;
18954
+ return { ...item, ...seal ? { seal: { ...seal, ...item.seal } } : {}, ...!own && parts2 ? { parts: parts2 } : {} };
18880
18955
  };
18881
18956
  var goodsPack = {
18882
18957
  id: "goods",
18883
- items: GOODS_ITEMS.map(withSeal),
18958
+ items: GOODS_ITEMS.map(withKind),
18884
18959
  categories: GOODS_CATEGORIES,
18885
18960
  places: GOODS_PLACES,
18886
18961
  containers: GOODS_CONTAINERS,
@@ -19165,6 +19240,7 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
19165
19240
  "item.toothbrush": "Toothbrush",
19166
19241
  "item.deodorant": "Deodorant",
19167
19242
  "item.toilet_paper": "Toilet paper",
19243
+ "item.plunger": "Toilet plunger",
19168
19244
  "item.towel": "Towel",
19169
19245
  "item.detergent": "Detergent",
19170
19246
  "item.bleach": "Bleach",
@@ -19675,6 +19751,7 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
19675
19751
  "item.toothbrush": "Escova de dente",
19676
19752
  "item.deodorant": "Desodorante",
19677
19753
  "item.toilet_paper": "Papel higi\xEAnico",
19754
+ "item.plunger": "Desentupidor",
19678
19755
  "item.towel": "Toalha",
19679
19756
  "item.detergent": "Detergente",
19680
19757
  "item.bleach": "\xC1gua sanit\xE1ria",