From 1590406fdc3ce3d31b3f9f1b45d0bbf4ad07af31 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 20 May 2022 20:46:09 -0500 Subject: rename onetime achievements to challenge --- src/cleaners/achievements.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/cleaners') diff --git a/src/cleaners/achievements.ts b/src/cleaners/achievements.ts index 3e4189a..2e75cc6 100644 --- a/src/cleaners/achievements.ts +++ b/src/cleaners/achievements.ts @@ -8,7 +8,7 @@ interface TieredAchievement { description: string } -interface OneTimeAchievement { +interface ChallengeAchievement { id: string name: string achieved: boolean @@ -17,7 +17,7 @@ interface OneTimeAchievement { export interface Achievements { tiered: TieredAchievement[] - oneTime: OneTimeAchievement[] + challenge: ChallengeAchievement[] } export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataResponse['player']): Promise { @@ -38,9 +38,9 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe }) } - let oneTimeAchievements: OneTimeAchievement[] = [] + let challengeAchievements: ChallengeAchievement[] = [] for (const [achievementId, achievementData] of Object.entries(achievementsData.one_time)) { - oneTimeAchievements.push({ + challengeAchievements.push({ id: achievementId.toLowerCase(), name: achievementData.name, achieved: data.achievementsOneTime.includes(`skyblock_${achievementId.toLowerCase()}`), @@ -48,10 +48,10 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe }) } - return { tiered: tieredAchievements, oneTime: oneTimeAchievements } + return { tiered: tieredAchievements, challenge: challengeAchievements } } // this shouldn't be possible console.debug('skyblock not found in achievements?') - return { tiered: [], oneTime: [] } + return { tiered: [], challenge: [] } } -- cgit