@ianlucas/cs2-lib-inspect 2.0.0-rc.2 → 2.0.0-rc.3
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 +7 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ function getEconomyItemPreviewData(item) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function getInventoryItemPreviewData(item) {
|
|
66
|
-
const { nameTag, seed, statTrak, stickers } = item;
|
|
66
|
+
const { nameTag, seed, statTrak, stickers, patches } = item;
|
|
67
67
|
const baseAttributes = getEconomyItemPreviewData(item);
|
|
68
68
|
return {
|
|
69
69
|
...baseAttributes,
|
|
@@ -78,7 +78,12 @@ function getInventoryItemPreviewData(item) {
|
|
|
78
78
|
stickerId: item.economy.getById(id).index,
|
|
79
79
|
wear: wear ?? CS2_MIN_STICKER_WEAR
|
|
80
80
|
}))
|
|
81
|
-
:
|
|
81
|
+
: patches !== undefined
|
|
82
|
+
? item.somePatches().map(([slot, patchId]) => ({
|
|
83
|
+
slot,
|
|
84
|
+
stickerId: item.economy.getById(patchId).index
|
|
85
|
+
}))
|
|
86
|
+
: baseAttributes.stickers
|
|
82
87
|
};
|
|
83
88
|
}
|
|
84
89
|
function generateHex(attributes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ianlucas/cs2-lib-inspect",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
4
|
"description": "A utility for creating inspect links for CS2 items",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "ianlucas/cs2-lib-inspect",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"crc-32": "^1.2.2"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@ianlucas/cs2-lib": "^5.0.0-rc.
|
|
21
|
+
"@ianlucas/cs2-lib": "^5.0.0-rc.24"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@protobuf-ts/plugin": "^2.9.3",
|