aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/zones.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners/skyblock/zones.ts')
-rw-r--r--src/cleaners/skyblock/zones.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/zones.ts b/src/cleaners/skyblock/zones.ts
index 556a2e7..92f4e81 100644
--- a/src/cleaners/skyblock/zones.ts
+++ b/src/cleaners/skyblock/zones.ts
@@ -6,9 +6,17 @@ export interface Zone {
visited: boolean
}
+export function zoneIdToName(id: string) {
+ // this currently does nothing, but in the future it could get data from https://api.hypixel.net/resources/games
+ return id
+}
+
export async function cleanVisitedZones(data: typedHypixelApi.SkyBlockProfileMember): Promise<Zone[]> {
const rawZones = data?.visited_zones || []
+
+ constants.addZones(rawZones)
+
// TODO: store all the zones that exist in SkyBlock, add add those to the array with visited being false
const zones: Zone[] = []
@@ -16,7 +24,7 @@ export async function cleanVisitedZones(data: typedHypixelApi.SkyBlockProfileMem
for (const rawZoneName of knownZones) {
zones.push({
- name: rawZoneName,
+ name: zoneIdToName(rawZoneName),
visited: rawZones.includes(rawZoneName)
})
}