aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/cleaners/skyblock/collections.js14
-rw-r--r--src/cleaners/skyblock/collections.ts14
2 files changed, 14 insertions, 14 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;
diff --git a/src/cleaners/skyblock/collections.ts b/src/cleaners/skyblock/collections.ts
index a3e1fb3..708822b 100644
--- a/src/cleaners/skyblock/collections.ts
+++ b/src/cleaners/skyblock/collections.ts
@@ -111,23 +111,23 @@ export function cleanCollections(data: any): Collection[] {
// 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: { [ key in hypixelItemNames ]: number } = data?.collection ?? {}
- const playerCollectionValues: Collection[] = []
+ const playerCollectionXpsRaw: { [ key in hypixelItemNames ]: number } = data?.collection ?? {}
+ const playerCollections: Collection[] = []
- for (const collectionNameRaw in playerCollectionValuesRaw) {
- const collectionValue: number = playerCollectionValuesRaw[collectionNameRaw]
+ for (const collectionNameRaw in playerCollectionXpsRaw) {
+ const collectionXp: number = playerCollectionXpsRaw[collectionNameRaw]
const collectionName = cleanItemId(collectionNameRaw)
const collectionLevel = playerCollectionTiers[collectionName]
const collectionCategory = getCategory(collectionName) ?? '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
} \ No newline at end of file