@adatechnology/game-items-goods 0.7.0 → 0.7.2

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.
@@ -11874,7 +11874,14 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
11874
11874
  stack: 6,
11875
11875
  shape: "cup",
11876
11876
  color: 14215408,
11877
- rarity: "common"
11877
+ rarity: "common",
11878
+ parts: [
11879
+ {
11880
+ id: "body",
11881
+ material: "glass",
11882
+ thickness: 3e-3
11883
+ }
11884
+ ]
11878
11885
  },
11879
11886
  {
11880
11887
  id: "cutlery",
@@ -18873,14 +18880,18 @@ ${problems.map((problem) => ` - ${problem}`).join("\n")}`);
18873
18880
 
18874
18881
  // src/pack.ts
18875
18882
  var KINDS = createGoodsKinds();
18876
- var withSeal = (item) => {
18883
+ var withKind = (item) => {
18877
18884
  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;
18885
+ if (!kind || !KINDS.has(kind)) return item;
18886
+ const defaults = KINDS.defaults(kind);
18887
+ const seal = defaults.seal;
18888
+ const parts2 = defaults.parts;
18889
+ const own = item.parts;
18890
+ return { ...item, ...seal ? { seal: { ...seal, ...item.seal } } : {}, ...!own && parts2 ? { parts: parts2 } : {} };
18880
18891
  };
18881
18892
  var goodsPack = {
18882
18893
  id: "goods",
18883
- items: GOODS_ITEMS.map(withSeal),
18894
+ items: GOODS_ITEMS.map(withKind),
18884
18895
  categories: GOODS_CATEGORIES,
18885
18896
  places: GOODS_PLACES,
18886
18897
  containers: GOODS_CONTAINERS,