@juice789/tf2items 1.0.25 → 1.0.27

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/schemaHelper.json CHANGED
@@ -123,7 +123,8 @@
123
123
  "Bone-Chilling Bonanza Collection",
124
124
  "Winter 2023 Cosmetics Collection",
125
125
  "Summer 2024 Cosmetics Collection",
126
- "Terrifying Trove Collection"
126
+ "Terrifying Trove Collection",
127
+ "Winter 2024 Cosmetics Collection"
127
128
  ],
128
129
  "weaponCollections": [
129
130
  "Concealed Killer Collection",
package/sku.js CHANGED
@@ -109,10 +109,11 @@ const getName = ({
109
109
  },
110
110
  bpTexture = false,
111
111
  qualityBpStyle = false,
112
- useProperName = false
112
+ useProperName = false,
113
+ showUncraft = true
113
114
  ) => [
114
115
  craft && '#' + craft,
115
- uncraftable && 'Non-Craftable',
116
+ uncraftable && showUncraft && 'Non-Craftable',
116
117
  elevated && 'Strange',
117
118
  quality && !['6', '15'].includes(quality.toString()) && (qualityBpStyle ? !effect : true) && qualityNames[quality],
118
119
  oq && oq.toString() !== '6' && qualityNames[oq],
package/skuLinks.js CHANGED
@@ -1,3 +1,6 @@
1
+
2
+ const removeAccents = require('remove-accents');
3
+
1
4
  const {
2
5
  itemFromSku
3
6
  } = require('./sku.js')
@@ -90,7 +93,7 @@ const manncoUrl = (sku) => {
90
93
  20005: 2
91
94
  }
92
95
 
93
- const manncoUrl = [
96
+ const manncoName = [
94
97
  440,
95
98
  uncraftable && 'uncraftable',
96
99
  oq && oq !== '6' && qualityNames[oq],
@@ -108,9 +111,9 @@ const manncoUrl = (sku) => {
108
111
  wear && wears[wear],
109
112
  chemSeries[defindex] && 'series-' + chemSeries[defindex],
110
113
  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
-
113
- return 'https://mannco.store/item/' + manncoUrl
114
+ ].filter(Boolean).join('-')
115
+ const url = removeAccents(manncoName).replaceAll(/[^0-9a-zA-Z -]/g, '').replaceAll(' ', '-').toLowerCase()
116
+ return 'https://mannco.store/item/' + url
114
117
  }
115
118
 
116
119
  const scmUrl = (sku) => {