aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-03 16:46:23 -0500
committermat <github@matdoes.dev>2021-06-03 16:46:23 -0500
commit134abd6cca8827ce7a7803a64f4d11a18000c038 (patch)
tree55d23c63d0e4461674ce1958708605234283935d /build
parent7caf789818a3463df27e441a8c5dd5a47798ac81 (diff)
downloadskyblock-api-134abd6cca8827ce7a7803a64f4d11a18000c038.tar.gz
skyblock-api-134abd6cca8827ce7a7803a64f4d11a18000c038.tar.bz2
skyblock-api-134abd6cca8827ce7a7803a64f4d11a18000c038.zip
change some variable names in collections to make more sense
Diffstat (limited to 'build')
-rw-r--r--build/cleaners/skyblock/collections.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/build/cleaners/skyblock/collections.js b/build/cleaners/skyblock/collections.js
index 910f8fd..0bb4cb5 100644
--- a/build/cleaners/skyblock/collections.js
+++ b/build/cleaners/skyblock/collections.js
@@ -100,22 +100,22 @@ function cleanCollections(data) {
}
// collection names show up like this: { LOG: 49789, LOG:2: 26219, MUSHROOM_COLLECTION: 2923}
// these values are different for each player in a coop
- const playerCollectionValuesRaw = (_b = data === null || data === void 0 ? void 0 : data.collection) !== null && _b !== void 0 ? _b : {};
- const playerCollectionValues = [];
- for (const collectionNameRaw in playerCollectionValuesRaw) {
- const collectionValue = playerCollectionValuesRaw[collectionNameRaw];
+ const playerCollectionXpsRaw = (_b = data === null || data === void 0 ? void 0 : data.collection) !== null && _b !== void 0 ? _b : {};
+ const playerCollections = [];
+ for (const collectionNameRaw in playerCollectionXpsRaw) {
+ const collectionXp = playerCollectionXpsRaw[collectionNameRaw];
const collectionName = itemId_1.cleanItemId(collectionNameRaw);
const collectionLevel = playerCollectionTiers[collectionName];
const collectionCategory = (_c = getCategory(collectionName)) !== null && _c !== void 0 ? _c : 'unknown';
// in some very weird cases the collection level will be undefined, we should ignore these collections
if (collectionLevel !== undefined)
- playerCollectionValues.push({
+ playerCollections.push({
name: collectionName,
- xp: collectionValue,
+ xp: collectionXp,
level: collectionLevel,
category: collectionCategory
});
}
- return playerCollectionValues;
+ return playerCollections;
}
exports.cleanCollections = cleanCollections;