@juice789/tf2items 1.0.15 → 1.0.17
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/app.js +9 -10
- package/fetchAppDataInventory.js +2 -2
- package/fetchItemsApi.js +2 -2
- package/fetchItemsGame.js +2 -2
- package/fetchParticleEffects.js +2 -2
- package/fetchTextures.js +2 -2
- package/fetchTfEnglish.js +2 -2
- package/fromEconItem.js +12 -3
- package/options-example.json +2 -1
- package/options.json +4 -1
- package/package.json +1 -1
- package/sagas.js +12 -12
- package/saveSchema.js +12 -12
- package/schema.json +1 -1
- package/schemaHelper.json +4 -2
- package/sku.js +2 -1
- package/skuBp.js +2 -2
- package/skuLinks.js +40 -35
package/schemaHelper.json
CHANGED
|
@@ -118,7 +118,8 @@
|
|
|
118
118
|
"Winter 2021 Cosmetics Collection",
|
|
119
119
|
"Summer 2022 Cosmetics Collection",
|
|
120
120
|
"Ghoulish Gains Collection",
|
|
121
|
-
"Winter 2022 Cosmetics Collection"
|
|
121
|
+
"Winter 2022 Cosmetics Collection",
|
|
122
|
+
"Summer 2023 Cosmetics Collection"
|
|
122
123
|
],
|
|
123
124
|
"weaponCollections": [
|
|
124
125
|
"Concealed Killer Collection",
|
|
@@ -143,7 +144,8 @@
|
|
|
143
144
|
"Scream Fortress XII Collection",
|
|
144
145
|
"Winter 2020 Collection",
|
|
145
146
|
"Scream Fortress XIII Collection",
|
|
146
|
-
"Scream Fortress XIV Collection"
|
|
147
|
+
"Scream Fortress XIV Collection",
|
|
148
|
+
"Summer 2023 War Paint Case"
|
|
147
149
|
],
|
|
148
150
|
"fabricatorDefindex": [
|
|
149
151
|
"190",
|
package/sku.js
CHANGED
|
@@ -129,7 +129,8 @@ const getName = ({
|
|
|
129
129
|
safeItems[defindex].item_name,
|
|
130
130
|
wear && '(' + wears[wear] + ')',
|
|
131
131
|
series && '#' + series
|
|
132
|
-
].filter(Boolean).join(' ')
|
|
132
|
+
].filter(Boolean).join(' ').replace('\\n', `
|
|
133
|
+
`)
|
|
133
134
|
|
|
134
135
|
const itemNameFromSku = (sku, ...params) => {
|
|
135
136
|
const item = itemFromSku(sku)
|
package/skuBp.js
CHANGED
|
@@ -29,11 +29,11 @@ const toBpQuality = (sku) => {
|
|
|
29
29
|
const toBpName = (sku) => {
|
|
30
30
|
|
|
31
31
|
const item = omit(
|
|
32
|
-
['quality', 'elevated', 'uncraftable', 'craft', 'target', 'output', 'oq', 'effect'],
|
|
32
|
+
['quality', 'elevated', 'uncraftable', 'craft', 'target', 'output', 'oq', 'effect', 'series'],
|
|
33
33
|
itemFromSku(sku)
|
|
34
34
|
)
|
|
35
35
|
|
|
36
|
-
return getName(item, Boolean(item.texture))
|
|
36
|
+
return getName(item, Boolean(item.texture))
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const toBpPriceIndex = (sku) => {
|
package/skuLinks.js
CHANGED
|
@@ -23,11 +23,11 @@ const {
|
|
|
23
23
|
textures
|
|
24
24
|
} = require('./schema.json')
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const marketHashNameFromSku = (sku) => {
|
|
27
|
+
|
|
27
28
|
const {
|
|
28
29
|
defindex,
|
|
29
30
|
quality,
|
|
30
|
-
uncraftable,
|
|
31
31
|
killstreakTier,
|
|
32
32
|
target,
|
|
33
33
|
output,
|
|
@@ -38,43 +38,39 @@ const manncoUrl = (sku) => {
|
|
|
38
38
|
wear,
|
|
39
39
|
australium,
|
|
40
40
|
series,
|
|
41
|
-
|
|
41
|
+
uncraftable
|
|
42
42
|
} = itemFromSku(sku)
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
const chemSeries = {
|
|
46
45
|
20000: 1,
|
|
47
46
|
20005: 2
|
|
48
47
|
}
|
|
49
48
|
|
|
50
|
-
const
|
|
51
|
-
440,
|
|
52
|
-
uncraftable && 'uncraftable',
|
|
49
|
+
const marketHashName = [
|
|
53
50
|
oq && oq !== '6' && qualityNames[oq],
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
festivized && 'festivized',
|
|
51
|
+
elevated && 'Strange',
|
|
52
|
+
!['6', '15'].includes(quality) && qualityNames[quality],
|
|
53
|
+
festivized && 'Festivized',
|
|
58
54
|
killstreakTier && killstreakTiers[killstreakTier],
|
|
59
|
-
australium && '
|
|
55
|
+
australium && 'Australium',
|
|
60
56
|
texture && textures[texture],
|
|
61
57
|
target && items[target].item_name,
|
|
62
58
|
output && items[output].item_name,
|
|
63
59
|
items[defindex].propername === '1' && quality.toString() === '6' && !uncraftable && !elevated && !festivized && !killstreakTier && 'The',
|
|
64
|
-
items[defindex].item_name
|
|
65
|
-
wear && wears[wear],
|
|
66
|
-
chemSeries[defindex] && '
|
|
67
|
-
series &&
|
|
68
|
-
].filter(Boolean).join('
|
|
60
|
+
items[defindex].item_name,
|
|
61
|
+
wear && '(' + wears[wear] + ')',
|
|
62
|
+
chemSeries[defindex] && 'Series #' + chemSeries[defindex],
|
|
63
|
+
series && !items[defindex].seriesHidden && 'Series #' + series
|
|
64
|
+
].filter(Boolean).join(' ')
|
|
69
65
|
|
|
70
|
-
return
|
|
66
|
+
return marketHashName
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
const
|
|
74
|
-
|
|
69
|
+
const manncoUrl = (sku) => {
|
|
75
70
|
const {
|
|
76
71
|
defindex,
|
|
77
72
|
quality,
|
|
73
|
+
uncraftable,
|
|
78
74
|
killstreakTier,
|
|
79
75
|
target,
|
|
80
76
|
output,
|
|
@@ -85,33 +81,41 @@ const scmUrl = (sku) => {
|
|
|
85
81
|
wear,
|
|
86
82
|
australium,
|
|
87
83
|
series,
|
|
88
|
-
|
|
84
|
+
effect
|
|
89
85
|
} = itemFromSku(sku)
|
|
90
86
|
|
|
87
|
+
|
|
91
88
|
const chemSeries = {
|
|
92
89
|
20000: 1,
|
|
93
90
|
20005: 2
|
|
94
91
|
}
|
|
95
92
|
|
|
96
|
-
const
|
|
93
|
+
const manncoUrl = [
|
|
94
|
+
440,
|
|
95
|
+
uncraftable && 'uncraftable',
|
|
97
96
|
oq && oq !== '6' && qualityNames[oq],
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
effect && particleEffects[effect],
|
|
98
|
+
elevated && 'strange',
|
|
99
|
+
['6', '15'].includes(quality) === false && qualityNames[quality],
|
|
100
|
+
festivized && 'festivized',
|
|
101
101
|
killstreakTier && killstreakTiers[killstreakTier],
|
|
102
|
-
australium && '
|
|
102
|
+
australium && 'australium',
|
|
103
103
|
texture && textures[texture],
|
|
104
104
|
target && items[target].item_name,
|
|
105
105
|
output && items[output].item_name,
|
|
106
106
|
items[defindex].propername === '1' && quality.toString() === '6' && !uncraftable && !elevated && !festivized && !killstreakTier && 'The',
|
|
107
|
-
items[defindex].item_name,
|
|
108
|
-
wear &&
|
|
109
|
-
chemSeries[defindex] && '
|
|
110
|
-
series && !items[defindex].seriesHidden && '
|
|
111
|
-
].filter(Boolean).join(' ')
|
|
107
|
+
items[defindex].item_name.replace('\\n', ' '),
|
|
108
|
+
wear && wears[wear],
|
|
109
|
+
chemSeries[defindex] && 'series-' + chemSeries[defindex],
|
|
110
|
+
series && (!items[defindex].seriesHidden || ['111', '112', '113', '114', '115', '116'].includes(series)) && 'series-' + series
|
|
111
|
+
].filter(Boolean).join('-').replaceAll(/[^0-9a-zA-Z -]/g, '').replaceAll(' ', '-').toLowerCase()
|
|
112
112
|
|
|
113
|
+
return 'https://mannco.store/item/' + manncoUrl
|
|
114
|
+
}
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
const scmUrl = (sku) => {
|
|
117
|
+
const marketHashName = marketHashNameFromSku(sku)
|
|
118
|
+
return 'https://steamcommunity.com/market/listings/440/' + encodeURIComponent(marketHashName)
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
const bpUrl = (sku) => {
|
|
@@ -122,11 +126,11 @@ const bpUrl = (sku) => {
|
|
|
122
126
|
|
|
123
127
|
const bpUrl = [
|
|
124
128
|
toBpQuality(sku),
|
|
125
|
-
toBpName(sku),
|
|
129
|
+
encodeURIComponent(toBpName(sku)),
|
|
126
130
|
'Tradable',
|
|
127
131
|
uncraftable === true ? 'Non-Craftable' : 'Craftable',
|
|
128
132
|
toBpPriceIndex(sku)
|
|
129
|
-
].filter(Boolean).join('/')
|
|
133
|
+
].filter(Boolean).join('/')
|
|
130
134
|
|
|
131
135
|
return 'https://backpack.tf/stats/' + bpUrl
|
|
132
136
|
}
|
|
@@ -176,5 +180,6 @@ module.exports = {
|
|
|
176
180
|
manncoUrl,
|
|
177
181
|
marketplaceUrl,
|
|
178
182
|
bpUrl,
|
|
179
|
-
scmUrl
|
|
183
|
+
scmUrl,
|
|
184
|
+
marketHashNameFromSku
|
|
180
185
|
}
|